5.1.1.2 VectorSpace_ambient Objects

class VectorSpace_ambient
The VectorSpace_ambient class defines functionality for both dense and sparse ambient vector spaces over an arbitrary base field. This class derives from VectorSpace_generic.
VectorSpace_ambient( base_field, degree, [sparse=False])

INPUT::
    base_field -- Ring; a field
    degree -- int >= 0; the degree of the vector space 
              (number of components of vectors).
    sparse -- bool; whether or not vectors are given a sparse
representation 
              (default: False)

Instances of class VectorSpace_ambient have the following functions (in addition to inherited functions and special functions):

ambient_space,$  $ basis,$  $ change_ring,$  $ dimension,$  $ echelonized_basis,$  $ is_ambient,$  $ is_subspace,$  $ linear_combination_of_basis

Further documentation:

basis( )

sage: V = VectorSpace(RationalField(), 2); V
Full Vector space of degree 2 over Rational Field
sage: V.basis()
[(1, 0), (0, 1)]

change_ring( R)

Change this vector space to be a vector space over R by coercing the basis vectors into R.

sage: V = VectorSpace(RationalField(),3)
sage: V.change_ring(GF(7))
Full Vector space of degree 3 over Finite field of size 7

echelonized_basis( )

sage: V = VectorSpace(RationalField(), 2); V
Full Vector space of degree 2 over Rational Field
sage: V.basis()
[(1, 0), (0, 1)]

is_subspace( other)

True if this vector space is a subspace of other.

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

linear_combination_of_basis( v)

Return the linear combination of the basis for self obtained from the coordinates of v.

Instances of class VectorSpace_ambient also have the following special functions:

__contains__

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