12.07.2015 Views

Sage Reference Manual: Matrices and Spaces of Matrices

Sage Reference Manual: Matrices and Spaces of Matrices

Sage Reference Manual: Matrices and Spaces of Matrices

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.2[3 4][5 6]Full MatrixSpace <strong>of</strong> 3 by 2 dense matrices over Rational Fieldsage: m=matrix(QQ,2,4,[1,2,3,4,5,6]); m; m.parent()Traceback (most recent call last):...ValueError: entries has the wrong lengthsage: m=matrix(QQ,5,[1,2,3,4,5,6]); m; m.parent()Traceback (most recent call last):...TypeError: cannot construct an element <strong>of</strong>Full MatrixSpace <strong>of</strong> 5 by 1 dense matrices over Rational Fieldfrom [1, 2, 3, 4, 5, 6]!sage: m=matrix({(1,1): 2}); m; m.parent()[0 0][0 2]Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Integer Ringsage: m=matrix(QQ,{(1,1): 2}); m; m.parent()[0 0][0 2]Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Rational Fieldsage: m=matrix(QQ,3,{(1,1): 2}); m; m.parent()[0 0 0][0 2 0][0 0 0]Full MatrixSpace <strong>of</strong> 3 by 3 sparse matrices over Rational Fieldsage: m=matrix(QQ,3,4,{(1,1): 2}); m; m.parent()[0 0 0 0][0 2 0 0][0 0 0 0]Full MatrixSpace <strong>of</strong> 3 by 4 sparse matrices over Rational Fieldsage: m=matrix(QQ,2,{(1,1): 2}); m; m.parent()[0 0][0 2]Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Rational Fieldsage: m=matrix(QQ,1,{(1,1): 2}); m; m.parent()Traceback (most recent call last):...IndexError: invalid entries listsage: m=matrix({}); m; m.parent()[]Full MatrixSpace <strong>of</strong> 0 by 0 sparse matrices over Integer Ringsage: m=matrix(QQ,{}); m; m.parent()[]Full MatrixSpace <strong>of</strong> 0 by 0 sparse matrices over Rational Fieldsage: m=matrix(QQ,2,{}); m; m.parent()[0 0][0 0]Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Rational Fieldsage: m=matrix(QQ,2,3,{}); m; m.parent()[0 0 0][0 0 0]Full MatrixSpace <strong>of</strong> 2 by 3 sparse matrices over Rational Fieldsage: m=matrix(2,{}); m; m.parent()[0 0][0 0]Full MatrixSpace <strong>of</strong> 2 by 2 sparse matrices over Integer Ringsage: m=matrix(2,3,{}); m; m.parent()19

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

Saved successfully!

Ooh no, something went wrong!