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

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

sage: m=matrix([]); m; m.parent()<br />

[]<br />

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

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

[]<br />

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

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

[1 0]<br />

[0 1]<br />

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

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

[1 0]<br />

[0 1]<br />

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

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

[0 0 0]<br />

[0 0 0]<br />

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

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

[0 0 0]<br />

[0 0 0]<br />

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

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

[1 2 3]<br />

[4 5 6]<br />

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

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

[1 2 3]<br />

[4 5 6]<br />

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

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

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

...<br />

ValueError: Number <strong>of</strong> rows does not match up with specified number.<br />

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

[1 2 3]<br />

[4 5 6]<br />

Full MatrixSpace <strong>of</strong> 2 by 3 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: Number <strong>of</strong> columns does not match up with specified number.<br />

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

[1 2 3]<br />

[4 5 6]<br />

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

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

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

Full MatrixSpace <strong>of</strong> 1 by 6 dense matrices over Integer Ring<br />

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

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

Full MatrixSpace <strong>of</strong> 1 by 6 dense matrices over Integer Ring<br />

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

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

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

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

[1 2]<br />

18 Chapter 2. Matrix Constructor

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

Saved successfully!

Ooh no, something went wrong!