# Not showing the right set of linearly independent eigenvectors

I am using matlab R2013a.

Consider the matrix $$A=\begin{bmatrix} 0 & 1 & 1 & 1 & 0\\ 0 & 0 & 0 & 0 & 1\\ 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0\end{bmatrix}.$$ Clearly, it's rank is 2; so nulity is 3. But while computing all its eigenvectors, it's showing as if it has only one linearly independent eigenvector. Theoretically, it has $$\begin{pmatrix} 1\\0\\0\\0\\0\end{pmatrix}, \begin{pmatrix}0\\1\\-1\\0\\0\end{pmatrix}\text{ and } \begin{pmatrix}0\\1\\0\\-1\\0\end{pmatrix}$$ as three linearly independent eigenvectors corresponding to the $0$ eigenvalue.

So why is it so with the command [vA,d]=eig(A)?

Where is the mistake? Or

Whether matlab is showing wrong result here?

• @Moo Yes. I mean the right eigenvectors only. – G_0_pi_i_e Jul 21 '17 at 13:07

I'm not sure what happens here but if you use null(mA) and svd(mA) results seems to be more reasonable.