Till now I know correlation tells about similarity. I was watching a video lecture on image similarity in which I came to know that correlation is analogous to dot product. And hence correlation of two images is maximum when these images are similar as happens in dot product of two aligned(similar) vectors.
Dot product of two vectors $a=[a_1, a_2, a_3, .....]$ and $b=[b_1, b_2, b_3, .....]$ is given as $$a\cdot b=\sum_{i}a_ib_i$$ While cross correlation of two discrete real signals $x(n)$ and $y(n)$ is given as $$R_{xy}(n)=\sum_mx(m)y(n+m)$$
So now I want to know:
- How correlation is analogous to dot product?
- When is correlation maximum?
- Why?