# Does Function to Function Multiplication and Convolution, Follow Laws of Convolution

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

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.

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)$).
• @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) – Dilip Sarwate Feb 20 '18 at 16:43