### Navigation

- index
- modules |
- next |
- previous |
- Category Theory »

# Associative algebras

class `sage.categories.associative_algebras.``AssociativeAlgebras`(base_category)

  Bases: `sage.categories.category_with_axiom.CategoryWithAxiom_over_base_ring`

  The category of associative algebras over a given base ring.

  An associative algebra over a ring \(R\) is a module over \(R\) which is also a not necessarily unital ring.

  Warning

  Until trac ticket #15043 is implemented, `Algebras` is the category of associative unital algebras; thus, unlike the name suggests, `AssociativeAlgebras` is not a subcategory of `Algebras` but of `MagmaticAlgebras`.

  EXAMPLES:

      sage: from sage.categories.associative_algebras import AssociativeAlgebras
      sage: C = AssociativeAlgebras(ZZ); C
      Category of associative algebras over Integer Ring

  TESTS:

      sage: from sage.categories.magmatic_algebras import MagmaticAlgebras
      sage: C is MagmaticAlgebras(ZZ).Associative()
      True
      sage: TestSuite(C).run()

  class `ElementMethods`

    An abstract class for elements of an associative algebra.

    Note

    `Magmas.Element.__mul__` is preferable to `Modules.Element.__mul__` since the later does not handle products of two elements of `self`.

    TESTS:

        sage: A = AlgebrasWithBasis(QQ).example()
        sage: a = A.an_element()
        sage: a
        2*B[word: ] + 2*B[word: a] + 3*B[word: b]
        sage: a.__mul__(a)
        4*B[word: ] + 8*B[word: a] + 4*B[word: aa] + 6*B[word: ab] + 12*B[word: b] + 6*B[word: ba] + 9*B[word: bb]

  `AssociativeAlgebras.``Unital`

    alias of `Algebras`

### Navigation

- index
- modules |
- next |
- previous |
- Category Theory »