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.
 A: 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}$.
