Connect SVD to PCA

Problem

For the centered matrix

X=[2001−200−1],X=\begin{bmatrix}2&0\\0&1\\-2&0\\0&-1\end{bmatrix},

compute XTXX^{\mathsf T}X, the singular values, the first PCA direction, and the first-component explained-variance fraction.

Reveal answer or reference solution

The Gram matrix is

XTX=[8002],X^{\mathsf T}X=\begin{bmatrix}8&0\\0&2\end{bmatrix},

so the singular values are 8=22\sqrt{8}=2\sqrt{2} and 2\sqrt{2}. The right singular vector for the larger value is (1,0)(1,0), up to sign, and is the first PCA direction. The explained fraction is

88+2=45.\frac{8}{8+2}=\frac{4}{5}.
Outcome

Previous attempts

Loading attempts saved in this browser…

    Review Screening Results