TOPICS
Search

Principal Component Analysis


Principal component analysis (PCA) is a method for replacing a collection of possibly correlated variables by uncorrelated linear combinations called principal components. The components are ordered so that the first accounts for the greatest possible variance, the second accounts for the greatest remaining variance subject to being orthogonal to the first, and so on.

Let the rows of the n×p matrix X be centered observations and let

 C=1/(n-1)X^TX.
(1)

The matrix C is the sample covariance matrix. If its orthonormal eigenvectors v_j and eigenvalues lambda_j are ordered so that

Cv_j=lambda_jv_j
(2)
lambda_1>=lambda_2>=...>=lambda_p>=0.
(3)

then the jth principal-component score of the ith observation is

 z_(ij)=x_i^Tv_j.
(4)

The variance of the jth component is lambda_j, and the fraction of total variance that it explains is

 (lambda_j)/(lambda_1+lambda_2+...+lambda_p).
(5)

Keeping only the first k<p components gives a lower-dimensional representation that maximizes retained variance and, equivalently, minimizes the sum of squared orthogonal reconstruction errors among k-dimensional linear subspaces. PCA can also be performed on standardized variables using their correlation matrix instead of their covariance matrix. The method originated with Pearson's closest-fitting subspaces and was developed and named by Hotelling (Pearson 1901, Hotelling 1933).


See also

Covariance Matrix, Eigenvalue, Eigenvector, Multidimensional Scaling, Singular Value Decomposition, Variance

Explore with Wolfram|Alpha

References

Hotelling, H. "Analysis of a Complex of Statistical Variables into Principal Components." J. Educ. Psych. 24, 417-441 and 498-520, 1933. https://doi.org/10.1037/h0071325. https://doi.org/10.1037/h0070888.Jolliffe, I. T. Principal Component Analysis, 2nd ed. New York: Springer-Verlag, 2002.Pearson, K. "On Lines and Planes of Closest Fit to Systems of Points in Space." Phil. Mag. 2, 559-572, 1901. https://doi.org/10.1080/14786440109462720.

Cite this as:

Weisstein, Eric W. "Principal Component Analysis." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/PrincipalComponentAnalysis.html

Subject classifications