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

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

)<br />

In the following example, self has more rows than columns.<br />

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

sage: M = matrix([[t,t,t],[0,0,t]], ascend=False)<br />

sage: M.weak_popov_form()<br />

(<br />

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

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

)<br />

The next example shows that M must be a matrix with coefficients in a rational function field k(t).<br />

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

sage: M.weak_popov_form()<br />

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

...<br />

TypeError: the coefficients <strong>of</strong> M must lie in a univariate<br />

polynomial ring<br />

NOTES:<br />

•For consistency with LLL <strong>and</strong> other algorithms in sage, we have opted for row operations; however,<br />

references such as [H] transpose <strong>and</strong> use column operations.<br />

•There are multiple weak Popov forms <strong>of</strong> a matrix, so one may want to extend this code to produce a<br />

Popov form (see section 1.2 <strong>of</strong> [V]). The latter is canonical, but more work to produce.<br />

REFERENCES:<br />

wiedemann(i, t=0)<br />

Application <strong>of</strong> Wiedemann’s algorithm to the i-th st<strong>and</strong>ard basis vector.<br />

INPUT:<br />

•i - an integer<br />

•t - an integer (default: 0) if t is nonzero, use only the first t linear recurrence relations.<br />

IMPLEMENTATION: This is a toy implementation.<br />

EXAMPLES:<br />

sage: t = matrix(QQ, 3, range(9)); t<br />

[0 1 2]<br />

[3 4 5]<br />

[6 7 8]<br />

sage: t.wiedemann(0)<br />

x^2 - 12*x - 18<br />

sage: t.charpoly()<br />

x^3 - 12*x^2 - 18*x<br />

zigzag_form(subdivide=True, transformation=False)<br />

Find a matrix in ZigZag form that is similar to self.<br />

INPUT:<br />

•self - a square matrix with entries from an exact field.<br />

•transformation - default: False - if True return a change-<strong>of</strong>-basis matrix relating the matrix<br />

<strong>and</strong> its ZigZag form.<br />

264 Chapter 7. Base class for matrices, part 2

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

Saved successfully!

Ooh no, something went wrong!