Since you have two identical eigenvalues, the eigenvectors corresponding to those eigenvalues are not unique*. They only need to span the subspace that is defined by the two of them, so in that subspace the columns of
. qualify as eigenvectors, as do the columns of, for example
eig has no requirement on the order of the eigenvalues it generates. It's not helping that eig(A) has the zero eigenvalue second, and eig(A^2) has the zero eigenvalue first That obscures where the subspaces are. However, in the A case you can eliminate the second column since it corresponds to lambda = 0, and in the A^2 case you can eliminate the first column for the same reason. That leaves
Neither of these involves the second coordinate, so if you toss that out you are comparing
so you can see it's just a rotation in the 2d space corresponding to the two degenerate eigenvalues.
*this does not count the fact that technically if v is an eigenvector then so is const*v, i.e. eigenvector normalization is a separate requirement. But normalization only changes the length, not the direction.