# “A dominant eigenvalue of a non-negative matrix has a non-negative eigenvector”

I have the non-negative 3x3 matrix $A = \begin{bmatrix} 1 & 0 & 0 \\ 2 & 4 & 1 \\ 3 & 2 & 1 \end{bmatrix}$. I've calculated the eigenvalues of this matrix, $\lambda_{1,2} = \frac{5\pm \sqrt{17}}{2}, \lambda_{3} = 1$. Matlab confirms these values. This means $\frac{5 + \sqrt{17}}{2}$ would be the dominant eigenvalue $\lambda^{\star}$ (highest absolute value of all eigenvalues). When I compute the corresponding dominant eigenvector, I find $c\begin{bmatrix} 0 \\ 1 \\ \frac{3-\sqrt{17}}{2} \end{bmatrix}$. This contradicts "the dominant eigenvalue of a non-negative matrix has a non negative dominant eigenvector".

What am I doing wrong?

• Your eigenvector is wrong. See this. – Git Gud Nov 3 '13 at 12:45
• Matlab says $x= [0, 0.8719, 0.4896]$ is a dominant eigenvector. You can confirm by comparing $Ax$ with $\frac{5+\sqrt{17}}{2}x$ – JessicaK Nov 3 '13 at 12:47
• Thank you both! Dumb mistake that I made. Is there a specific function regarding the dominant eigenvector in matlab? – Max Nov 3 '13 at 12:51
• @Max You can just write [V D] = eig(A) and read the column of V corresponding to the column containing the largest eigenvalue in D. If you are only interested in the dominant eigenvalue, you can use the power method, which is only a few lines of code. – JessicaK Nov 4 '13 at 3:45