Sponsored links: Algebra eBooks ### The Maxima on-line user's manual

Algebra Calculator

#### Search: #### Eigenvectors

Function: eigenvectors (<M>) Function: eivects (<M>) Computes eigenvectors of the matrix <M>. The return value is a list of two elements. The first is a list of the eigenvalues of <M> and a list of the multiplicities of the eigenvalues. The second is a list of lists of eigenvectors. There is one list of eigenvectors for each eigenvalue. There may be one or more eigenvectors in each list.

`eivects` is a synonym for `eigenvectors`.

The package `eigen.mac` is loaded automatically when `eigenvalues` or `eigenvectors` is referenced. If `eigen.mac` is not already loaded, `load ("eigen")` loads it. After loading, all functions and variables in the package are available.

The flags that affect this function are:

`nondiagonalizable` is set to `true` or `false` depending on whether the matrix is nondiagonalizable or diagonalizable after `eigenvectors` returns.

`hermitianmatrix` when `true`, causes the degenerate eigenvectors of the Hermitian matrix to be orthogonalized using the Gram-Schmidt algorithm.

`knowneigvals` when `true` causes the `eigen` package to assume the eigenvalues of the matrix are known to the user and stored under the global name `listeigvals`. `listeigvals` should be set to a list similar to the output `eigenvalues`.

The function `algsys` is used here to solve for the eigenvectors. Sometimes if the eigenvalues are messy, `algsys` may not be able to find a solution. In some cases, it may be possible to simplify the eigenvalues by first finding them using `eigenvalues` command and then using other functions to reduce them to something simpler. Following simplification, `eigenvectors` can be called again with the `knowneigvals` flag set to `true`.

See also `eigenvalues`.

Examples:

A matrix which has just one eigenvector per eigenvalue.

```          (%i1) M1 : matrix ([11, -1], [1, 7]);
[ 11  - 1 ]
(%o1)                      [         ]
[ 1    7  ]
(%i2) [vals, vecs] : eigenvectors (M1);
(%o2) [[[9 - sqrt(3), sqrt(3) + 9], [1, 1]],
[[[1, sqrt(3) + 2]], [[1, 2 - sqrt(3)]]]]
(%i3) for i thru length (vals) do disp (val[i] = vals[i],
mult[i] = vals[i], vec[i] = vecs[i]);
val  = 9 - sqrt(3)
1```

mult = 1 1

vec = [[1, sqrt(3) + 2]] 1

val = sqrt(3) + 9 2

mult = 1 2

vec = [[1, 2 - sqrt(3)]] 2

`          (%o3)                         done`

A matrix which has two eigenvectors for one eigenvalue (namely 2).

```          (%i1) M1 : matrix ([0, 1, 0, 0], [0, 0, 0, 0], [0, 0, 2, 0], [0, 0, 0, 2]);
[ 0  1  0  0 ]
[            ]
[ 0  0  0  0 ]
(%o1)                    [            ]
[ 0  0  2  0 ]
[            ]
[ 0  0  0  2 ]
(%i2) [vals, vecs] : eigenvectors (M1);
(%o2) [[[0, 2], [2, 2]], [[[1, 0, 0, 0]],
[[0, 0, 1, 0], [0, 0, 0, 1]]]]
(%i3) for i thru length (vals) do disp (val[i] = vals[i],
mult[i] = vals[i], vec[i] = vecs[i]);
val  = 0
1```

mult = 2 1

vec = [[1, 0, 0, 0]] 1

val = 2 2

mult = 2 2

vec = [[0, 0, 1, 0], [0, 0, 0, 1]] 2

`          (%o3)                         done`

There are also some inexact matches for `eigenvectors`. Try `?? eigenvectors` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

##### eigenvectors-invert-matrix

A:matrix([-19/6,11/3]...

eigenvectors(A);

T:matrix([-5,1],[1/2,...

Calculate

##### eigenvectors-matrix

a:matrix([3,2,3,0],[-...

eigenvectors(a);

Calculate

M1 : matrix ([11, 0, ...

[vals, vecs] : eigenv...

Calculate

##### eigenvectors-ident-matrix-transpose

e:matrix([1,0,0]);

A:ident(3)-2/3*transp...

eigenvectors(A);

Calculate

##### eigenvectors-matrix

a:matrix([1,1,0,0,0,0...

b:matrix([1,0,1,0,0,0...

eigenvectors(a);

Calculate

##### eigenvectors-matrix

M1 : matrix ([11, -1]...

[vals, vecs] : eigen...

for i thru length (v...

Calculate

##### eigenvectors-matrix-sqrt

A:matrix([1,2],[4,5]);

eigenvectors(A);

D:matrix([3+2*sqrt(3)...

Calculate

##### eigenvectors-expand-factor-matrix-sqrt-transpose

H:matrix([a+d,b],[b,a...

eigenvectors(H);

P:transpose(matrix([b...

Calculate

##### eigenvectors-matrix

M1 : matrix ([0, 2,-1...

[vals, vecs] : eigenv...

Calculate

##### eigenvectors-expand-factor-matrix

m:matrix([1-b,b],[a,1...

m^^2;

eigenvectors(m);

Calculate 