# How to calculate generalized eigenvectors

How to calculate generalized eigenvectors of a defective matrix? e.g.:

```
matrix([6,-2,-1],[3,1,-1],[2,-1,2])
```

Daniel

How to calculate generalized eigenvectors

How to calculate generalized eigenvectors of a defective matrix? e.g.:

```
matrix([6,-2,-1],[3,1,-1],[2,-1,2])
```

Daniel

add a comment

4

Do you mean a basis for a Jordan normal form?

Then you can use `jordan_form`

with `transformation=True`

.

Example using the matrix in the question:

```
sage: a = matrix(ZZ, 3, [[6, -2, -1], [3, 1, -1], [2, -1, 2]])
sage: m, p = a.jordan_form(transformation=True)
sage: m
[3 1 0]
[0 3 1]
[0 0 3]
sage: p
[1 3 1]
[1 3 0]
[1 2 0]
```

Thank you @slelievre, that is exactly what I needed.

Now I'm trying to confirm the chain of generalized eigenvectors like this:

```
sage: a = matrix(ZZ, 3, [[6, -2, -1], [3, 1, -1], [2, -1, 2]])
sage: d, m = a.jordan_form(transformation=True)
sage: d
sage: m
sage: I = matrix.identity(3)
sage: zero = transpose(matrix(ZZ, [[0], [0], [0]]))
sage: x1 = m.column(0)
sage: x2 = m.column(1)
sage: x3 = m.column(2)
sage: (a-d[0,0]*I)*x1 == zero
sage: (a-d[1,1]*I)*x2 == x1
sage: (a-d[2,2]*I)*x3 == x2
```

Please notice the first equality is False, but it should be True, what I am doing wrong?

Daniel

1

I am not sure about your exact question. Does the following help ?

```
sage: m = matrix([[6,-2,-1],[3,1,-1],[2,-1,2]])
sage: m.eigenvalues()
[3, 3, 3]
sage: m.eigenvectors_right()
[(3, [
(1, 1, 1)
], 3)]
sage: a = m-3
sage: a
[ 3 -2 -1]
[ 3 -2 -1]
[ 2 -1 -1]
sage: a.right_kernel()
Free module of degree 3 and rank 1 over Integer Ring
Echelon basis matrix:
[1 1 1]
sage: (a^2).right_kernel()
Free module of degree 3 and rank 2 over Integer Ring
Echelon basis matrix:
[1 1 0]
[0 0 1]
sage: (a^2).right_kernel().basis()
[
(1, 1, 0),
(0, 0, 1)
]
sage: (a^3).right_kernel()
Free module of degree 3 and rank 3 over Integer Ring
Echelon basis matrix:
[1 0 0]
[0 1 0]
[0 0 1]
sage: (a^3).right_kernel().basis()
[
(1, 0, 0),
(0, 1, 0),
(0, 0, 1)
]
```

1

What's wrong with

```
sage: M=matrix(SR, [[6,-2,-1],[3,1,-1],[2,-1,2]]);M
[ 6 -2 -1]
[ 3 1 -1]
[ 2 -1 2]
sage: V=M.eigenvectors_left();V
[(3, [(1, -1, 0)], 3)]
sage: V[0][1][0]*M
(3, -3, 0)
sage: V=M.eigenvectors_right();V
[(3, [(1, 1, 1)], 3)]
sage: M*(V[0][1][0])
(3, 3, 3)
```

?

"In linear algebra, a generalized eigenvector of an n × n matrix A {\displaystyle A} A is a vector which satisfies certain criteria which are more relaxed than those for an (ordinary) eigenvector." Generalized_eigenvector on wikipedia

Please start posting anonymously - your entry will be published after you log in or create a new account.

Asked: ** 2018-04-08 20:27:31 +0100 **

Seen: **1,136 times**

Last updated: **Apr 09 '18**

Is it possible to get normalised eigenvectors using eigenmatrix_right()?

Tracking eigenvectors of a 1-parameter family of matrices

add a plane defined by two vectors

How should I get symbolic expression of eigenvalues and eigenvectors of a real symmetric matrix 3x3

How to plot the output of A.eigenvectors_right()?

Orthonormal basis consisting of eigenvectors of a matrix

Eigenvalues/vectors of jacobian matrix as complex numbers

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.