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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<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 />

True<br />

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

Returns the right 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 self*x = 0.<br />

Note: For the left kernel, use left_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 />

OUTPUT:<br />

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

–‘pivot’ : each basis vector is computed from the reduced row-echelon form <strong>of</strong> self by placing a<br />

single one in a non-pivot column <strong>and</strong> zeros in the remaining non-pivot columns. Only available<br />

for matrices over fields.<br />

–‘LLL’: an LLL-reduced basis. Only available for matrices over the integers.<br />

A vector space or free module whose degree equals the number <strong>of</strong> columns in self <strong>and</strong> contains all the<br />

vectors x such that self*x = 0.<br />

If self has 0 columns, the kernel has dimension 0, while if self has 0 rows the kernel is the entire<br />

ambient vector space.<br />

The result is cached. Requesting the right kernel a second time, but with a different basis format, will<br />

return the cached result with the format from the first computation.<br />

Note: For more detailed documentation on the selection <strong>of</strong> algorithms used <strong>and</strong> a more flexible<br />

method for computing a basis matrix for a right kernel (rather than computing a vector space), see<br />

right_kernel_matrix(), which powers the computations for this method.<br />

EXAMPLES:<br />

sage: A = matrix(QQ, [[0, 0, 1, 2, 2, -5, 3],<br />

... [-1, 5, 2, 2, 1, -7, 5],<br />

... [0, 0, -2, -3, -3, 8, -5],<br />

... [-1, 5, 0, -1, -2, 1, 0]])<br />

sage: K = A.right_kernel(); K<br />

Vector space <strong>of</strong> degree 7 <strong>and</strong> dimension 4 over Rational Field<br />

Basis matrix:<br />

[ 1 0 0 0 -1 -1 -1]<br />

[ 0 1 0 0 5 5 5]<br />

236 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!