Recently I came across an answer on Stackoverflow that uses matrix convolution (or vector convolution in this case). The answer says:
First we chose the second row (1,1) to be a kernel and then in order to get the next row we only need to convolve curent row with the kernel.
So convolution of the kernel with second row gives third row
[1 1]*[1 1] = [1 2 1], convolution with the third row gives fourth[1 2 1]*[1 1] = [1 3 3 1]and so on
I was interested in this and read a bit and some more, but it doesn't make sense to me yet. What exactly happens during a convolution of let's say two vectors? Why does [1 2 1]*[1 1] = [1 3 3 1]?
Moreover, the paper from Cornell I referenced gives this definition:
Let’s call our input vector f and our kernel g, and say that f has length n, and g has length m. The convolution f ∗ g of f and g is defined as: $$(f ∗ g)(i) = \sum_{j=1}^m g(j) · f(i − j + m/2)$$
But what is i in this case?
Think of convolution like a shifting dot product. For $[1 \ 1]\star[1 \ 1]$:
So the result is $[1 \ 2 \ 1]$.
Edit: The definition given is basically what I have above. $i$ is which element of the convolution you want to calculate, $j$ is the summation index going from 1 to $m$. The summation here is basically just the dot product of $g$ and a shifted $f$. Technically $f$ is reflected as well, but since all vectors in your problem are symmetric, it can be ignored.