Commutator[x,y]
gives the commutator x**y-y**x of x and y.
Commutator[x,y,alg]
gives the commutator of x and y in the noncommutative algebra alg.
Commutator
Commutator[x,y]
gives the commutator x**y-y**x of x and y.
Commutator[x,y,alg]
gives the commutator of x and y in the noncommutative algebra alg.
Details
- Commutator gives the commutator of two elements of a noncommutative algebra.
- If ⊗ and ⊕ denote the multiplication and addition in the algebra alg, then Commutator[x,y,alg]==(x⊗y)⊕(-y⊗x).
- alg can be a NonCommutativeAlgebra object or any valid NonCommutativeAlgebra specification. If the algebra argument is omitted, NonCommutativeAlgebra with the default property values is used.
Examples
open all close allBasic Examples (2)
The commutator of x and y over an algebra with the default operations:
Commutator[x, y]The commutator of x and y over an algebra with symbolic operations:
alg = NonCommutativeAlgebra[<|"Multiplication" -> mult, "Addition" -> add|>];
Commutator[x, y, alg]Scope (4)
The commutator of x and y over the algebra of square matrices with Dot product:
Commutator[x, y, {Dot, n}]The commutator of x and y over the algebra of linear endomorphisms with Composition:
Commutator[x, y, Composition]Traditional form of Commutator[x,y]:
Hold[Commutator[x, y]]//TraditionalFormUse the traditional form as input:
Commutator[x, y]Reducing a polynomial modulo the commutator of two variables commutes the variables:
NonCommutativePolynomialReduce[x**y**x**y**x + 2y**y**x**x**y**y, {Commutator[x, y]}, {y, x}][[2]]Properties & Relations (2)
Reducing a polynomial modulo the commutator of two variables commutes the variables:
NonCommutativePolynomialReduce[2x**y**x + 3x**x**y**x**x**y**y, {Commutator[x, y]}, {y, x}][[2]]Anticommutator gives the anticommutator of two elements of an algebra:
Anticommutator[x, y]Related Guides
History
Text
Wolfram Research (2025), Commutator, Wolfram Language function, https://reference.wolfram.com/language/ref/Commutator.html.
CMS
Wolfram Language. 2025. "Commutator." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Commutator.html.
APA
Wolfram Language. (2025). Commutator. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Commutator.html
BibTeX
@misc{reference.wolfram_2026_commutator, author="Wolfram Research", title="{Commutator}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/Commutator.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_commutator, organization={Wolfram Research}, title={Commutator}, year={2025}, url={https://reference.wolfram.com/language/ref/Commutator.html}, note=[Accessed: 12-June-2026]}