I understand that, given a normalised data matrix $X$, the PCA algorithm can be formulated as maximisation problem where objective function is:
$$ \max_{{\omega}} \omega'X'X\omega \quad\quad \text{ such that } \quad\quad \omega'\omega = 1.$$
Or, alternatively, as a minimisation problem with objective function:
$$ \min_{\omega} ||X - X\omega\omega'||^2 \quad\quad \text{ such that } \quad\quad \omega'\omega = 1.$$
How are these two equivalent?