# Calculating Eigenvectors - Questions regarding previous SE submissions

Question 1: (Source: How to calculate eigenvectors for equal eigenvalues?)

In the matrix posted there, I am wondering if the solution (which was accepted too...) posted has a mistake.

If we have $[1,\frac{1}{2},0 \ | \ 0]$ as our upper row, then $x + \frac{1}{2} y = 0$, so $2x + y = 0$, so $y = -2x$. Shouldn't this make the basis for the eigenspace as $[-2,1,0]$ then, and not $[1,2,0]$? Or have I made a mistake?

Question 2: (Source: How can I find the eigenvectors of this Matrix?)

I read the solutions/comments, and they all seem to point out how OP has made an error in calculating the dimension, but never seem to answer his question about how to get the eigenspaces when you have $[0,0,1 \ | \ 0]$ or the like... In this case, would it just mean $x_3=0$? I too am confused as to how Matlab obtained those eigenvectors - moreover, if the dimension is $1$, how did it come up with two of them? Any help would be appreciated.

-
For Question 2): Though Matlab returned two eigenvectors, they are not independent. There are infinitely many eigenvectors in fact for $\lambda=0$ in the linked example. However, the dimension of the eigenspace for $\lambda=0$ is 1; every eigenvector for $\lambda=1$ is a non-zero multiple of $(1,0,0)$. That is, a basis for the eigenspace for $\lambda=1$ is $\{(1,0,0)\}$. To find a basis of the eigenspace, $E_\lambda$, for an eigenvalue $\lambda$, you find a basis of the nullspace of $A-\lambda I$. Then any zon-zero vector in $E_\lambda$ is an eigenvector for the eigenvalue $\lambda$. – David Mitra May 7 '12 at 17:01
Thank you David, that's perfect! – Craig May 7 '12 at 17:02
@DavidMitra: I have one more question. So, in Robin's question, since the free variable is only x_1, we need to have the basis as {1,0,0} since there is no relation between x_1 and x_2 and x_3 right? – Craig May 7 '12 at 17:04
The reduced form of $A-0\cdot I$ is $\Bigl({\textstyle{ {0\ 1\ 0\ }\atop{0\ 0\ 1\ }}\atop 0\ 0\ 0\ }\Bigr)$; so the free variable is $x_1$ and from the first and second rows $x_2=x_3=0$. So, yes, indeed a basis of the eigenspace is $\{(1,0,0)\}$. – David Mitra May 7 '12 at 17:14

1) It's easy to check whether a vector $v$ is an eigenvector of a matrix $A$: just compute $Av$ and see whether it is a scalar multiple of $v$. In this case $\pmatrix {1\cr 2\cr 0\cr}$ is an eigenvector and $\pmatrix{-2\cr 1\cr 0\cr}$ is not. But there was a mistake in that posting: the first row of the reduced row echelon form should be $[1, -1/2, 0]$, not $[1,1/2,0]$.
2) A method of finding a basis of the eigenspace for eigenvalue $\lambda$ (i.e. the null space of $A - \lambda I$) is this. Take a reduced row echelon form (or just a row echelon form - there's no real need for the extra work to make it "reduced") of $A - \lambda I$. Identify the "free variables": these correspond to the columns that don't contain a leading $1$ of any row. For each of these, you get a basis vector, by setting that variable to $1$, all other free variables to $0$, and see what the other variable values must be. For example, suppose your row echelon form is $$\pmatrix{0 & 1 & 2 & 3\cr 0 & 0 & 1 & 1\cr 0 & 0 & 0 & 0\cr 0 & 0 & 0 & 0\cr}$$ There are two free variables, $x_1$ and $x_4$, so the dimension of the eigenspace is $2$. Corresponding to $x_1 = 1, x_4 = 0$ we have $x_3 = 0$ according to the second row and then $x_2 = 0$ according to the first row, so the basis vector is $\pmatrix{1\cr 0 \cr 0\cr 0\cr}$. Corresponding to $x_1 = 0, x_4 = 1$ we have $x_3 = -1$ according to the second row; the first row then says $x_2 - 2 + 3 = 0$ so $x_2 = -1$, and the basis vector is $\pmatrix{0\cr -1\cr -1\cr 1\cr}$.