It seems to have been missed that NullSpace[]
is a built-in function:
mat = {{9, -48, 4}, {36, 4, -33}, {32, 9, 36}}/49;
evs = Eigenvalues[mat]
{I, -I, 1}
NullSpace[mat - # IdentityMatrix[Length[mat]]] & /@ evs
{{{-18/13 + 14 I/13, 12/13 + 21 I/13, 1}},
{{-18/13 - 14 I/13, 12/13 - 21 I/13, 1}},
{{1/2, -1/3, 1}}}
Since NullSpace[]
returns a list of vectors instead of a single vector (as it should), one might want to execute Flatten[%, 1]
afterwards to get the eigenvectors as a list of vectors. Note that the result in this case matches the output of Eigenvectors[mat]
.