Confusion on covariance matrix equation

293 Views Asked by At

I have read from wikipedia that the equation of Covariance matrix is as follows:

$$\Sigma_{i j}=\operatorname{cov}\left(X_{i}, X_{j}\right)=\mathrm{E}\left[\left(X_{i}-\mu_{i}\right)\left(X_{j}-\mu_{j}\right)\right]$$

But while reading the steps of PCA in various links and MATLAB codes etc, I encountered the covariance matrix again, but no expectation was found, like shown below (for eg. here):

$$\mathbf{A = (x_1 \space x_2 \space x_3 \dots x_N)}$$

and covariance matrix as $\mathbf{C} = \mathbf{A}\mathbf{A}^T$

How does the both matrices come equal? I am lost here. Please clarify my doubt.

UPDATE : OK when I thought again I can see here a link between correlation concept (from the covariance matrix) and dot product concept (in the matrix multiplication case). I know that correlation and inner product has some similarities. As far as I know correlation applies for random vectors and inner product for deterministic vectors. Please correct me if I am wrong? Even if what I told is correct, I am not satisfied. :(