8.2.1 modules.free_module_homspace - Hom spaces between objects of a category of free modules.

We create $ \End (\mathbf{Z}^2)$ and compute a basis.

sage: M = FreeModule(IntegerRing(),2)
sage: E = End(M)
sage: B = E.basis()
sage: len(B)
4
sage: B[0]
Free module morphism defined by the matrix
[1 0]
[0 0]
Domain: Ambient free module of rank 2 over the principal ideal domain ...
Codomain: Ambient free module of rank 2 over the principal ideal domain ...

We create $ \Hom (\mathbf{Q}^3, \mathbf{Q}^2)$ and compute a basis.

sage: V3 = VectorSpace(RationalField(),3)
sage: V2 = VectorSpace(RationalField(),2)
sage: H = Hom(V3,V2)
sage: H
All morphisms from Vector space of dimension 3 over Rational Field to
Vector space of dimension 2 over Rational Field in Category of vector
spaces over Rational Field
sage: B = H.basis()
sage: len(B)
6
sage: B[0]
Free module morphism defined by the matrix
[1 0]
[0 0]
[0 0]
Domain: Vector space of dimension 3 over Rational Field
Codomain: Vector space of dimension 2 over Rational Field

The module modules.free_module_homspace defines the following classes:

class FreeModuleHomspace



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