Principal component analysis is the oldest tool still doing serious work inside modern AI. It was published in 1901, long before computers, and it still sits under parts of how embeddings are compressed, how fine-tuning methods like LoRA are justified, and how researchers squint at high-dimensional model internals.
The idea takes one sentence. If your data lives in many dimensions but mostly moves along a few of them, find those directions, keep them, and throw away the rest.
The geometry of the trick
Karl Pearson described PCA as a fitting problem. You have a cloud of points in space, perhaps thousands of points, each measured on dozens of variables. The cloud is not a sphere. It is usually stretched, like a rugby ball, and often stretched more along one axis than another. Pearson asked for the line, and then the plane, that passes as close as possible to every point at once ("On Lines and Planes of Closest Fit to Systems of Points in Space", Philosophical Magazine, 1901).
That line is the first principal component. The plane is the first two. Mathematically, the first component is the direction along which the data varies the most, and the second is the direction of next-greatest variance that stands at right angles to the first. You are not selecting columns of your data. You are rotating the coordinate system so the important structure lines up with the axes, then dropping the axes that barely move.
Harold Hotelling turned Pearson's geometry into a working statistical method and gave it the name in 1933, in the Journal of Educational Psychology. His motivation was test scores: if students take many correlated exams, a handful of underlying components can explain most of the differences between them. The 1936 Eckart-Young theorem supplied the justification that keeps PCA respectable: the best low-rank approximation of a data matrix, in the least-squares sense, is exactly the truncated singular value decomposition, which is what PCA computes.

What it actually computes
Strip the notation and PCA is three steps. Center the data by subtracting the mean of every variable. Measure how the variables covary, which packs all the pairwise relationships into one symmetric matrix. Eigen-decompose that covariance matrix; the eigenvectors are the principal directions and the eigenvalues say how much variance each one holds. In practice nobody forms the covariance matrix; solvers run a singular value decomposition on the data itself, which yields the same answer with better numerical behavior, and for big matrices randomized methods make it cheap.
The output is two things: a rotation, and a variance table. The variance table is the part anyone quotes. "The first 50 components explain 90 percent of the variance" is a claim that the rugby ball is thin, and that you can live in 50 dimensions instead of thousands with little loss.
That claim does more work in machine learning than almost anywhere else, because learned representations turn out to be squishable in exactly this sense.
Why LLMs made an old tool current again
Embedding models are the clearest case. Retrieval systems store one 768- to 3072-dimensional vector per passage, and millions of vectors get expensive. A 2023 analysis by Ma and colleagues, summarized in the PCA-RAG paper, found that a 768-dimensional DPR embedding holds about 99 percent of its variance and mutual information in the first 256 dimensions. An August 2026 benchmark by Dylan Castillo went further: truncating OpenAI's Matryoshka embeddings to 32 dimensions kept 46 percent of quality, while a PCA rotation before truncation kept 65 percent, because Matryoshka models train their information into the first coordinates, and PCA redistributes it into descending variance order first.
Model internals are another case. A FAR.AI experiment passed sentences through LLMs, ran PCA on the embeddings, and found that the first principal component alone could classify statements about human wellbeing at 73.7 percent accuracy in a paired-sentence setting, with no training on the model at all. The same rotation trick shows up across interpretability work, where the first few components of an activation cloud separate topics, languages, or sentiment before any probe is trained.
The justification for two popular efficiency methods is also a variance argument. LoRA, the standard fine-tuning method that trains small low-rank matrices instead of full weights, rests on the hypothesis that task adaptation has low intrinsic rank (Hu et al., 2021). DeepSeek's multi-head latent attention compresses every token's key-value cache through a low-dimensional vector, which is PCA's premise applied to serving economics: the KV data mostly lives in a subspace, so store the subspace (DeepSeek-V2 technical report, 2024). More broadly, the intrinsic-dimension literature finds that natural image datasets sit far below their pixel dimension and that lower measured dimension makes datasets easier to learn (Pope et al., arXiv 2104.08894). The whole low-rank era in model engineering, from Eigenwords and latent semantic analysis onward, is applied belief in principal components.

Where PCA breaks
Three caveats keep it honest.
PCA is linear. It finds flat planes through curved structure. Kernel PCA and manifold methods exist because the world of learned representations is rarely flat.
Variance is not meaning. The biggest-variance direction in a word-embedding space turns out to track frequency and other artifacts, which is why Mu and Viswanath showed in 2018 that deleting the mean vector and the top principal components makes word embeddings better at similarity tasks, not worse. The first component is what varies most, not what matters most. And PCA has no labels and no task; it compresses everything the same way whether or not the information your application needs sits in the top components.
The rotation destroys interpretability by design. A principal component is a weighted combination of every original variable. In genomics, finance, and NLP, people who need to explain results often factor first and translate back afterward, which is extra work PCA does not do for you.
The takeaway
PCA answers one question precisely: in which directions does this data actually move? A century after Pearson fitted lines to point clouds by hand, that question still structures the argument behind embedding compression, low-rank fine-tuning, and half the scatter plots in interpretability papers. It is cheap, optimal within its class, and blind to what you care about. Knowing which of those three properties is doing the work in any given pipeline is the difference between using PCA well and quoting its variance table.
Sources
- Karl Pearson, "On Lines and Planes of Closest Fit to Systems of Points in Space", Philosophical Magazine, 1901. https://www.tandfonline.com/doi/abs/10.1080/14786440109462720
- Harold Hotelling, "Analysis of a complex of statistical variables into principal components", Journal of Educational Psychology, 1933. https://psycnet.apa.org/record/1934-00645-001
- Carl Eckart and Gale Young, "The approximation of one matrix by another of lower rank", Psychometrika, 1936. https://link.springer.com/article/10.1007/BF02288367
- Scott Deerwester et al., "Indexing by latent semantic analysis", Journal of the American Society for Information Science, 1990. https://asistdl.onlinelibrary.wiley.com/doi/10.1002/(SICI)1097-4571(199009)41:6%3C391::AID-ASI1%3E3.0.CO;2-9
- Paramveer Dhillon, Dean Foster, Lyle Ungar, "Eigenwords: Spectral Word Embeddings", JMLR, 2015. https://jmlr.org/papers/v16/dhillon15a.html
- Phillip Pope et al., "The Intrinsic Dimension of Images and Its Impact on Learning", arXiv:2104.08894. https://arxiv.org/abs/2104.08894
- "PCA-RAG: Principal Component Analysis for Efficient Retrieval-Augmented Generation", arXiv:2504.08386 (cites Ma et al. on DPR embedding variance). https://arxiv.org/abs/2504.08386
- Dylan Castillo, "Honey, I shrunk the embeddings: Matryoshka vs. PCA", August 2026. https://dylancastillo.co/posts/matryoshka-vs-pca.html
- FAR.AI, "Uncovering Latent Human Wellbeing in LLM Embeddings". https://www.far.ai/blog/uncovering-latent-human-wellbeing-in-llm-embeddings
- Edward J. Hu et al., "LoRA: Low-Rank Adaptation of Large Language Models", arXiv:2106.09685. https://arxiv.org/abs/2106.09685
- DeepSeek-AI, "DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model", arXiv:2405.04434. https://arxiv.org/abs/2405.04434
- Jiaqi Mu and Pramod Viswanath, "All-but-the-Top: Simple and Effective Postprocessing for Word Representations", ICLR 2018. https://openreview.net/forum?id=HkuGJ3kCb
