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

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

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

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

[ 0 0 0 1 -2 1], False)<br />

]<br />

decomposition_<strong>of</strong>_subspace(M, check_restrict=True, **kwds)<br />

Suppose the right action <strong>of</strong> self on M leaves M invariant. Return the decomposition <strong>of</strong> M as a list <strong>of</strong> pairs<br />

(W, is_irred) where is_irred is True if the charpoly <strong>of</strong> self acting on the factor W is irreducible.<br />

Additional inputs besides M are passed onto the decomposition comm<strong>and</strong>.<br />

INPUT:<br />

•M – A subspace <strong>of</strong> the free module self acts on.<br />

•check_restrict – A boolean (default: True); Call restrict with or without check.<br />

•kwds – Keywords that will be forwarded to decomposition().<br />

EXAMPLES:<br />

sage: t = matrix(QQ, 3, [3, 0, -2, 0, -2, 0, 0, 0, 0]); t<br />

[ 3 0 -2]<br />

[ 0 -2 0]<br />

[ 0 0 0]<br />

sage: t.fcp(’X’) # factored charpoly<br />

(X - 3) * X * (X + 2)<br />

sage: v = kernel(t*(t+2)); v # an invariant subspace<br />

Vector space <strong>of</strong> degree 3 <strong>and</strong> dimension 2 over Rational Field<br />

Basis matrix:<br />

[0 1 0]<br />

[0 0 1]<br />

sage: D = t.decomposition_<strong>of</strong>_subspace(v); D<br />

[<br />

(Vector space <strong>of</strong> degree 3 <strong>and</strong> dimension 1 over Rational Field<br />

Basis matrix:<br />

[0 0 1], True),<br />

(Vector space <strong>of</strong> degree 3 <strong>and</strong> dimension 1 over Rational Field<br />

Basis matrix:<br />

[0 1 0], True)<br />

]<br />

sage: t.restrict(D[0][0])<br />

[0]<br />

sage: t.restrict(D[1][0])<br />

[-2]<br />

We do a decomposition over ZZ:<br />

sage: a = matrix(ZZ,6,[0, 0, -2, 0, 2, 0, 2, -4, -2, 0, 2, 0, 0, 0, -2, -2, 0, 0, 2, 0, -2,<br />

sage: a.decomposition_<strong>of</strong>_subspace(ZZ^6)<br />

[<br />

(Free module <strong>of</strong> degree 6 <strong>and</strong> rank 2 over Integer Ring<br />

Echelon basis matrix:<br />

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

[ 0 1 0 -1 2 -1], False),<br />

(Free module <strong>of</strong> degree 6 <strong>and</strong> rank 4 over Integer Ring<br />

Echelon basis matrix:<br />

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

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

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

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