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

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

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

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

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

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

True<br />

sage: D = matrix(QQ, [[ -4, 3, 7, 2, -4, 5, 7, -3],<br />

... [ -6, 5, 7, 2, -4, 5, 7, -3],<br />

... [ 21, -12, 89, 25, 8, 27, 98, -95],<br />

... [ -9, 5, -44, -11, -3, -13, -48, 47],<br />

... [ 23, -13, 74, 21, 12, 22, 85, -84],<br />

... [ 31, -18, 135, 38, 12, 47, 155, -147],<br />

... [-33, 19, -138, -39, -13, -45, -156, 151],<br />

... [ -7, 4, -29, -8, -3, -10, -34, 34]])<br />

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

sage: Z<br />

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

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

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

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

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

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

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

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

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

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

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

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

True<br />

sage: C.jordan_form() == D.jordan_form()<br />

True<br />

ZigZag form is achieved entirely with the operations <strong>of</strong> the field, so while the eigenvalues may lie outside<br />

the field, this does not impede the computation <strong>of</strong> the form.<br />

sage: F. = GF(5^4)<br />

sage: A = matrix(F, [[ a, 0, 0, a + 3],<br />

... [ 0,a^2 + 1, 0, 0],<br />

... [ 0, 0,a^3, 0],<br />

... [a^2 +4 , 0, 0,a + 2]])<br />

sage: A.zigzag_form()<br />

[ 0 a^3 + 2*a^2 + 2*a + 2| 0| 0]<br />

[ 1 2*a + 2| 0| 0]<br />

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

[ 0 0| a^3| 0]<br />

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

[ 0 0| 0| a^2 + 1]<br />

sage: A.eigenvalues()<br />

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

...<br />

Subdivisions are optional.<br />

sage: F. = GF(5^4)<br />

sage: A = matrix(F, [[ a, 0, 0, a + 3],<br />

... [ 0,a^2 + 1, 0, 0],<br />

267

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

Saved successfully!

Ooh no, something went wrong!