# Principal Component Analysis (PCA)

> Squeezes many columns into a few new ones. It keeps as much of the spread as it can.

**Field:** Artificial Intelligence  
**Category:** Machine Learning  
**Also known as:** PCA, Principal Components

## Think of it like

It is like finding the best angle to take a photo of a crowd. You see the most from one side.

## Definition

Principal component analysis squeezes many columns into a few new ones. It looks for the direction in which the data spreads out most. That direction becomes the first new column. The second new column is the next biggest spread, at a right angle to the first. Keeping just a few keeps most of the story. It is used to draw data on a flat chart and to speed up other models.

## Example

Lucy has 50 survey answers per person. PCA turns them into 2 new columns. On a chart, the people now fall into three clear groups.

## Why it matters

Fewer columns train faster and are easier to see. Most of the useful pattern stays.

## Common mistake

Running it on columns with very different ranges. Scale them first, or the biggest numbers win.

## Three principles

- **Find the spread.** The direction where data varies most.
- **Keep a few.** Drop the directions that add little.
- **Scale first.** Big numbers would take over.

## Related terms

- [Dimensionality Reduction](https://learn.benibix.com/term/ai/dimensionality-reduction)
- [Feature Scaling](https://learn.benibix.com/term/ai/feature-scaling)
- [Unsupervised Learning](https://learn.benibix.com/term/ai/unsupervised-learning)
- [Clustering](https://learn.benibix.com/term/ai/clustering)
- [Variance](https://learn.benibix.com/term/general/variance)

## Taught in

- [Clustering and PCA](https://learn.benibix.com/learn/ai-machine-learning/clustering-and-pca): Machine Learning, 11/18

![A wide table with 50 columns is squeezed into a table with 2 columns. Beside it, the rows become dots on a flat chart, where similar rows sit close together.](https://learn.benibix.com/diagrams/ml-dimensionality-reduction.svg)

---

Source: https://learn.benibix.com/term/ai/principal-component-analysis
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
