25

Suppose $u$ is the vector that maximizes the variance of the projection of the data with design matrix $X$.

Now, I have seen materials that refer $u$ as the (first) principal component of the data, which is also the eigenvector with largest eigenvalue.

However, I have also seen that the principal component of the data is $X u$.

Obviously, $u$ and and $Xu$ are different things. Can anyone help me out here and tell me what is the difference between these two definitions of principal components?

amoeba
  • 93,463
  • 28
  • 275
  • 317
mynameisJEFF
  • 1,583
  • 4
  • 24
  • 29
  • Eigenvector u is the direction of the axis (values of u are the direction cosines relative the original axes). Xu is the data itself, the values of the principal component, the coordinates onto the aforementioned axis). – ttnphns Feb 27 '14 at 15:37

1 Answers1

32

You are absolutely correct in observing that even though $\mathbf{u}$ (one of the eigenvectors of the covariance matrix, e.g. the first one) and $\mathbf{X}\mathbf{u}$ (projection of the data onto the 1-dimensional subspace spanned by $\mathbf{u}$) are two different things, both of them are often called "principal component", sometimes even in the same text.

In most cases it is clear from the context what exactly is meant. In some rare cases, however, it can indeed be quite confusing, e.g. when some related techniques (such as sparse PCA or CCA) are discussed, where different directions $\mathbf{u}_i$ do not have to be orthogonal. In this case a statement like "components are orthogonal" has very different meanings depending on whether it refers to axes or projections.

I would advocate calling $\mathbf{u}$ a "principal axis" or a "principal direction", and $\mathbf{X}\mathbf{u}$ a "principal component".

I have also seen $\mathbf u$ called "principal component vector".

I should mention that the alternative convention is to call $\mathbf u$ "principal component" and $\mathbf{Xu}$ "principal component scores".

Summary of the two conventions:

$$\begin{array}{c|c|c} & \text{Convention 1} & \text{Convention 2} \\ \hline \mathbf u & \begin{cases}\text{principal axis}\\ \text{principal direction}\\ \text{principal component vector}\end{cases} & \text{principal component} \\ \mathbf{Xu} & \text{principal component} & \text{principal component scores} \end{array}$$


Note: Only eigenvectors of the covariance matrix corresponding to non-zero eigenvalues can be called principal directions/components. If the covariance matrix is low rank, it will have one or more zero eigenvalues; corresponding eigenvectors (and corresponding projections that are constant zero) should not be called principal directions/components. See some discussion in my answer here.

amoeba
  • 93,463
  • 28
  • 275
  • 317
  • 3
    Convention 2 should be outlawed. It has the capacity to create no end of confusion for beginners as it conflates basis vectors and components of data vectors with respect to the basis. – conjectures May 09 '17 at 11:53
  • 1
    what about the Loadings definition ? Are loadings the individual values of the eigenvector u ? – seralouk Mar 12 '18 at 16:23
  • @sera See https://stats.stackexchange.com/questions/143905 and https://stats.stackexchange.com/questions/125684 – amoeba Mar 12 '18 at 16:29
  • @amoeba thank you! one last question. In SVD, for X = USVh (Vh: V transposed) if the eigenvectors are the columns of U, then can I call Vh as loadings? – seralouk Mar 12 '18 at 17:11
  • @sera No. See https://stats.stackexchange.com/questions/134282 – amoeba Mar 12 '18 at 19:49
  • got it thank you so the columns of S Vh are principal components (or scores) in my case since I start with a matrix X of p×n size, where p is the number of variables and n is the number of samples – seralouk Mar 12 '18 at 20:13