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

sage: m = matrix(4, [1..16])<br />

sage: m.submatrix(1, 1)<br />

[ 6 7 8]<br />

[10 11 12]<br />

[14 15 16]<br />

Same thing, except take only two rows:<br />

sage: m.submatrix(1, 1, 2)<br />

[ 6 7 8]<br />

[10 11 12]<br />

And now take only one column:<br />

sage: m.submatrix(1, 1, 2, 1)<br />

[ 6]<br />

[10]<br />

You can take zero rows or columns if you want:<br />

sage: m.submatrix(1, 1, 0)<br />

[]<br />

sage: parent(m.submatrix(1, 1, 0))<br />

Full MatrixSpace <strong>of</strong> 0 by 3 dense matrices over Integer Ring<br />

117

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

Saved successfully!

Ooh no, something went wrong!