PCA -- principal component analysis formula issue

1k Views Asked by At

Here is the formula about PCA (maximize the projected variance). My confusion is how to derive from formula 12.2 to formula 12.3?

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

\begin{align} \left( \mathbf u_1^T \mathbf x_n - \mathbf u_1^T \bar{\mathbf x} \right)^2 &= \left( \mathbf u_1^T ( \mathbf x_n - \bar{\mathbf x} ) \right)^2 \\ &= \mathbf u_1^T ( \mathbf x_n - \bar{\mathbf x} ) \cdot \mathbf u_1^T ( \mathbf x_n - \bar{\mathbf x} ) \\ &= \mathbf u_1^T ( \mathbf x_n - \bar{\mathbf x} ) \cdot ( \mathbf x_n - \bar{\mathbf x} )^T \mathbf u_1 \\ &= \mathbf u_1^T \cdot \underbrace{( \mathbf x_n - \bar{\mathbf x} ) ( \mathbf x_n - \bar{\mathbf x} )^T}_{n\text{-th term of }\mathbf S} \cdot \mathbf u_1 \end{align}