# Calculating Eigenvectors: Is my book wrong?

I have a covariance matrix: $$S= \begin{pmatrix} 16 & 10 \\ 10 & 25 \end{pmatrix}$$

I calculate my eigenvalues correctly (the same as what the book finds);

$\lambda_1 = 31.47$ , $\lambda_2 = 9.53$

But now it comes to calculating eigenvectors: I do everything as I was taught way back in Elementary Linear Algebra.

1. $S X = \lambda v$ {where v is the eigenvector}

2. $(S - I \lambda)v$

3. Get Row-Echelon Form

But when I do this I get the following reduced matrix:

$$\begin{pmatrix} 1 & -.646412 & 0 \\ 0 & 0 &0 \end{pmatrix}$$

But this result doesn't seem consistent with my textbook which says that the eigenvectors are;

$(0.54 , 0.84)^T$ and $(0.84 , -0.54)$

I looked online for calculators and found one consistent with the book and a few consistent with my result:

Consistent with Book: http://comnuan.com/cmnn01002/

Consistent with Me: http://www.arndt-bruenner.de/mathe/scripts/engl_eigenwert2.htm

Any ideas?

• This problem stems from Principal Component Analysis
• $(0.54,0.84) = (9,14) \cdot 0.06,$ and $9/14 \approx 0.642857\ldots,$ so I wonder if you get $0.646412$ by rounding too early, before dividing. Maybe your reduced matrix should have been $\left[ \begin{array}{ccc} 1 & -0.642857\ldots & 0 \\ 0 & 0 & 0 \end{array} \right],$ which would be consistent with the answer being $(0.54,0.84). \qquad$ – Michael Hardy Nov 24 '17 at 19:10
• Specifically, how did you get $-0.646412\text{ ?} \qquad$ – Michael Hardy Nov 24 '17 at 19:12
• I answered your question in the answers section. You were right that I rounded early. – Nicklovn Nov 24 '17 at 19:15
• The textbook has normalized the eigenvectors so that the change-of-basis matrix is orthogonal. Remember, there’s no such thing as the eigenvector(s): any non-zero scalar multiple of an eigenvector is also an eigenvector. – amd Nov 25 '17 at 0:08

TLDR: The answers are the same.

The vectors $(0.646586,1)$ and $(0.54,0.84)$ go in (almost) the same direction (the only differences due to rounding and the magnitude of the vector). The first has the benefit of one of the entries equalling one. The second has the benefit that its magnitude is (almost) $1$, but they both give essentially the same information.

Remember that an eigenvector for a specific eigenvalue $\lambda$ is any vector such that $Av=\lambda v$ and these vectors collectively make up an entire subspace of your vector space, referred to as the eigenspace for the eigenvector $\lambda$. In the problem of determining eigenvalues and corresponding eigenvectors, you need only find some collection of eigenvectors such that they form a basis for each corresponding eigenspace. There are infinitely many correct choices for such eigenvectors.

Eigenvector is not unique.

Notice that non-zero scalar multiple of an eigenvector is still an eigenvector.

Both answers are correct. The eigen vector you computed does not have unity norm. If you normalize your eigen vector then you will get the text-book answer.

$(0.54,0.84) = (9,14) \cdot 0.06,$ and $9/14 \approx 0.642857\ldots,$ so I wonder if you get $0.646412$ by rounding too early, before dividing. Maybe your reduced matrix should have been $\left[ \begin{array}{ccc} 1 & -0.642857\ldots & 0 \\ 0 & 0 & 0 \end{array} \right],$ which would be consistent with the answer being $(0.54,0.84).$

• Yes I admit that I rounded early. What happened is that I calculated the eigenvalues a few days ago but I lost that paper and just went with the eigenvalues listed in the book (theirs being rounded already). But I was informed that I had only to normalize the vector I had calculated to get the textbook answer. – Nicklovn Nov 24 '17 at 19:14
• @Nicklovn : This is one respect in which elementary arithmetic gets far less respect than it deserves. People round without knowing to what extent or in what way the bottom line will be affected, and then they write six or eight or ten digits in their bottom-line answer when the early rounding has the effect that only perhaps the first one or two are truthful and the rest of meaningless noise. – Michael Hardy Nov 24 '17 at 19:22
• I agree. I was doing well with it at first but when I got frustrated and lost my sheet I just relied on what the book gave me which was naturally rounded :( Thanks for your help! – Nicklovn Nov 25 '17 at 21:30
• @Nicklovn : I'm glad it helped. – Michael Hardy Nov 25 '17 at 23:19