# Vector Spaces¶

class sage.categories.vector_spaces.VectorSpaces(K)

The category of (abstract) vector spaces over a given field

??? with an embedding in an ambient vector space ???

EXAMPLES:

sage: VectorSpaces(QQ)
Category of vector spaces over Rational Field
sage: VectorSpaces(QQ).super_categories()
[Category of modules over Rational Field]

class DualObjects(category, *args)

TESTS:

sage: from sage.categories.covariant_functorial_construction import CovariantConstructionCategory
sage: class FooBars(CovariantConstructionCategory):
...       _functor_category = "FooBars"
sage: Category.FooBars = lambda self: FooBars.category_of(self)
sage: C = FooBars(ModulesWithBasis(ZZ))
sage: C
Category of foo bars of modules with basis over Integer Ring
sage: C.base_category()
Category of modules with basis over Integer Ring
sage: latex(C)
\mathbf{FooBars}(\mathbf{ModulesWithBasis}_{\Bold{Z}})
sage: import __main__; __main__.FooBars = FooBars # Fake FooBars being defined in a python module
sage: TestSuite(C).run()

extra_super_categories()

Returns the dual category

EXAMPLES:

The category of algebras over the Rational Field is dual to the category of coalgebras over the same field:

sage: C = VectorSpaces(QQ)
sage: C.dual()
Category of duals of vector spaces over Rational Field
sage: C.dual().super_categories() # indirect doctest
[Category of vector spaces over Rational Field]

class VectorSpaces.ElementMethods
class VectorSpaces.ParentMethods
VectorSpaces.base_field()

Returns the base field over which the vector spaces of this category are all defined.

EXAMPLES:

sage: VectorSpaces(QQ).base_field()
Rational Field

VectorSpaces.super_categories()

EXAMPLES:

sage: VectorSpaces(QQ).super_categories()
[Category of modules over Rational Field]


#### Previous topic

Unique factorization domains

Weyl Groups