1 of 5

# MATL, 19 bytes

PiYdt"TF2&YStpsw]xx


Try it online!

This errors when one of the inputs is empty (but produces the correct output, which is nothing).

### Explanation

This builds a block-diagonal matrix with the two inputs, reversing the first. For example, with inputs [1 4 3 5], [1 3 2] the matrix is

[ 5 3 4 1 0 0 0
0 0 0 0 1 3 2 ]


Each entry of the convolution is obtained by shifting the second row one position to the left (padding with zeros from the right), computing the product of each column, and summing all results. For example, the first result is obtained from the shifted matrix

[ 5 3 4 1 0 0 0
0 0 0 1 3 2 0 ]


and is thus 1*1 == 1. The second is obtained from

[ 5 3 4 1 0 0 0
0 0 1 3 2 0 0 ]


and is thus 4*1+1*3 == 7, etc. This must be done m+n+1 times, where m and n are the input lengths. The code uses a loop with m+n iterations (which saves some bytes) and discards the last result.