midPCA

How does PCA reduce dimensionality mathematically?

Updated May 17, 2026

Short answer

PCA projects data onto top-k eigenvectors of covariance matrix.

Deep explanation

PCA computes covariance matrix, performs eigen decomposition, selects top-k eigenvectors, and projects data onto this reduced basis. This minimizes reconstruction error in least squares sense.

Real-world example

Compressing image features for faster classification.

Common mistakes

  • Thinking PCA removes rows instead of transforming features.

Follow-up questions

  • What is reconstruction error?
  • Why top-k eigenvectors?

More PCA interview questions

View all →