1
$\begingroup$

I'm a software engineering, and I'm trying to learn principal components analysis.

I've read that as part of PCA, I need to compute a covariance matrix and then find the eigenvectors and eigenvalues of that matrix.

However, from my understanding, not all square matrices with real numbers have real eigenvectors. See this question "Do all square matrices have eigenvectors?".

Thus, how can a covariance matrix be guaranteed to have eigenvectors and eigenvalues? Could the eigenvectors have complex numbers (that wouldn't seem to be useful for PCA, I would guess)?

$\endgroup$
4

1 Answer 1

3
$\begingroup$

Let $A$ be an $n$-by-$n$ covariance matrix, which must be Hermitian or real symmetric if $A$ is real. It's simple to see that all eigenvalues of $A$ must be real. Suppose $\lambda$ is an eigenvalue of $A$. Then $Ax=\lambda x$ for some non-zero vector $x$. So clearly $x^*Ax=x^*\lambda x=\lambda \|x\|^2$. But since $A=A^*$, we also have $x^*Ax=x^*A^*x=\bar\lambda x^*x=\bar\lambda\|x\|^2$. Hence $\lambda=\bar\lambda$, i.e. it must be real.

The eigenvectors of $A$ (real symmetric) need not all be real. However, it's always possible find a real eigenvector for each eigenvalue of $A$. To see this, suppose $\lambda$ is an eigenvalue of $A$, i.e. $Ax=\lambda x$ or $(A-\lambda I)x=0$ for some non-zero $x$. We've shown that $\lambda$ must be real. This implies that $(A-\lambda I)$ is real and singular. Therefore, solving this real linear set of equations can definitely yield a real non-zero solution for $x$, which is an eigenvector of $A$ corresponding to $\lambda$. (Note that $jx$ is also an eigenvector of $A$ corresponding to $\lambda$, and it's not real.)

Alternatively, suppose $x=u+jv$ is a complex eigenvector of $A$ corresponding to $\lambda$. Then $Ax=\lambda x$ means $A(u+jv)=\lambda(u+jv)$, implying that $Au=\lambda u$ and $Av=\lambda v$, since $\lambda$ is real. So $u$ and $v$ are real eigenvectors of $A$ corresponding to $\lambda$, if they are non-zero. (They can't both be zero.)

In fact, stronger statements can be made. Using the above argument repeatedly in the Schur Triangularization process, we can further show that $A$ can be diagonalized by a real orthogonal matrix, i.e. $U^*AU=D$, where $U$ is real orthogonal and $D$ is real diagonal. So $U$ consists of $n$ real orthogonal eigenvectors of $A$, which diagonalize $A$ and also form a basis for $R^n$.

$\endgroup$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .