Prove that covariance matrix is diagonal after PCA transformation

For $z=W^\mathbf{\intercal}(x-m)$ where $k$ columns of $W$ are the top $k$ principal components of a given dataset $x$ and $m$ is the mean, how can I prove that $z$ has diagonal covariance matrix?

Here $x$ is the original dataset ($d \times N$ dimensional matrix) and $m$ is the mean of $x$ ($1\times N$ dimensional matrix) and $k$ is a number less than $d$.

• I assume $X$ and $M$ are matrices? Perhaps a $k \times N$ matrix? Jan 9 '14 at 15:35
• This is a very sloppily formulated question; e.g. the expression $x-m$ doesn't really make sense as these are two matrices of different sizes. I edited to make it at least a bit less sloppy. Jan 13 '15 at 12:20

I think the columns of $W$ are eigenvectors of the covariance matrix.

$(x-m) \cdot (x-m)^T \cdot (w_1, w_2, ... w_k) = (\lambda_1w_1, \lambda_2w_2,...\lambda_kw_k)$

so,

$(w_1, w_2, ... w_k)^T \cdot (x-m) \cdot (x-m)^T \cdot (w_1, w_2, ... w_k)$

$= (w_1, w_2, ... w_k)^T \cdot(\lambda_1w_1, \lambda_2w_2,...\lambda_kw_k)$

$= diag[\lambda_1,\lambda_2,...\lambda_k]$

Since

$(x-m)^T \cdot (w_1, w_2, ... w_k) = ((w_1, w_2, ... w_k)^T \cdot (x-m))^T$,

$z = diag[\sqrt\lambda_1,\sqrt\lambda_2,...\sqrt\lambda_k]$

• can you please explain how you got the initial equation Jan 10 '14 at 8:06
• @user2907250 i used the formula of eigenvalues and eigenvectors: Ax=lambdax en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors Jan 10 '14 at 12:37