19.5 Morphisms defined by a matrix

Module: sage.modules.matrix_morphism

A matrix morphism is a morphism that is defined by multiplication by a matrix. Elements of domain must either have a method vector() that returns a vector that the defining matrix can hit from the left, or be coercible into vector space of appropriate dimension.

sage: from sage.modules.matrix_morphism import MatrixMorphism, is_MatrixMorphism
sage: V = Q^3
sage: T = End(V)
sage: M = MatrixSpace(QQ,3)
sage: I = M.identity_matrix()
sage: m = MatrixMorphism(T, I); m
Morphism defined by the matrix
[1 0 0]
[0 1 0]
[0 0 1]
sage: is_MatrixMorphism(m)
True
sage: m.charpoly()
x^3 - 3*x^2 + 3*x - 1
sage: m.base_ring()
Rational Field
sage: m.det()
1
sage: m.fcp()
(x - 1)^3
sage: m.matrix()
[1 0 0]
[0 1 0]
[0 0 1]
sage: m.rank()
3
sage: m.trace()
3

Author Log:

Module-level Functions

is_MatrixMorphism( x)

Class: MatrixMorphism

class MatrixMorphism
MatrixMorphism( self, parent, A)

INPUT:
    parent -- a homspace
    A -- matrix

sage: from sage.modules.matrix_morphism import MatrixMorphism
sage: T = End(Q^3)
sage: M = MatrixSpace(Q,3,3)
sage: I = M.identity_matrix()
sage: A = MatrixMorphism(T, I)
sage: loads(A.dumps()) == A
True

Functions: base_ring,$  $ charpoly,$  $ decomposition,$  $ det,$  $ fcp,$  $ image,$  $ kernel,$  $ matrix,$  $ rank,$  $ restrict,$  $ restrict_domain,$  $ trace

det( self)

Return the determinant of this endomorphism.

fcp( self)

Return the factorization of the characteristic polynomial.

restrict( self, sub)

Restrict this matrix morphism to a subspace sub of the domain.

The codomain and domain of the resulting matrix are both sub.

restrict_domain( self, sub)

Restrict this matrix morphism to a subspace sub of the domain. The subspace sub should have a basis() method and elements of the basis should be coercible into domain.

The resulting morphism has the same codomain as before, but a new domain.

Special Functions: __call__,$  $ __cmp__,$  $ __invert__,$  $ __mul__,$  $ __rmul__,$  $ _add_function,$  $ _mul_function,$  $ _repr_,$  $ _sub_function

See About this document... for information on suggesting changes.