Why would one eigenvalue correspond to multiple eigenvectors?

Solution 1:

Note: Those aren't the eigenvectors, nor is that the eigenvalue. The correct eigenvalue is $1$, the correct eigenvector (here there really should only be one) is $\begin{bmatrix}1\\1\end{bmatrix}$.

Matrices can have more than one eigenvector sharing the same eigenvalue. The converse statement, that an eigenvector can have more than one eigenvalue, is not true, which you can see from the definition of an eigenvector.

However, there's nothing in the definition that stops us having multiple eigenvectors with the same eigenvalue. For example, the matrix $\begin{bmatrix}1&0\\0&1\end{bmatrix}$ has two distinct eigenvectors, $[1, 0]$ and $[0, 1]$, each with an eigenvalue of $1$. (In fact, every possible vector is an eigenvector, with eigenvalue $1$.)

Normally, if there is only one eigenvector corresponding to an eigenvalue of multiplicity greater than one, mathematically we would just say there is only one eigenvector. However, it seems like your checking program has some quirks which make it want to say there are two, so it just gave you a scalar multiple of the first vector.

Solution 2:

Mathematica does not behave this way, but apparently Matlab does. Because algebraic multiplicity is 2, it wants to output two eigenvectors; but there's only one linearly independent one, so it puts a scalar multiple as the second. What does it give you if you try the matrix $$\begin{bmatrix} 0&4&-1\\-1&4&-1\\-2&5&-1\end{bmatrix}?$$