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

The routine expects matrices over the rational function field, but other examples below show how one can<br />

provide matrices over the ring <strong>of</strong> polynomials (whose quotient field is the rational function field).<br />

sage: R. = GF(3)[’t’]<br />

sage: K = FractionField(R)<br />

sage: M = matrix([[(t-1)^2/t],[(t-1)]])<br />

sage: M.weak_popov_form()<br />

(<br />

[ 0] [ t 2*t + 1]<br />

[(2*t + 1)/t], [ 1 2], [-Infinity, 0]<br />

)<br />

If self is an nx1 matrix with at least one non-zero entry, W has a single non-zero entry <strong>and</strong> that entry is a<br />

scalar multiple <strong>of</strong> the greatest-common-divisor <strong>of</strong> the entries <strong>of</strong> self.<br />

sage: M1 = matrix([[t*(t-1)*(t+1)],[t*(t-2)*(t+2)],[t]])<br />

sage: output1 = M1.weak_popov_form()<br />

sage: output1<br />

(<br />

[0] [ 1 0 2*t^2 + 1]<br />

[0] [ 0 1 2*t^2 + 1]<br />

[t], [ 0 0 1], [-Infinity, -Infinity, 1]<br />

)<br />

We check that the output is the same for a matrix M if its entries are rational functions intead <strong>of</strong> polynomials.<br />

We also check that the type <strong>of</strong> the output follows the documentation. See #9063<br />

sage: M2 = M1.change_ring(K)<br />

sage: output2 = M2.weak_popov_form()<br />

sage: output1 == output2<br />

True<br />

sage: output1[0].base_ring() is K<br />

True<br />

sage: output2[0].base_ring() is K<br />

True<br />

sage: output1[1].base_ring() is R<br />

True<br />

sage: output2[1].base_ring() is R<br />

True<br />

The following is the first half <strong>of</strong> example 5 in [H] except that we have transposed self; [H] uses column<br />

operations <strong>and</strong> we use row.<br />

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

sage: M = matrix([[t^3 - t,t^2 - 2],[0,t]]).transpose()<br />

sage: M.weak_popov_form()<br />

(<br />

[ t -t^2] [ 1 -t]<br />

[t^2 - 2 t], [ 0 1], [2, 2]<br />

)<br />

The next example demonstrates what happens when self is a zero matrix.<br />

sage: R. = GF(5)[’t’]<br />

sage: K = FractionField(R)<br />

sage: M = matrix([[K(0),K(0)],[K(0),K(0)]])<br />

sage: M.weak_popov_form()<br />

(<br />

[0 0] [1 0]<br />

263

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

Saved successfully!

Ooh no, something went wrong!