Dimensionality reduction technique that projects data onto its highest-variance directions.
Principal Component Analysis (PCA) is a linear dimensionality reduction technique that transforms a dataset into a new coordinate system where the axes — called principal components — are ordered by the amount of variance they capture. By projecting data onto the top-k principal components, practitioners can represent high-dimensional data in a far more compact form while retaining the structure most relevant to downstream tasks. This makes PCA one of the most widely used preprocessing steps in machine learning pipelines.
Mechanically, PCA works by computing the covariance matrix of the centered data and then performing an eigendecomposition to find its eigenvectors and eigenvalues. The eigenvectors define the directions of maximum variance (the principal components), and the corresponding eigenvalues quantify how much variance each direction explains. Data is then projected onto the chosen subset of these eigenvectors. Equivalently, PCA can be computed via Singular Value Decomposition (SVD), which is numerically more stable and is the approach used in most modern implementations.
In machine learning, PCA serves several practical purposes. It reduces the computational cost of training models by shrinking the feature space, mitigates the curse of dimensionality, and can improve generalization by removing noisy or redundant features. It is also a standard tool for data visualization — projecting data onto two or three principal components allows practitioners to inspect cluster structure, outliers, and class separability in otherwise uninterpretable high-dimensional spaces. Applications span image compression, genomics, natural language processing, and anomaly detection.
Despite its utility, PCA has important limitations. It is strictly linear, meaning it cannot capture complex nonlinear structure in data — a gap addressed by methods like kernel PCA or autoencoders. It is also sensitive to feature scaling, requiring standardization before application, and the resulting components are often difficult to interpret in terms of the original features. Nevertheless, PCA remains a foundational technique in the machine learning practitioner's toolkit, valued for its simplicity, efficiency, and theoretical transparency.