The $\gamma$-matrices satisfy the relation $$\gamma^\mu \gamma^\nu +\gamma^\nu\gamma^\mu=2\eta^{\mu\nu}\mathrm{id},$$ where $\eta$ is the Minkowski metric. Consider now the following process $$\begin{align*} \gamma^\mu\gamma^\nu &= \frac{1}{2!}(\gamma^\mu\gamma^\nu +\gamma^\mu\gamma^\nu) = \frac{1}{2}(\gamma^\mu\gamma^\nu + (2\eta^{\mu\nu}-\gamma^\nu\gamma^\mu))\\ &= \frac{1}{2}(\gamma^\mu\gamma^\nu-\gamma^\nu\gamma^\mu)+\eta^ {\mu\nu}\\ &=:\frac{1}{2}\varepsilon^{\mu\nu}+\eta^{\mu\nu}.\tag{1} \end{align*}$$ One can now repeat this process and obtain $$\begin{align*} \gamma^\mu\gamma^\nu\gamma^\sigma &= \frac{1}{6}\varepsilon^{\mu\nu\sigma}+ \eta^{\mu\nu}\gamma^\sigma- \eta^{\mu\sigma}\gamma^\nu+\dots \end{align*}$$ where $\varepsilon^{\mu\nu\sigma}$ is the anti-symmetrization of $\gamma^\mu\gamma^\nu\gamma^\sigma$.

Is it possible to obtain this result in Mathematica for an arbitrary product of $\gamma$-matrices, i.e. $$\gamma^{\mu_1}\dots \gamma^{\mu_r}\qquad \text{for }r\in\mathbb{N}?$$ (Realisticly speaking, I only need it for $r<8$.)

Edit: It's probably worth pointing out that one can create the antisymmetric part quite easily using

Symmetrize[\[Epsilon], Antisymmetric[{1,...,r}]]
  • $\begingroup$ I would like to state that this is an important question and the answer is relevant to my research (any QFT researcher would be interested in this I think). $\endgroup$ Commented Jun 17, 2021 at 11:36

1 Answer 1


One should realize that the gamma matrices are just a (3,1)-dim representation of a geometric algebra. This means we associate the gamma matrices with noncommutative basis vectors.

So you could use the following geometry algebra package:

The wedge operation here is implemented as OuterProduct. No operations without basis vectors, no differentiation.

Code to work with a (3,1)-dim representation of a geometric algebra

gaDefineOrthonormalBasis[Cl[3, 1], FontColor -> Red]

Now the questions you asked can be simply computed. Question 1:

GeometricProduct[\[DoubleStruckE][1], \[DoubleStruckE][2]]
GeometricProduct[\[DoubleStruckE][4], \[DoubleStruckE][4]]

Question 2:

GeometricProduct[\[DoubleStruckE][1], \[DoubleStruckE][
2], \[DoubleStruckE][3]]

I guess you could also define a function named gamma (this may not be the best way to do it, but just as an example)

Clear[f]; \[Gamma][i_] := \[DoubleStruckE][i]
g[i_, j_] := GeometricProduct[\[Gamma][i], \[Gamma][j]]
g[1, 2]
g[1, 1]
g[4, 4]
  • $\begingroup$ You could also code this yourself of course, using the code here mathematica.stackexchange.com/questions/249670/… look at the answer by xzczd, but that will take some serious work in order to create a fast properly working program $\endgroup$ Commented Jun 20, 2021 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.