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

[3 4]<br />

[5 6]<br />

Full MatrixSpace <strong>of</strong> 3 by 2 dense matrices over Rational Field<br />

sage: m=matrix(QQ,2,4,[1,2,3,4,5,6]); m; m.parent()<br />

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

...<br />

ValueError: entries has the wrong length<br />

sage: m=matrix(QQ,5,[1,2,3,4,5,6]); m; m.parent()<br />

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

...<br />

TypeError: cannot construct an element <strong>of</strong><br />

Full MatrixSpace <strong>of</strong> 5 by 1 dense matrices over Rational Field<br />

from [1, 2, 3, 4, 5, 6]!<br />

sage: m=matrix({(1,1): 2}); m; m.parent()<br />

[0 0]<br />

[0 2]<br />

Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Integer Ring<br />

sage: m=matrix(QQ,{(1,1): 2}); m; m.parent()<br />

[0 0]<br />

[0 2]<br />

Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Rational Field<br />

sage: m=matrix(QQ,3,{(1,1): 2}); m; m.parent()<br />

[0 0 0]<br />

[0 2 0]<br />

[0 0 0]<br />

Full MatrixSpace <strong>of</strong> 3 by 3 sparse matrices over Rational Field<br />

sage: m=matrix(QQ,3,4,{(1,1): 2}); m; m.parent()<br />

[0 0 0 0]<br />

[0 2 0 0]<br />

[0 0 0 0]<br />

Full MatrixSpace <strong>of</strong> 3 by 4 sparse matrices over Rational Field<br />

sage: m=matrix(QQ,2,{(1,1): 2}); m; m.parent()<br />

[0 0]<br />

[0 2]<br />

Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Rational Field<br />

sage: m=matrix(QQ,1,{(1,1): 2}); m; m.parent()<br />

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

...<br />

IndexError: invalid entries list<br />

sage: m=matrix({}); m; m.parent()<br />

[]<br />

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

sage: m=matrix(QQ,{}); m; m.parent()<br />

[]<br />

Full MatrixSpace <strong>of</strong> 0 by 0 sparse matrices over Rational Field<br />

sage: m=matrix(QQ,2,{}); m; m.parent()<br />

[0 0]<br />

[0 0]<br />

Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Rational Field<br />

sage: m=matrix(QQ,2,3,{}); m; m.parent()<br />

[0 0 0]<br />

[0 0 0]<br />

Full MatrixSpace <strong>of</strong> 2 by 3 sparse matrices over Rational Field<br />

sage: m=matrix(2,{}); m; m.parent()<br />

[0 0]<br />

[0 0]<br />

Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Integer Ring<br />

sage: m=matrix(2,3,{}); m; m.parent()<br />

19

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

Saved successfully!

Ooh no, something went wrong!