# Identifying the right- and left-eigenvectors of a square matrix in Mathematica?

Context

I have the following matrix:

A={{1,0},{a,(1-a)}};

EigV=Eigenvectors[A]


Question

Is there a simple way to identify the right- and left-eigenvectors of $$A$$? I am working with a much larger $$n \times n$$ matrix, so a function that applies to any non-negative, square matrix is really what I am looking for.

the right eigenvector is just Eigenvectors and the left eigenvector is just the Eigenvectors of the transpose of the matrix. I made one entry real in the matrix below, so that the eigenvectors come back normalized automatically (otherwise one has to explicitly normalize them afterwords).

mat = {{1.0, 2, 4}, {4, 5, 6}, {0, 9, 4}}
(rightEigV = Eigenvectors[mat]) // Transpose // N


(leftEigV =  Eigenvectors[Transpose[mat]]) // Transpose // N // MatrixForm


The columns above are the eigenvecvtors. The // Transpose was added above, just for display. Otherwise Mathematica gives the eigenvectors as rows which can be confusing. This was they are read as columns which is more common.

Compare to Matlab:

>> A=[1 2 4;4 5 6;0 9 4]
1     2     4
4     5     6
0     9     4

>> [V,D,W] = eig(A)

V =
0.3333 + 0.0000i   0.4111 + 0.4342i   0.4111 - 0.4342i
0.6667 + 0.0000i   0.4111 - 0.1447i   0.4111 + 0.1447i
0.6667 + 0.0000i  -0.6727 + 0.0000i  -0.6727 + 0.0000i

W =
0.2502 + 0.0000i   0.7303 + 0.0000i   0.7303 + 0.0000i
0.7506 + 0.0000i  -0.4564 - 0.3536i  -0.4564 + 0.3536i
0.6116 + 0.0000i   0.0913 + 0.3536i   0.0913 - 0.3536i


In the above, V is the right eigenvectors, and W is the left

[V,D] = eig(A) produces a diagonal matrix D of eigenvalues and a full matrix V whose columns are the corresponding eigenvectors
so that AV = VD.

[V,D,W] = eig(A) also produces a full matrix W whose columns are the corresponding left eigenvectors so that W'A = DW'.

They are the same.

• Thank you so much! Commented Oct 9, 2022 at 16:50