Calculus with Anticommuting Variables
Q: How can I perform matrix calculus (products, determinants, and so on) with anticommuting variables?
A: Daniel Lichtblau (firstname.lastname@example.org) answers.
Say you encapsulate all anticommuting variables with the head . Then you can define product rules, here using , to handle the commutation relations and furthermore distribute over Plus, pull out "scalars" (everything not with head ) using ordinary Times, and so on. Matrix multiplication is then done using just Inner with this new product specified in place of Times. Each rule below, followed by an example, illustrates this method.
1. Repeated anticommuting variables.
2. Canonical order for a product of anticommuting variables.
3. Reduction for a single term.
4. Distribute over Plus.
5. Distribute over Times.
6. Distribute over CircleTimes.
7. Null argument CircleTimes.
8. Pull out "scalars."
Now consider a matrix with mixed commuting () and anticommuting () entries.
We find its inner product with itself using the above rules.
To do determinants one can use Laplace expansion, again substituting for Times.
For efficiency we memo-ize the results so that we do not recompute minor expansions but instead look them up once they are computed.
We conclude by clearing the rules we have assigned.
Converted by Mathematica