# Cross Correlation

The cross-correlation function is defined as follows if $\bar{f}$ is the complex conjugate of $f$ and we assume that $f$ is real, such that $\bar{f} = f$.

\begin{align} f \star g &= \int_{-\infty}^{\infty} \overline{f(\tau)} g(t + \tau) d\tau \\ &= \int_{-\infty}^{\infty} f(\tau) g(t + \tau) d\tau \\ \end{align}

Now, here is convolution function

\begin{align} f * g = \int_{-\infty}^{\infty} f(\tau) g(t - \tau) d\tau \end{align}

So as $t$ increases, we can imagine that in convolution, $g$ moves from left to right on the $\tau$ axis. However, in cross-correlation, g moves from right to left, which is counterintuitive.

Am I correct in my interpretation? If so, why is this? Is it just a mathematical quirk or is there some deeper meaning?

-
While "$g$ moves from left to right" in convolutions, remember that it is also "flipped over". Convolutions and correlations are related: in terms of Fourier transforms, convolutions correspond to multiplication $F(\omega)G(\omega)$ in the transform domain while correlations correspond to inner product type calculation $F^*(\omega)G(\omega)$. – Dilip Sarwate Mar 19 '12 at 18:00