# Eigenvalue vs Variance

I recently read that eigenvalue indicates the variance for an attribute/dimension. But is there a relation/equation between eigenvalue and variance? Is is right to say eigenvalue is equal to variance (but the direction can be different)?

I tried a simple example in R:

x= matrix(c(-1,2,2,2,2,-1,2,-1,2), 3, 3)
var (x)
eigen(x)


Variance was 3, 3, 3, eigenvalue was 3, 3, -3.

Can someone please explain me the relationship?

## 1 Answer

The eigenvalues of a covariance matrix are the variances in the independent coordinate frame. I.e, if there is a change of variables to rotate the covariance matrix to be aligned with the coordinate axes (so yes, the direction can be different), i.e., become a diagonal matrix, then these diagonal entries, which were the eigenvalues of the original covariance matrix, are its variances as well as its eigenvalues. Rotation preserves the eigenvalues.

Your sample matrix is not positive semi-definite, and hence is not a valid covariance matrix. Among other things, a covariance matrix can not have any negative entries on the diagonal, but yours does.

• Thanks. I get the concept now, but one question. In my example that matrix is the data. You said - "The eigenvalues of a covariance matrix are the variances in the independent coordinate frame". is it is right to say - if my data ( lets say it is 3X3) is a square matrix, then eigen-value will be the variance of that data? Aug 20, 2016 at 14:51
• Variances of 3,3,3 are the sample variance of each column of your data. The sample covariance of your data is matrix(c( 3,-1.5, -1.5,-1.5,3,-1.5,-1.5,-1.5,3), 3, 3) . Its eigenvalues are 4.5,4.5,0. So those eigenvalues are the variances of the sample covariance in the independent coordinate frame. Aug 20, 2016 at 15:17