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.

CHAPTER<br />

TWENTYTWO<br />

DENSE MATRICES OVER<br />

MULTIVARIATE POLYNOMIALS OVER<br />

FIELDS<br />

Dense matrices over multivariate polynomials over fields<br />

This implementation inherits from Matrix_generic_dense, i.e. it is not optimized for speed only some methods were<br />

added.<br />

AUTHOR:<br />

• Martin Albrecht <br />

class sage.matrix.matrix_mpolynomial_dense.Matrix_mpolynomial_dense<br />

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

Dense matrix over a multivariate polynomial ring over a field.<br />

determinant(algorithm=None)<br />

Return the determinant <strong>of</strong> this matrix<br />

INPUT:<br />

•algorithm – ignored<br />

EXAMPLES:<br />

We compute the determinant <strong>of</strong> the arbitrary 3x3 matrix:<br />

sage: R = PolynomialRing(QQ, 9, ’x’)<br />

sage: A = matrix(R, 3, R.gens())<br />

sage: A<br />

[x0 x1 x2]<br />

[x3 x4 x5]<br />

[x6 x7 x8]<br />

sage: A.determinant()<br />

-x2*x4*x6 + x1*x5*x6 + x2*x3*x7 - x0*x5*x7 - x1*x3*x8 + x0*x4*x8<br />

We check if two implementations agree on the result:<br />

sage: R. = QQ[]<br />

sage: C = r<strong>and</strong>om_matrix(R, 2, 2, terms=2)<br />

sage: C<br />

[-6/5*x*y - y^2 -6*y^2 - 1/4*y]<br />

[ -1/3*x*y - 3 x*y - x]<br />

sage: C.determinant()<br />

399

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

Saved successfully!

Ooh no, something went wrong!