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(SR, 2, 2, [x,2,3,4])<br />

sage: M.permanent()<br />

4*x + 6<br />

Rank:<br />

sage: M = matrix(SR, 5, 5, range(25))<br />

sage: M.rank()<br />

2<br />

sage: M = matrix(SR, 5, 5, range(25)) - var(’t’)<br />

sage: M.rank()<br />

5<br />

.. warning::<br />

:meth:‘rank‘ may return the wrong answer if it cannot determine that a<br />

matrix element that is equivalent to zero is indeed so.<br />

Copying symbolic matrices:<br />

sage: m = matrix(SR, 2, [sqrt(2), 3, pi, e])<br />

sage: n = copy(m)<br />

sage: n[0,0] = sin(1)<br />

sage: m<br />

[sqrt(2) 3]<br />

[ pi e]<br />

sage: n<br />

[sin(1) 3]<br />

[ pi e]<br />

Conversion to Maxima:<br />

sage: m = matrix(SR, 2, [sqrt(2), 3, pi, e])<br />

sage: m._maxima_()<br />

matrix([sqrt(2),3],[%pi,%e])<br />

class sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense<br />

Bases: sage.matrix.matrix_generic_dense.Matrix_generic_dense<br />

See Matrix_generic_dense for documentation.<br />

TESTS:<br />

We check that the problem related to Trac #9049 is not an issue any more:<br />

sage: S.=PolynomialRing(QQ)<br />

sage: F.=QQ.extension(t^4+1)<br />

sage: R.=PolynomialRing(F)<br />

sage: M = MatrixSpace(R, 1, 2)<br />

sage: from sage.matrix.matrix_generic_dense import Matrix_generic_dense<br />

sage: Matrix_generic_dense(M, (x, y), True, True)<br />

[x y]<br />

arguments()<br />

Returns a tuple <strong>of</strong> the arguments that self can take.<br />

EXAMPLES:<br />

sage: var(’x,y,z’)<br />

(x, y, z)<br />

sage: M = MatrixSpace(SR,2,2)<br />

305

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

Saved successfully!

Ooh no, something went wrong!