# Noncommutative Algebras in Sage

In this post, I’ll demonstrate 3 ways to define non-commutative rings in Sage. They’re essentially different ways of expressing the non-commutative relations in the ring:

- Via
`g_algebra`

: define the relations directly - Via
`NCPolynomialRing_plural`

: define a pair of structural matrices - Via a quotient of a letterplace ring: define the ideal generated by the relations (only works for homogeneous relations)