MatLab returns eigenvectors/generalized eigenvectors that do not match an example on Wikipedia?

284 Views Asked by At

On the Wikipedia page on generalized eigenvectors it uses the example of a matrix $A$ given by $$ A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, $$ and says that this matrix has a repeated eigenvalue of $1$ with multiplicity $2$, and that the eigenvector $v_1$ and generalized eigenvector $v_2$ are given by $$ v_1 = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \quad v_2 = \begin{pmatrix} a \\ 1 \end{pmatrix}, $$ where $a$ can be any scalar. However when I create this matrix in MatLab and use $\texttt{eig}$ to find its eigenvalues and eigenvectors I get the repeated eigenvalue of $1$ but the eigenvectors/generalized eigenvector it gives me are $$ v_1 = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \quad v_2 = \begin{pmatrix} -1 \\ 0 \end{pmatrix}. $$

A = [ 1, 1; 0, 1]
[V, D] = eig(A)

So why is MatLab not returning eigenvectors that match the Wikipedia example?

1

There are 1 best solutions below

0
On BEST ANSWER

The answer is very simple: eig finds only eigenvectors, not generalized eigenvectors.


The vector $\begin{bmatrix}a\\1\end{bmatrix}$ is not a eigenvector of $A$, it is only a generalized eigenvector of $A$, so there is no reason you would expect for eig (a function which finds eigenvectors) to find it.


To quote from the documentation:

[V,D] = eig(A) returns diagonal matrix D of eigenvalues and matrix V whose columns are the corresponding right eigenvectors, so that A*V = V*D.