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

sage: A.right_kernel_matrix().parent()<br />

Full MatrixSpace <strong>of</strong> 0 by 0 dense matrices over Finite Field <strong>of</strong> size 7<br />

TESTS:<br />

The “usual” quaternions are a non-commutative ring <strong>and</strong> computations <strong>of</strong> kernels over these rings are not<br />

implemented.<br />

sage: Q. = QuaternionAlgebra(-1,-1)<br />

sage: A = matrix(Q, 2, [i,j,-1,k])<br />

sage: A.right_kernel_matrix()<br />

Traceback (most recent call last):<br />

...<br />

NotImplementedError: Cannot compute a matrix kernel over Quaternion Algebra (-1, -1) with ba<br />

We test error messages for improper choices <strong>of</strong> the ‘algorithm’ keyword.<br />

sage: matrix(ZZ, 2, 2).right_kernel_matrix(algorithm=’junk’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: matrix kernel algorithm ’junk’ not recognized<br />

sage: matrix(GF(2), 2, 2).right_kernel_matrix(algorithm=’padic’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: ’padic’ matrix kernel algorithm only available over the rationals <strong>and</strong> the intege<br />

sage: matrix(QQ, 2, 2).right_kernel_matrix(algorithm=’pari’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: ’pari’ matrix kernel algorithm only available over non-trivial number fields <strong>and</strong><br />

sage: matrix(Integers(6), 2, 2).right_kernel_matrix(algorithm=’generic’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: ’generic’ matrix kernel algorithm only available over a field, not over Ring <strong>of</strong><br />

sage: matrix(QQ, 2, 2).right_kernel_matrix(algorithm=’pluq’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: ’pluq’ matrix kernel algorithm only available over integers mod 2, not over Rati<br />

We test error messages for improper basis format requests.<br />

sage: matrix(ZZ, 2, 2).right_kernel_matrix(basis=’junk’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: matrix kernel basis format ’junk’ not recognized<br />

sage: matrix(ZZ, 2, 2).right_kernel_matrix(basis=’pivot’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: pivot basis only available over a field, not over Integer Ring<br />

sage: matrix(QQ, 2, 2).right_kernel_matrix(basis=’LLL’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: LLL-reduced basis only available over the integers, not over Rational Field<br />

Finally, error messages for the ‘pro<strong>of</strong>’ keyword.<br />

sage: matrix(ZZ, 2, 2).right_kernel_matrix(pro<strong>of</strong>=’junk’)<br />

Traceback (most recent call last):<br />

...<br />

ValueError: ’pro<strong>of</strong>’ must be one <strong>of</strong> True, False or None, not junk<br />

sage: matrix(QQ, 2, 2).right_kernel_matrix(pro<strong>of</strong>=True)<br />

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