Why is sum of squares equal to eigenvalue in PCA? We fit a line or a hyperplane to a set of points. We project the points onto the hyperplane. The sum of squared distances of the projected points to origin is equal to the eigenvalue. Why is that?

Because that eigenvalue $\lambda_i$ is the variance of a zero-centred variable $\xi_i$, $\xi_i$ being the principal component score for the $i$ eigen-component. By definition the variance of a variable $X$ is $\text{Var}(X) = E[(X-E[X])^2]$. If $E[X]=0$, then $\text{Var}(X) = E[(X)^2]$ which is just the scaled sum of squares.
