# Calculate first principal component direction and scores

Given that x1 = (9, 9, −18)^T and x2 = (18, 9, 9)^T with eigendecomposition of its sample covariance matrix Σ = cov(X)

How do I calculate the first two principal component direction and the principal component scores of x1 and x2 corresponding to the first two principal component direction

The columns in the first matrix of the expansion corresponds to principal components of yours, corresponding to eigenvalues in the diagonal, in the same order. Note that they're unit norm, i.e. direction vectors. So, the first two largest eigenvectors, i.e. principal components, are the third and first ones; and the scores of $$x_i$$ are the dot products of $$x_i$$ with these components.
• I'm having trouble following this, because you seem to be asserting that the $x_i$ are eigenvectors of $\Sigma$--but they are not. – whuber Apr 26 '19 at 13:31