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

•subdivide - default: True - if True the ZigZag form matrix is subdivided according to the<br />

companion matrices described in the output section below.<br />

OUTPUT:<br />

A matrix in ZigZag form has blocks on the main diagonal that are companion matrices. The first companion<br />

matrix has ones just below the main diagonal. The last column has the negatives <strong>of</strong> coefficients <strong>of</strong> a<br />

monic polynomial, but not the leading one. Low degree monomials have their coefficients in the earlier<br />

rows. The second companion matrix is like the first only transposed. The third is like the first. The fourth<br />

is like the second. And so on.<br />

These blocks on the main diagonal define blocks just <strong>of</strong>f the diagonal. To the right <strong>of</strong> the first companion<br />

matrix, <strong>and</strong> above the second companion matrix is a block that is totally zero, except the entry <strong>of</strong> the first<br />

row <strong>and</strong> first column may be a one. Below the second block <strong>and</strong> to the left <strong>of</strong> the third block is a block<br />

that is totally zero, except the entry <strong>of</strong> the first row <strong>and</strong> first column may be one. This alternating pattern<br />

continues. It may now be apparent how this form gets its name. Any other entry <strong>of</strong> the matrix is zero. So<br />

this form is reminiscent <strong>of</strong> rational canonical form <strong>and</strong> is a good precursor to that form.<br />

If transformation is True, then the output is a pair <strong>of</strong> matrices. The first is the form Z <strong>and</strong> the second<br />

is an invertible matrix U such that U.inverse()*self*U equals Z. In other words, the repsentation <strong>of</strong><br />

self with respect to the columns <strong>of</strong> U will be Z.<br />

If subdivide is True then the matrix returned as the form is partitioned according to the companion<br />

matrices <strong>and</strong> these may be manipulated by several different matrix methods.<br />

For output that may be more useful as input to other routines, see the helper method _zigzag_form().<br />

Note: An efffort has been made to optimize computation <strong>of</strong> the form, but no such work has been done<br />

for the computation <strong>of</strong> the transformation matrix, so for fastest results do not request the transformation<br />

matrix.<br />

ALGORITHM:<br />

ZigZag form, <strong>and</strong> its computation, are due to Arne Storjohann <strong>and</strong> are described in [STORJOHANN-<br />

THESIS] <strong>and</strong> [STORJOHANN-ISACC98], where the former is more representative <strong>of</strong> the code here.<br />

EXAMPLES:<br />

Two examples that illustrate ZigZag form well. Notice that this is not a canonical form. The two matrices<br />

below are similar, since they have equal Jordan canonical forms, yet their ZigZag forms are quite different.<br />

In other words, while the computation <strong>of</strong> the form is deterministic, the final result, when viewed as a<br />

property <strong>of</strong> a linear transformation, is dependent on the basis used for the matrix representation.<br />

sage: A = matrix(QQ, [[-68, 69, -27, -11, -65, 9, -181, -32],<br />

... [-52, 52, -27, -8, -52, -16, -133, -14],<br />

... [ 92, -97, 47, 14, 90, 32, 241, 18],<br />

... [139, -144, 60, 18, 148, -10, 362, 77],<br />

... [ 40, -41, 12, 6, 45, -24, 105, 42],<br />

... [-46, 48, -20, -7, -47, 0, -122, -22],<br />

... [-26, 27, -13, -4, -29, -6, -66, -14],<br />

... [-33, 34, -13, -5, -35, 7, -87, -23]])<br />

sage: Z, U = A.zigzag_form(transformation=True)<br />

sage: Z<br />

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

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

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

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

[---------------+-------+-------]<br />

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

265

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

Saved successfully!

Ooh no, something went wrong!