# Jordan product in Mathematica

Does anyone know how to best handle non-associative operations in Mathematica? I am specifically interested in finite commutative Jordan algebras.

I would like to construct a product operator x such that if I write out expressions like AxB + 7BxA, or A^2(BA) - (A^2B)A, then mathematica will simplify them to expressions like 8AxB and 0 respectively.

Does anyone know how to go about doing this?

Any help would be greatly appreciated.

• Welcome! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 Sep 30 '16 at 12:47

You can use the fact that Jordan algebras can be constructed from the associative algebras:

CircleDot[a_, b_] := 1/2 (a.b + b.a)


For the latter, one can use, e.g., matrix representations. Let us make an example:

A = RandomReal[{0, 1}, {3, 3}]
B = RandomReal[{0, 1}, {3, 3}]


We verify now your equations with respect to CircleDot:

(A ⊙ B + 7 B ⊙ A - 8 A ⊙ B)//Norm//Chop
(*0*)

((A ⊙ A) ⊙ (B ⊙ A) - ((A ⊙ A) ⊙ B) ⊙ A)//Norm//Chop
(*0*)


## Final mathematical remarks

One may oppose to the above construction with the argument that it only covers special Jordan algebras. Well, true, there are indeed exceptional Jordan algebras. However, they are rather scarce and not so useful for applications in quantum mechanics. Here, I would like to cite a passage from McCrimmon's "A Taste of Jordan Algebras":

In 1983 Zel’manov proved the astounding theorem that any simple Jordan algebra, of arbitrary dimension, is either (1) an algebra of Hermitian elements $\mathcal{H}(A,∗)$ for a ∗-simple associative algebra with involution, (2) an algebra of spin type determined by a nondegenerate quadratic form, or (3) an Albert algebra of dimension 27 over its center. This brought an end to the search for an exceptional setting for quantum mechanics: it is an ineluctable fact of mathematical nature that simple algebraic systems obeying the basic laws of Jordan must (outside of dimension 27) have an invisible associative support behind them.