Apologies this is long – I do not want to leave any ambiguity.

I have a hopefully simple question, that does not seem to be covered by the DSP books I have in regards to theory of operation.

I will use the ‘*’ as the operation for convolution, and ‘x’ to denote multiplication. For multiplication, the operation is an element by element multiplication, as opposed to a constant multiplication.

Assume that there is a continuous sine wave, which will be sampled at 192kHz, with frequency 1kHz and amplitude 1, which lasts for 1 second, denoted as sin(n).

We also have the rectangular function, with the same sample rate, which lasts for 5ms, about the centre of the 1 second interval, denoted as rect(n).

There is a filter function that based on the sample rate has a cut off at 24kHz, is defined as symmetrical, linear phase, and has 501 taps – denoted as h(n).

What I want too know is, are the two operations described below valid in terms of LTI systems, convolution, and multiplication, and the distributive/associative/commutative laws.

Process A). The sine wave is multiplied by the rectangular function to produce a truncated sine wave, which starts and ends at the zero crossing of the sine wave. Essentially creates a gated sine wave. The resultant truncated sine wave is then applied to a filter – convolution.

 rect(n) x sin(n) = A(n)    →     A(n) * h(n) = Q(n)

Process B). The sine wave is convolved with the filter, and the rectangular function is convolved with the filter, and the result of the two outputs, are then multiplied together.

sin(n) * h(n) = B(n),       rect(n) * h(n) = C(n),    B(n) x C(n) = R(n)

The question is, is Q(n) = R(n) ?.

I used Octave to implement this, and they are not the same, but the errors are small, and visually the Process A output looks different to Process B output about the rectangular function discontinuities.

[Reason for asking this question : it has been claimed -

You have two input functions: 1) a sine 2) a boxcar function The product of the two gives you the gated sine. You present this to a steep linear phase filter. This filter then rings, not because of 1), but because of 2). 1) occupies a single spectral line,but 2) occupies an infinite spectrum. As the filter is a low-pass and linear phase it spreads function 2) to the left and to the right of the time interval it originally occupied. The sine itself is not affected by the filter because it resides entirely in the passband. So if you then cut out the sine part and join the two ringing parts then you are looking at the ringing as caused by a boxcar.]

Thanks and Regards, Code_X


1 Answer 1


In a nutshell, you are asking whether the following statement is true:

$$[x(n)\cdot y(n)] *h(n) = [x(n)*h(n)] \cdot [y(n)*h(n)]$$

In words, if the convolution operator is distributive with multiplication.

The short answer is no.

An easy example would be to think of two sequences $h(n)$ and $x(n)$ such that their convolution is $0 \ \forall n$ (if you can't think of any, check this out). We can see that in this case the right side of the equality given above would be $0$ no matter what $y(n)$ is, but the left one would not (at least not for all $y(n)$).

  • $\begingroup$ Thank you for the response - and answer. Can you further confirm that the statement i refer to at the end of my post, where the person states that it is the boxcar function that causes the filter ringing, and not the truncated sine, to be incorrect ?. (since this statement implies that the truncated sine somehow 'incorporates' the boxcar function). Thanks and regards, Code_X. $\endgroup$
    – Code_X
    Feb 20, 2018 at 15:46
  • $\begingroup$ @Code_X The truncated sine incorporates the boxcar function, the sine does not. So, your pal's assertion is incorrect in that the ringing is due to the truncated sine: it is meaningless to separate the two notions of the boxcar and the truncated sine as two different entities. The filter has no way of knowing whether the input, once it has begun, is going to end some time soon. What it does know is that input suddenly began instead of having been present since $-\infty$ and it starts ringing right away. Well, the filter did "begin" ringing at $-\infty$ but ... (continued) $\endgroup$ Feb 20, 2018 at 16:43
  • $\begingroup$ @Code_X (continued) ... the ringing died away before we got to any finite time instant, leaving only the steady-state answer of the sine being passed through the filter and producing the same sine, possibly with different amplitude and phase, at the output $\endgroup$ Feb 20, 2018 at 16:45
  • $\begingroup$ Hi Dilip, thanks. I have modelled different signals and all have different responses to the boxcar. So, empirically confirmed, and theoretically not possible for the boxcar to be the cause of the ringing since it is never applied to the filter input. The boxcar only "synthesises" the truncated sine. If i could up-vote you i would. Thanks and regards, Code_X. $\endgroup$
    – Code_X
    Feb 20, 2018 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.