# Autocorrelation and the dot product of complex signals

I have a question for the signal processing community.

When trying to calculate the autocorrelation of an array containing complex data, could the result be purely imaginary, and is there any significance to the imaginary part of the output.

The autocorrelation value at zero lag is a positive real number regardless of whether the sequence is real-valued or complex-valued, except in the trivial case of the sequence being the all-zeroes sequence when the autocorrelation value at zero lag also has value $$0$$, a triviality that I shall ignore forthwith. $$R_x(\tau)$$, the autocorrelation value for lag $$\tau$$ is the complex conjugate of $$R_x(-\tau)$$, the autocorrelation value for lag $$-\tau$$. So, to answer your questions,
1. $$R_x(\tau)$$ cannot be purely imaginary for all values of $$\tau$$: $$R_x(0)$$ is necessarily real and positive.
2. The imaginary part of $$R_x(\tau)$$ is an odd function of $$\tau$$ (and so has value $$0$$ at $$\tau=0$$). There is significance to the imaginary part of $$(R_x(\tau))$$; try to calculate its value in terms of the real and imaginary parts of the data $$x$$.
So does there exist a sequence $$x$$ for which $$R_x(0)$$ is real and positive and $$R_x(\tau)$$ is wholly imaginary when $$\tau \neq 0$$? Sure there is. Consider the length $$2$$ sequence $$x = [1 \quad j]$$ which has autocorrelation function values $$\begin{array}{rclcrcl} R_x(0) &=& \sum_k x_kx_k^* &=& 1\cdot 1 + j\cdot (-j) &=& 2\\ R_x(1) &=& \sum_k x_kx_{k+1}^* &=& 1\cdot (-j) &=& -j\\ R_x(-1) &=& \sum_k x_kx_{k-1}^* &=& j\cdot 1 &=& j\\ R_x(m) &=& & & & &0 ~~\text{if}~ |m|>1. \end{array}$$