NonCommutativeGroebnerBasis[{poly1,poly2,…},vars,alg]
attempts to find a list of polynomials that form a Gröbner basis for the set of polynomials polyi over the non-commutative algebra alg.


NonCommutativeGroebnerBasis
NonCommutativeGroebnerBasis[{poly1,poly2,…},vars,alg]
attempts to find a list of polynomials that form a Gröbner basis for the set of polynomials polyi over the non-commutative algebra alg.
Details

- NonCommutativeGroebnerBasis is used to compute the Gröbner basis of a set of polynomials over a non-commutative algebra.
- vars should be {vs1,…,vsk}, where vsi are disjoint lists of variables that include all non-commutative variables that appear in {poly1,poly2,…}. vsi=x, where x is a variable, is equivalent to vsi={x}.
- vars determines a multi-graded lexicographic monomial order. The monomials are ordered first on the number of occurrences of variables from vsi, with the smallest i for which the numbers differ, then on the number of occurrences of the commutative variables from alg. If all numbers of occurrences are the same, monomials are ordered lexicographically on Flatten[vars] and then lexicographically on the commutative variables from alg.
- alg can be a NonCommutativeAlgebra object, {Dot,n}, Composition, TensorProduct or NonCommutativeMultiply. If the algebra argument is omitted, NonCommutativeAlgebra with the default property values is used.
- The following option can be given:
-
MaxIterations 50 the maximum number of iterations to use - A finite Gröbner basis may not exist. The value of the MaxIterations option limits the number of algorithm iterations in which a new basis element is found. If the limit is reached, NonCommutativeGroebnerBasis issues a message and returns the basis elements found so far.
- The Gröbner basis, and even finiteness of the Gröbner basis, in general depend on the ordering assigned to monomials.
Examples
open all close allBasic Examples (2)
Scope (3)
Options (2)
MaxIterations (2)
By default, NonCommutativeGroebnerBasis attempts iterations before giving up:

Setting MaxIterations10 makes NonCommutativeGroebnerBasis give up faster:

A low value of MaxIterations may result in not finding a finite Gröbner basis even if one exists:

Applications (5)
Simplify an expression involving matrices
and
:
Find the inverses in the expression:
Generate the relations satisfied by the inverses:
Pick a variable order that puts the most complicated variables first:
Compute the Gröbner basis of the ideal generated by the relations over the algebra of matrices:
Reducing the expression modulo the Gröbner basis shows that it is equal to the identity matrix:
Use ArraySimplify to do the above simplification steps automatically:
Prove the Woodbury matrix identity:
In the standard formulation, is an
matrix,
is a
matrix, with
,
is a
matrix, and
is a
matrix. However, by replacing
,
and
with the block matrices
,
and
, one may assume that all matrices belong to the algebra of
matrices. It will be shown that the difference of the sides of the identity reduces to zero modulo the Gröbner basis of the ideal generated by relations implied by the properties of the matrix inverse.
Compute the difference of the sides of the Woodbury matrix identity:
Generate the relations satisfied by the inverses:
Pick a variable order that puts the most complicated variables first:
Compute the Gröbner basis of the ideal generated by the relations over the algebra of matrices:
Reduce modulo the Gröbner basis. The result is a zero matrix, which proves the identity:
Use ArraySimplify to do the above simplification steps automatically:
Construct a finitely presented group. The dicyclic group is given by generators
and relations
. The group algebra of
is given by four generators:
The generators satisfy the following relations:
Compute the Gröbner basis of the ideal generated by the relations:
Note that reducing an arbitrary monomial modulo the Gröbner basis gives a monomial that does not contain and
. This shows that reducing an arbitrary monomial in
and
of total degree
yields a monomial of a total degree at most
:
Hence, all elements of the group can be represented as reduced monomials of degree at most :
It has been proven that is a finite group of order
:
Compute in the Clifford algebra . The algebra has six generators:
The generators satisfy the following relations:
The set of relations is a Gröbner basis:
Compute the canonical representation of :
Compute the canonical representation of :
Compute in the Weyl algebra associated to the differential ring of bivariate polynomials. The algebra has four generators:
The generators satisfy the following relations:
The set of relations is a Gröbner basis:
Compute the canonical representation of and
:
Compute the canonical representation of :
Elements of the Weyl algebra correspond to differential operators with product representing composition:
Verify that the operator corresponding to is the composition of the operators corresponding to
and
:
Properties & Relations (2)
A Gröbner basis generates the same ideal as the input polynomials:
Use NonCommutativePolynomialReduce to show that p is in the ideal generated by gb:
Construct p as a combination of basis elements:
Use GroebnerBasis to compute a Gröbner basis of commutative polynomials:
Related Guides
History
Text
Wolfram Research (2025), NonCommutativeGroebnerBasis, Wolfram Language function, https://reference.wolfram.com/language/ref/NonCommutativeGroebnerBasis.html.
CMS
Wolfram Language. 2025. "NonCommutativeGroebnerBasis." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NonCommutativeGroebnerBasis.html.
APA
Wolfram Language. (2025). NonCommutativeGroebnerBasis. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NonCommutativeGroebnerBasis.html
BibTeX
@misc{reference.wolfram_2025_noncommutativegroebnerbasis, author="Wolfram Research", title="{NonCommutativeGroebnerBasis}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/NonCommutativeGroebnerBasis.html}", note=[Accessed: 04-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_noncommutativegroebnerbasis, organization={Wolfram Research}, title={NonCommutativeGroebnerBasis}, year={2025}, url={https://reference.wolfram.com/language/ref/NonCommutativeGroebnerBasis.html}, note=[Accessed: 04-August-2025]}