Sample principal component (source code)

= Sample principal component

Let the columns of a centered <design matrix> $X\in\mathbb R^{n\times p}$ be variables and write $X^TX=V\Lambda V^T$ by the <spectral theorem for real symmetric matrices>. The columns $u_i$ of $U=XV$ are the sample principal-component score vectors. They satisfy $u_i^Tu_j=\Lambda_{ij}$, so distinct score vectors have zero <sample covariance> and $u_i$ has <sample variance> $\Lambda_{ii}/n$ under the divisor-$n$ convention.