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 0|-25 10| 0 0]<br />

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

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

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

sage: U.inverse()*A*U == Z<br />

True<br />

sage: B = matrix(QQ, [[ 16, 69, -13, 2, -52, 143, 90, -3],<br />

... [ 26, 54, 6, -5, -28, 73, 73, -48],<br />

... [-16, -79, 12, -10, 64, -142, -115, 41],<br />

... [ 27, -7, 21, -33, 39, -20, -42, 43],<br />

... [ 8, -75, 34, -32, 86, -156, -130, 42],<br />

... [ 2, -17, 7, -8, 20, -33, -31, 16],<br />

... [-24, -80, 7, -3, 56, -136, -112, 42],<br />

... [ -6, -19, 0, -1, 13, -28, -27, 15]])<br />

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

sage: Z<br />

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

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

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

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

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

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

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

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

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

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

sage: U.inverse()*B*U == Z<br />

True<br />

sage: A.jordan_form() == B.jordan_form()<br />

True<br />

Two more examples, illustrating the two extremes <strong>of</strong> the zig-zag nature <strong>of</strong> this form. The first has a one in<br />

each <strong>of</strong> the <strong>of</strong>f-diagonal blocks, the second has all zeros in each <strong>of</strong>f-diagonal block. Notice again that the<br />

two matrices are similar, since their Jordan canonical forms are equal.<br />

sage: C = matrix(QQ, [[2, 31, -10, -9, -125, 13, 62, -12],<br />

... [0, 48, -16, -16, -188, 20, 92, -16],<br />

... [0, 9, -1, 2, -33, 5, 18, 0],<br />

... [0, 15, -5, 0, -59, 7, 30, -4],<br />

... [0, -21, 7, 2, 84, -10, -42, 5],<br />

... [0, -42, 14, 8, 167, -17, -84, 13],<br />

... [0, -50, 17, 10, 199, -23, -98, 14],<br />

... [0, 15, -5, -2, -59, 7, 30, -2]])<br />

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

sage: Z<br />

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

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

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

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

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

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

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

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

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

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

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

266 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!