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

(5, 6)<br />

sage: all([x in ZZ for x in B_exp<strong>and</strong>ed.list()])<br />

True<br />

sage: C=B_exp<strong>and</strong>ed.submatrix(0,0,B.nrows()-B.nullity(),B.ncols())<br />

sage: L=B_exp<strong>and</strong>ed.submatrix(B.nrows()-B.nullity(),B.ncols())<br />

sage: B.right_kernel()==C.right_kernel()<br />

True<br />

sage: B.row_space()==C.row_space()<br />

True<br />

sage: B.column_space()==L.right_kernel()<br />

True<br />

sage: B.left_kernel()==L.row_space()<br />

True<br />

For more, see the documentation <strong>of</strong> the r<strong>and</strong>om_subspaces_matrix() function. In the notebook or at<br />

the <strong>Sage</strong> comm<strong>and</strong>-line, first execute the following to make this further documentation available:<br />

from sage.matrix.constructor import r<strong>and</strong>om_subspaces_matrix<br />

R<strong>and</strong>om unimodular matrices. The algorithm=’unimodular’ keyword, along with an optional entry size<br />

control (upper_bound) will return a matrix <strong>of</strong> determinant 1. When the base ring is ZZ or QQ the result has<br />

integer entries, whose magnitudes can be limited by the value <strong>of</strong> upper_bound.<br />

sage: C=r<strong>and</strong>om_matrix(QQ, 5, algorithm=’unimodular’, upper_bound=70); C # r<strong>and</strong>om<br />

sage: det(C)<br />

1<br />

sage: C.base_ring()<br />

Rational Field<br />

sage: (C.nrows(), C.ncols())<br />

(5, 5)<br />

sage: all([abs(x)

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

Saved successfully!

Ooh no, something went wrong!