0
$\begingroup$

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?

$\endgroup$

closed as off-topic by Claude Leibovici, José Carlos Santos, user91500, Frits Veerman, kingW3 Jun 28 '17 at 11:05

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – user91500, kingW3
  • "This question is not about mathematics, within the scope defined in the help center." – Claude Leibovici, José Carlos Santos, Frits Veerman
If this question can be reworded to fit the rules in the help center, please edit the question.

2
$\begingroup$

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.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.