How is PCA expressed as an eigen or SVD problem on the covariance matrix?

Quick Overview

Explain how principal component analysis reduces to an eigendecomposition of the covariance matrix and to the SVD of the centered data matrix. It tests the variance maximization derivation, the link between singular values and eigenvalues, projection onto the top components, and why the SVD route is more stable.

How is PCA expressed as an eigen or SVD problem on the covariance matrix?

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

You have a data matrix $X$ with $n$ samples and $d$ features. How is PCA expressed as an eigen or SVD problem on the covariance matrix? ```hint Start from the objective Write the variance of the data projected onto a unit vector $w$, then maximize it under the constraint that $w$ has length one. ``` ```hint Connect the two routes Substitute the SVD of the centered data into $X^\top X$ and simplify. ``` ### What a Strong Answer Covers - The optimization PCA solves and why its solution is an eigenvector of the covariance matrix - How the eigenvalues relate to the variance captured by each component - The link between the SVD of the centered data and the eigendecomposition of the covariance - How to project data onto the top components, and why the SVD route is preferred numerically - Preprocessing choices such as centering and scaling ### Follow-up Questions - Why must the data be centered, and what goes wrong if it is not? - When would you run PCA on the correlation matrix instead of the covariance matrix? - If $d$ is much larger than $n$, how would you compute the principal components efficiently? - How do you choose the number of components to keep?

Overview: Explain how principal component analysis reduces to an eigendecomposition of the covariance matrix and to the SVD of the centered data matrix. It tests the variance maximization derivation, the link between singular values and eigenvalues, projection onto the top components, and why the SVD route is more stable.

Nov 25, 2026
mediumData ScientistOtherStatistics & Math
0
0

You have a data matrix XX with nn samples and dd features. How is PCA expressed as an eigen or SVD problem on the covariance matrix?

What a Strong Answer Covers Guidance

  • The optimization PCA solves and why its solution is an eigenvector of the covariance matrix
  • How the eigenvalues relate to the variance captured by each component
  • The link between the SVD of the centered data and the eigendecomposition of the covariance
  • How to project data onto the top components, and why the SVD route is preferred numerically
  • Preprocessing choices such as centering and scaling

Follow-up Questions Guidance

  • Why must the data be centered, and what goes wrong if it is not?
  • When would you run PCA on the correlation matrix instead of the covariance matrix?
  • If dd is much larger than nn , how would you compute the principal components efficiently?
  • How do you choose the number of components to keep?