# Ticket #10346: trac_10346_eigenvectors_right.patch

File trac_10346_eigenvectors_right.patch, 1.7 KB (added by jvkersch, 3 years ago)

Adding eigenvectors_right method to matrix_symbolic_dense

• ## sage/matrix/matrix_symbolic_dense.pyx

```# HG changeset patch
# User Joris Vankerschaver <joris.vankerschaver@gmail.com>
# Date 1290837192 28800
# Node ID af331344a3ec3bdb7f063b10a24a029bc3629621
# Parent  120c07be6358d93bcff503363d379c26b8342f2b
#10346: added method eigenvectors_right()

diff -r 120c07be6358 -r af331344a3ec sage/matrix/matrix_symbolic_dense.pyx```
 a return result def eigenvectors_right(self): r""" Compute the right eigenvectors of a matrix. For each distinct eigenvalue, returns a list of the form (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. EXAMPLES:: sage: A = matrix(SR,2,2,range(4)); A [0 1] [2 3] sage: right = A.eigenvectors_right(); right [(-1/2*sqrt(17) + 3/2, [(1, -1/2*sqrt(17) + 3/2)], 1), (1/2*sqrt(17) + 3/2, [(1, 1/2*sqrt(17) + 3/2)], 1)] The right eigenvectors are nothing but the left eigenvectors of the transpose matrix:: sage: left  = A.transpose().eigenvectors_left(); left [(-1/2*sqrt(17) + 3/2, [(1, -1/2*sqrt(17) + 3/2)], 1), (1/2*sqrt(17) + 3/2, [(1, 1/2*sqrt(17) + 3/2)], 1)] sage: right[0][1] == left[0][1] True """ return self.transpose().eigenvectors_left() def exp(self): r""" Return the matrix exponential of this matrix \$X\$, which is the matrix