# Choice of Principal Components in PCA

For computing PCA of $X$, do we use the eigenvectors of covariance matrix $X^TX$, or the eigenvectors of kernel matrix $XX^T$ as the principal components?

I am really confused, because seen both used.

-

## 1 Answer

Basically, PCA is to find the vectors that can diagonalize the covariance matrix, so you need to find the eigenvectors of the covariance matrix, which are the principle components. In you case, the principle components are also the right singular vectors of the data matrix $X$ where each column corresponds to a random variable, so you can use the SVD to compute them.

-
I think my confusion comes from the difference between principal directions and principal components. I think the first is the low dimensional basis, and the second is the coefficients of data points under that basis. Is that right? –  user25004 Aug 21 '13 at 18:14