Principal Component Analysis

Harvard EPS-210 | Interactive tutorial — Explore dimensionality reduction and variance maximization

Original Data with Principal Components

PC1
PC2
Mean

Projected Data (PC Space)

z = Wᵀ(x - μ)
Project centered data onto eigenvectors

Variance Explained (Scree Plot)

Reconstruction

x̂ = μ + Wz
Reconstruct from k principal components

Data Points

Click on the data canvas to add points

Visualization Options

Reconstruction

Reconstruction Error 0.00%

Principal Components

Statistics

Points
0
Total Var
--

Quick Examples

How it works: PCA finds orthogonal directions (principal components) that maximize variance. PC1 captures the most variance, PC2 the second most (perpendicular to PC1), etc. It's computed via eigendecomposition of the covariance matrix.