I understand what books states about cross-correlation of signals and their mathematical representation:

For continuous functions f and g, the cross-correlation is defined as:

$(f \star g)(\tau)\ \stackrel{\mathrm{def}}{=} \int_{-\infty}^{\infty} f^*(t)\ g(t+\tau)\,dt$,

where $f*$ denotes the complex conjugate of $f$ and $\tau$ is the time lag.

Similarly, for discrete functions, the cross-correlation is defined as:

$(f \star g)[n]\ \stackrel{\mathrm{def}}{=} \sum_{m=-\infty}^{\infty} f^*[m]\ g[m+n]$

So I understand that for CT we always should do Integral and weighted sum for discrete functions. Am I correct in my understanding?

But my question is why we need to do signal samples multiplication to find cross-correlation - I mean how it is different from addition of samples or rather when we should do addition / multiplication of signals samples and what would it mean?

  • $\begingroup$ You have two function values, and you need to do something with them: add, subtract, multiply, divide, exponentiate, square-and-then-add, conjugate-one-and-then-multiply-by-the-other, etc. Many people found that this last thing gave useful results and so the definition of cross-correlation that you have given was adopted by consensus. If you don't like it, go ahead and create a different definition and urge people to use your definition. If your definition has useful properties, they may come around to your point of view. If the properties are not useful, they won't. $\endgroup$ Aug 14, 2014 at 8:22
  • 1
    $\begingroup$ No @DilipSarwate that's not my point - my point is in what way does signal multiplication result sequence differs that of with signal addition. We know what addition / multiplication means and when to use them . We don't do addition when multiplication is required or reverse.As such does signal multiplication result sequence means - multiplying the area of one signal covered (if represented graphically) to other and addition means adding them? $\endgroup$
    – user10810
    Aug 14, 2014 at 9:08

1 Answer 1


I am not entirely sure if I understood your question, so this might be completely irrelevant.

Why do we need to multiply and shift the signal samples: The objective of the cross-correlation operation between signal $x$ and signal $y$ is to find how well they correlate (resemble each other) and when they correlate the best. In other words, if $y$ is a delayed version of $x$ as in: $y = x(t - d)$, where $d$ is a positive time delay, then $y$ would appear identical to $x$ if $y$ was shifted by $d$ seconds to the left on the time axis.

What if we have no prior knowledge of the value of $d$? An approach would be to take $y$ and shift it by an amount $\tau$ to the left on the time axis. If we try this operation for an infinite range of $\tau$ values, would you agree with me that, at $\tau$ == $d$, the shifted $y$ signal would appear identical to the $x$ signal? That is more or less the justification for shifting the samples.

Now consider a signal $z$ given by $z = Ax(t-d)$, where $A$ is a scalar. $z$ is a scaled, and time-delayed version of $x$. During the shifting by $\tau$ operation in the previous paragraph, if you were to take the difference/sum of $z$ and $x$, the outcome would not be very informative if $A$ were very large. e.g if $A$ = 1000, the output difference/sum $R$ would not vary significantly over the range of possible $\tau$. What I mean is that $R$ would appear mostly flat, and you would not be able to figure out the value of the time delay $d$.

If you were to use division instead, how would you deal with the divisor signal being 0 sometimes? i.e. division by zero?

Multiplication is the best option, since relative amplitudes do not affect the results too much. You'll then get a peak in the cross-correlation output which will signify the time delay $d$.

I hope this answers your question.

  • $\begingroup$ Thanks for your response, but can you please let me know whether the difference of two integral values obtained by multiplying the two functions in first equation or adding would mean area multiplication of two functions if integrated separately (similarly for addition)? $\endgroup$
    – Programmer
    Aug 14, 2014 at 10:17
  • 1
    $\begingroup$ @Prakash I'm sorry, can you explain your question more clearly? I can't understand what you mean. $\endgroup$
    – AshivD
    Aug 14, 2014 at 10:39
  • $\begingroup$ I am not so good in Integration - will ∫f(t) * g(t)dt be equal to ∫f(t)dt * ∫g(t)dt? Similarly will ∫f(t) + g(t)dt be equal to ∫f(t)dt + ∫g(t)dt - meaning area under f(t) and g(t) are multiplied or added accordingly to get the result? $\endgroup$
    – Programmer
    Aug 14, 2014 at 10:45
  • $\begingroup$ "will ∫f(t) * g(t)dt be equal to ∫f(t)dt * ∫g(t)dt? Similarly will ∫f(t) + g(t)dt be equal to ∫f(t)dt + ∫g(t)dt?" The answers are NO and YES. $\endgroup$ Sep 13, 2014 at 14:06
  • $\begingroup$ If the answer was satisfactory, consider marking it as accepted. $\endgroup$
    – AshivD
    Oct 6, 2014 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.