Full lecture: http://bit.ly/PCA-alg
We can find the direction of the greatest variance in our data from the covariance matrix. It is the vector that does not rotate when we multiply it by the covariance matrix. Such vectors are called eigenvectors, and have corresponding eigenvalues. Eigenvectors that have the largest eigenvalues will be the principal components (new dimensions of our data).