TITLE: Why is the eigenvector of a covariance matrix equal to a principal component?
QUESTION [141 upvotes]: If I have a covariance matrix for a data set and I multiply it times one of it's eigenvectors.  Let's say the eigenvector with the highest eigenvalue.  The result is the eigenvector or a scaled version of the eigenvector.  
What does this really tell me?  Why is this the principal component?  What property makes it a principal component?  Geometrically, I understand that the principal component (eigenvector) will be sloped at the general slope of the data (loosely speaking).  Again, can someone help understand why this happens?

REPLY [11 votes]: If we would project our data $D$ onto any vector $\vec{v}$, this data would be obtained as $\vec{v}^{\intercal} D$, and its covariance matrix then becomes $\vec{v}^{\intercal} \Sigma \vec{v}$. 
Since the largest eigenvector is the vector that points into the direction of the largest spread of the original data, the vector $\vec{v}$ that points into this direction can be found by choosing the components of the resulting covariance matrix such that the covariance matrix $\vec{v}^{\intercal} \Sigma \vec{v}$ of the projected data is as large as possible.
Maximizing any function of the form $\vec{v}^{\intercal} \Sigma \vec{v}$ with respect to $\vec{v}$, where $\vec{v}$ is a normalized unit vector, can be formulated as a so called Rayleigh Quotient. The maximum of such a Rayleigh Quotient is obtained by setting $\vec{v}$ equal to the largest eigenvector of matrix $\Sigma$.
In other words; the largest eigenvector of $\Sigma$ corresponds to the principal component of the data.
If the covariances are zero, then the eigenvalues are equal to the variances:

If the covariance matrix not diagonal, the eigenvalues represent the variance along the principal components, whereas the covariance matrix still operates along the axes:

An in-depth discussion (and the source of the above images) of how the covariance matrix can be interpreted from a geometrical point of view can be found here: http://www.visiondummy.com/2014/04/geometric-interpretation-covariance-matrix/