Second Principal Component Analysis Proof I'm trying to prove that the 2 principal components are the 2 eigenvectors corresponding to biggest eigenvalues.
So I'm in stage where I need to maximize: 
$$\sum_{i=1}^{i=n} \lambda_i\alpha_i^2 + \sum_{i=1}^{i=n} \lambda_i\beta_i^2$$
Where $\lambda_1 \geq \lambda_2 \geq \cdots \geq\lambda_m$ are known eigenvalues. And the optimization is under the constraints:
$$\sum_{i=1}^{i=n}\alpha_i^2 = \sum_{i=1}^{i=n} \beta_i^2 = 1,\  \sum_{i=1}^{i=n} \alpha_i\beta_i=0$$
How can I continue from here?
 A: Let $\alpha = (\alpha_1, \alpha_2, \dots, \alpha_n) \in \mathbb{R}^n$ and $\beta = (\beta_1, \beta_2, \dots, \beta_n) \in \mathbb{R}^n$. The constraints are then $\|\alpha\|_2^2 = \|\beta\|_2^2 = 1$ and $\langle \alpha, \beta \rangle = 0$.
The first step is to show that $\alpha_i^2 + \beta_i^2 \leq 1$ for all $i$. Let $e_i = (0, \dots , 0, 1, 0, \dots , 0)$ be the $i$-th standard basis vector. Since $\alpha$ and $\beta$ are orthogonal, the projection of $e_i$ onto $\operatorname{span}\{\alpha, \beta \}$ is given by
$$\hat{e}_i = \langle e_i, \alpha \rangle \alpha + \langle e_i, \beta \rangle \beta = \alpha_i \alpha + \beta_i \beta .$$
Then
$$ \alpha_i^2 + \beta_i^2 = \|\hat{e_i}\|_2^2 \leq \|e_i\|_2^2 = 1 $$
since a projected vector always has length less than or equal to the original vector.
The second step is to observe that $\sum_{i=1}^n (\alpha_i^2 + \beta_i^2) = \|\alpha \|_2^2 + \|\beta \|_2^2 = 2$.
Finally we want to maximize 
$$ \sum_{i=1}^n \lambda_i(\alpha_i^2 + \beta_i^2) $$
and we know that
$$\alpha_i^2 + \beta_i^2 \leq 1 \text{ and } \sum_{i=1}^n(\alpha_i^2 + \beta_i^2) = 2 .$$
The sum $\sum_{i=1}^n \lambda_i(\alpha_i^2 + \beta_i^2)$ is maximized when when the first and second coefficient are as large as possible, i.e. when $\alpha_1^2 + \beta_1^2 = \alpha_2^2 + \beta_2^2 = 1$. But then the second condition implies that $\alpha_i^2 + \beta_i^2 = 0$ for $i > 2$. Thus
$$ \sum_{i=1}^n \lambda_i(\alpha_i^2 + \beta_i^2) \leq \lambda_1 + \lambda_2.$$
This bound can be attained by setting $\alpha = (1, 0 \dots, 0)$ and $\beta = (0, 1, 0, \dots , 0)$.
