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

INPUT:<br />

•V - vector space (space <strong>of</strong> degree self.ncols()) that contains the image <strong>of</strong> self.<br />

See Also:<br />

restrict(), restrict_domain()<br />

EXAMPLES:<br />

sage: A = matrix(QQ,3,[1..9])<br />

sage: V = (QQ^3).span([[1,2,3], [7,8,9]]); V<br />

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

Basis matrix:<br />

[ 1 0 -1]<br />

[ 0 1 2]<br />

sage: z = vector(QQ,[1,2,5])<br />

sage: B = A.restrict_codomain(V); B<br />

[1 2]<br />

[4 5]<br />

[7 8]<br />

sage: z*B<br />

(44, 52)<br />

sage: z*A<br />

(44, 52, 60)<br />

sage: 44*V.0 + 52*V.1<br />

(44, 52, 60)<br />

restrict_domain(V)<br />

Compute the matrix relative to the basis for V on the domain obtained by restricting self to V, but not<br />

changing the codomain <strong>of</strong> the matrix. This is the matrix whose rows are the images <strong>of</strong> the basis for V.<br />

INPUT:<br />

•V - vector space (subspace <strong>of</strong> ambient space on which self acts)<br />

See Also:<br />

restrict()<br />

EXAMPLES:<br />

sage: V = QQ^3<br />

sage: A = matrix(QQ,3,[1,2,0, 3,4,0, 0,0,0])<br />

sage: W = V.subspace([[1,0,0], [1,2,3]])<br />

sage: A.restrict_domain(W)<br />

[1 2 0]<br />

[3 4 0]<br />

sage: W2 = V.subspace_with_basis([[1,0,0], [1,2,3]])<br />

sage: A.restrict_domain(W2)<br />

[ 1 2 0]<br />

[ 7 10 0]<br />

right_eigenmatrix()<br />

Return matrices D <strong>and</strong> P, where D is a diagonal matrix <strong>of</strong> eigenvalues <strong>and</strong> P is the corresponding matrix<br />

where the columns are corresponding eigenvectors (or zero vectors) so that self*P = P*D.<br />

EXAMPLES:<br />

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

[0 1 2]<br />

[3 4 5]<br />

[6 7 8]<br />

231

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

Saved successfully!

Ooh no, something went wrong!