Ask Your Question
1

how to get a specific eigenvector only for a given eigenvalue of a matrix say of order 2 by 2 or 3 by 3?

asked 2017-08-10 11:15:31 +0100

anonymous user

Anonymous

how to get a specific eigenvector only for a given eigenvalue of a matrix say of order 2 by 2 or 3 by 3?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2017-08-10 11:51:07 +0100

tmonteil gravatar image

You should better provide concrete examples so that we understand your question.

Let us first create a 3 by 3 random matrix:

sage: m = random_matrix(QQ,3,3) ; m
[  -2    1   -2]
[   0    0   -2]
[   0    0 -1/2]

We can find its eigenvalues:

sage: L = m.eigenvalues() ; L
[0, -1/2, -2]

Then, if the interesting one is -1/2, let us find its position in the list:

sage: L.index(-1/2)
1

According to the documentatnion of m.eigenvectors_right, we can find the list of rignt eigenvectors as a list of tuples "(e,V,n) where e is the eigenvalue, V is a list of eigenvectors forming a basis for the corresponding right eigenspace, and n is the algebraic multiplicity of the eigenvalue.":

sage: m.eigenvectors_right()
[(0, [
  (1, 2, 0)
  ], 1), (-1/2, [
  (1, 3, 3/4)
  ], 1), (-2, [
  (1, 0, 0)
  ], 1)]

The are ordered in the same way as with m.eigenvalues(), so we can find the tuple associated to the eigenvalue -1/2 as follows;

sage: m.eigenvectors_right()[L.index(-1/2)]
(-1/2, [
 (1, 3, 3/4)
 ], 1)

We want an eigenvector, so the second entry (with index 1) of this tuple is interesting:

sage: m.eigenvectors_right()[L.index(-1/2)][1]
[
(1, 3, 3/4)
]

SInce we do only want one eigenvector (not the whole basis), let us pick the first entry (with index 0):

sage: m.eigenvectors_right()[L.index(-1/2)][1][0]
(1, 3, 3/4)
edit flag offensive delete link more

Comments

Thank you.

rewi gravatar imagerewi ( 2017-08-10 11:58:06 +0100 )edit
0

answered 2017-08-13 12:24:51 +0100

dan_fulea gravatar image

One can go directly for the corresponding kernel. For instance:

sage: A = matrix( QQ, 3,3, [4,1,1, 1,4,1, 1,1,4] )
sage: A
[4 1 1]
[1 4 1]
[1 1 4]

sage: E = matrix.identity( A.nrows() )
sage: A.eigenvalues()
[6, 3, 3]

sage: ( A - 3*E ).kernel().basis()
[
(1, 0, -1),
(0, 1, -1)
]
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-08-10 11:15:31 +0100

Seen: 918 times

Last updated: Aug 13 '17