Solved – Calculate first principal component direction and scores

covariancecovariance-matrixeigenvaluespca

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

enter image description here

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

Best Answer

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.

Related Question