08.02.2015 Views

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Sage</strong> <strong>Reference</strong> <strong>Manual</strong>: <strong>Matrices</strong> <strong>and</strong> <strong>Spaces</strong> <strong>of</strong> <strong>Matrices</strong>, Release 6.1.1<br />

the eigenvalue.<br />

If the option extend is set to False, then only the eigenvalues that live in the base ring are considered.<br />

EXAMPLES: We compute the left eigenvectors <strong>of</strong> a 3 × 3 rational matrix.<br />

sage: A = matrix(QQ,3,3,range(9)); A<br />

[0 1 2]<br />

[3 4 5]<br />

[6 7 8]<br />

sage: es = A.eigenvectors_left(); es<br />

[(0, [<br />

(1, -2, 1)<br />

], 1),<br />

(-1.348469228349535, [(1, 0.3101020514433644, -0.3797958971132713)], 1),<br />

(13.34846922834954, [(1, 1.289897948556636, 1.579795897113272)], 1)]<br />

sage: eval, [evec], mult = es[0]<br />

sage: delta = eval*evec - evec*A<br />

sage: abs(abs(delta)) < 1e-10<br />

True<br />

Notice the difference between considering ring extensions or not.<br />

sage: M=matrix(QQ,[[0,-1,0],[1,0,0],[0,0,2]])<br />

sage: M.eigenvectors_left()<br />

[(2, [<br />

(0, 0, 1)<br />

], 1), (-1*I, [(1, -1*I, 0)], 1), (1*I, [(1, 1*I, 0)], 1)]<br />

sage: M.eigenvectors_left(extend=False)<br />

[(2, [<br />

(0, 0, 1)<br />

], 1)]<br />

left_kernel(*args, **kwds)<br />

Returns the left kernel <strong>of</strong> this matrix, as a vector space or free module. This is the set <strong>of</strong> vectors x such<br />

that x*self = 0.<br />

Note: For the right kernel, use right_kernel(). The method kernel() is exactly equal to<br />

left_kernel().<br />

INPUT:<br />

•algorithm - default: ‘default’ - a keyword that selects the algorithm employed. Allowable values<br />

are:<br />

–‘default’ - allows the algorithm to be chosen automatically<br />

–‘generic’ - naive algorithm usable for matrices over any field<br />

–‘pari’ - PARI library code for matrices over number fields or the integers<br />

–‘padic’ - padic algorithm from IML library for matrices over the rationals <strong>and</strong> integers<br />

–‘pluq’ - PLUQ matrix factorization for matrices mod 2<br />

•basis - default: ‘echelon’ - a keyword that describes the format <strong>of</strong> the basis used to construct the<br />

left kernel. Allowable values are:<br />

–‘echelon’: the basis matrix is in echelon form<br />

210 Chapter 7. Base class for matrices, part 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!