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. Each coefficient vector is a unit vector. 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 n>=2 and p>=1, and let the rows of the n×p real matrix X be observations centered by subtracting each column mean. Put

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

The matrix C is the sample covariance matrix. If its eigenvectors v_j form an orthonormal set and its 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, when the total variance is positive, the fraction that it explains is

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

For an integer k with 1<=k<p, keeping only the first k 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. If each variable has positive sample variance, 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, Dimensionality Reduction, Eigenvalue, Eigenvector, Grand Tour, Multidimensional Scaling, Singular Value Decomposition, Tucker 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