8.1.1.6 FreeModule_generic_field Objects

class FreeModule_generic_field
Base class for all free modules over fields (i.e., vector spaces).
FreeModule_generic_field( base_field, dimension, degree, [sparse=None], [inner_product_matrix=False])

Instances of class FreeModule_generic_field have the following methods (in addition to inherited methods and special methods):

category,$  $ intersection,$  $ is_subspace,$  $ submodule,$  $ submodule_with_basis,$  $ vector_space,$  $ zero_submodule,$  $ zero_subspace

Further documentation:

category( )

Return the category to which this vector space belongs.

intersection( other)

Return the intersection of self and other, which must be R-submodules of a common ambient vector space.

sage: V  = VectorSpace(RationalField(),3)
sage: W1 = V.subspace([V.gen(0), V.gen(0) + V.gen(1)])
sage: W2 = V.subspace([V.gen(1), V.gen(2)])
sage: W1.intersection(W2)
Vector space of degree 3 and dimension 1 over Rational Field
Basis matrix:
[0 1 0]
sage: W2.intersection(W1)
Vector space of degree 3 and dimension 1 over Rational Field
Basis matrix:
[0 1 0]
sage: V.intersection(W1)
Vector space of degree 3 and dimension 2 over Rational Field
Basis matrix:
[1 0 0]
[0 1 0]
sage: W1.intersection(V)
Vector space of degree 3 and dimension 2 over Rational Field
Basis matrix:
[1 0 0]
[0 1 0]
sage: Z = V.subspace([])
sage: W1.intersection(Z)
Vector space of degree 3 and dimension 0 over Rational Field
Basis matrix:
[]

is_subspace( other)

True if this vector space is a subspace of other.

sage: V = VectorSpace(RationalField(),3)
sage: W = V.subspace([V.gen(0), V.gen(0) + V.gen(1)])
sage: W2 = V.subspace([V.gen(1)])
sage: W.is_subspace(V)
True
sage: W2.is_subspace(V)
True
sage: W.is_subspace(W2)
False
sage: W2.is_subspace(W)
True

Instances of class FreeModule_generic_field also have the following special methods:

__add__,$  $ __mul__,$  $ __rmul__

Further documentation:

__mul__( other)

Return the product of this module by the number other, which is the module spanned by other times each basis vector.

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