Matrix representation

Hello

Is someone can explain to me how to construct a matrix representation (like the Pauli matrices) from a given geometric algebra signature ? And how to do when we use a unit that square to zero.

Marko

This book has an appendix that describes a method to do this for Clifford Algebras: https://www.researchgate.net/publication/267053487_A_New_Approach_to_Differential_Geometry_using_Clifford’s_Geometric_Algebra

In Clifford Algebras, unlike Geometric Algebra using the imaginary number is ok ( like in Pauli matrices ).

I haven’t fully understood it well enough to give you an explanation, but it makes use of the Kronecker Product of matrices. The reason for this is you have this identity
(A∘B)(C∘D) = AC∘BD
which shuffles the unit matrices, like you can shuffle unit vectors during the geometric ( clifford ) product.

Also look at https://en.wikipedia.org/wiki/Gamma_matrices
and https://en.wikipedia.org/wiki/Higher-dimensional_gamma_matrices

For a unit that squares to 0 you can make use of two units with opposite signatures to make one unit that squares to 0. Here’s an example using gamma matrices.

julia> e₁ = g0
4Γ—4 Array{Float64,2}:
 1.0  0.0   0.0   0.0
 0.0  1.0   0.0   0.0
 0.0  0.0  -1.0   0.0
 0.0  0.0   0.0  -1.0

julia> eβ‚‚ = g1
4Γ—4 StaticArrays.SArray{Tuple{4,4},Float64,2,16} with indices SOneTo(4)Γ—SOneTo(4):
 0.0  0.0   0.0  -1.0
 0.0  0.0  -1.0   0.0
 0.0  1.0   0.0   0.0
 1.0  0.0   0.0   0.0

julia> e₁*e₁
4Γ—4 Array{Float64,2}:
 1.0  0.0  0.0  0.0
 0.0  1.0  0.0  0.0
 0.0  0.0  1.0  0.0
 0.0  0.0  0.0  1.0

julia> eβ‚‚*eβ‚‚
4Γ—4 StaticArrays.SArray{Tuple{4,4},Float64,2,16} with indices SOneTo(4)Γ—SOneTo(4):
 -1.0   0.0   0.0   0.0
  0.0  -1.0   0.0   0.0
  0.0   0.0  -1.0   0.0
  0.0   0.0   0.0  -1.0


julia> Ξ·β‚€ = (e₁+eβ‚‚)/2.0
4Γ—4 StaticArrays.SArray{Tuple{4,4},Float64,2,16} with indices SOneTo(4)Γ—SOneTo(4):
 0.5  0.0   0.0  -0.5
 0.0  0.5  -0.5   0.0
 0.0  0.5  -0.5   0.0
 0.5  0.0   0.0  -0.5

julia> Ξ·β‚€*Ξ·β‚€
4Γ—4 StaticArrays.SArray{Tuple{4,4},Float64,2,16} with indices SOneTo(4)Γ—SOneTo(4):
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0

Thank you Orbots. I will try the opposite signatures trick.

Hi @MarkoM,

I just added a quick feature to ganja.js that allows you to print the matrix form of any Clifford algebra. I’ll use 2D PGA as the example in this post (and to explain how it works). Using the latest ganja.js you can now see the matrix form of \mathbb R_{p,q,r} using:

Algebra(p,q,r).describe().matrix

for 2D PGA \mathbb R_{2,0,1} this returns:

\begin{bmatrix}1 & 0 & e_{1} & e_{2} & 0 & 0 & e_{12} & 0\\e_{0} & 1 & e_{01} & e_{02} & e_{1} & e_{2} & e_{012} & e_{12}\\e_{1} & 0 & 1 & e_{12} & 0 & 0 & e_{2} & 0\\e_{2} & 0 & -e_{12} & 1 & 0 & 0 & -e_{1} & 0\\-e_{01} & e_{1} & -e_{0} & -e_{012} & 1 & e_{12} & -e_{02} & e_{2}\\-e_{02} & e_{2} & e_{012} & -e_{0} & -e_{12} & 1 & e_{01} & -e_{1}\\-e_{12} & 0 & e_{2} & -e_{1} & 0 & 0 & 1 & 0\\-e_{012} & -e_{12} & e_{02} & -e_{01} & e_{2} & -e_{1} & e_{0} & 1\end{bmatrix}

You can now simply fill in to find the basis matrices.

\mathbf e_{12} = \begin{bmatrix}0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & -1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & -1 & 0 & 0 & 0\\-1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & -1 & 0 & 0 & 0 & 0 & 0 & 0\end{bmatrix}

\mathbf e_1 = \begin{bmatrix}0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & -1 & 0\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & -1\\0 & 0 & 0 & -1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & -1 & 0 & 0\end{bmatrix}

\mathbf e_2 = \begin{bmatrix}0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\end{bmatrix}

You can trivially verify that these indeed represent the correct basis. (e.g. check that {\mathbf e_1}^2=1, \mathbf e_1\mathbf e_2=\mathbf e_{12}, \mathbf e_{12}\mathbf e_{1}=-\mathbf e_{2}... etc)

For those interested, the Cayley table of a Clifford algebra is a latin square (a defect latin square in the degenerate case). This means it can be re-ordered. For the expression c=a*b the Cayley table has a as row headers, b as column headers and c in the body. Because it is a latin square, each element occurs only once in each row and each column. This means we can reorganize it so that it has c as row headers, b as column headers and a in the body. That is exactly the matrix form.

Cheers,

Steven.

3 Likes

I’m interested. Some trick I’m missing to the algorithm though. Mostly the top left corner is confusing me. Could you describe the algorithm a bit more, or give a simple example of transforming a small Cayley table into the matrix format here?

Thanks.

Hi @Orbots,

If by the top left corner, you mean the top left 2x2 submatrix, that is the classic matrix form for a dual number. In general, each of the elements will follow this pattern

\mathbf e_- = \begin{bmatrix}0 & x\\-x&0\end{bmatrix}

\mathbf e_+ = \begin{bmatrix}0 & x\\x&0\end{bmatrix}

\mathbf e_0 = \begin{bmatrix}0 & 0\\b&0\end{bmatrix}

The code is in ganja.js, if I have some more time I’ll work through an example by hand :slight_smile:

In the mean time, here’s a little tool that makes it easy to visualize matrix forms for arbitrary clifford algebras :

2 Likes

Not really a javascript programmer and that code is a little, how shall I say this? Compact. :slight_smile:

Let’s take a simple example. I added a cayley table to my GA code. Lets use the real pauli matrices to create a G(2,0,0) algebra.


julia> σ₁ = [0 1; 1 0]
 0  1
 1  0

julia> σ₃ = [1 0; 0 -1]
 1   0
 0  -1

julia> cayley_table([σ₁, σ₃], ["e₁", "eβ‚‚"])

β”‚ ?     β”‚ e₁     β”‚ eβ‚‚     β”‚ e₁eβ‚‚   β”‚
┼───────┼────────┼────────┼─────────
β”‚ e₁    β”‚ 1      β”‚ e₁eβ‚‚   β”‚ eβ‚‚     β”‚
β”‚ eβ‚‚    β”‚ -e₁eβ‚‚  β”‚ 1      β”‚ -e₁    β”‚
β”‚ e₁eβ‚‚  β”‚ -eβ‚‚    β”‚ e₁     β”‚ -1     β”‚

Top left corner I’m referring to is ?

In this simple example I can’t see how to reorganize so 9 c elements are in the 4 (3?) row header spaces. Conversely how to put 4 (3?) a elements into 9 spaces?

Should I be recovering my pauli matrices or it seems I’ll get 4x4 dirac-like matrices?

Figured it out.

You put a 1 in the top left.

Then use the orthogonal array representation ( row, column, value) tuples of the latin square and the equivalence class (row, column, value) equiv (value, column, row) Finally use a dictionary to map from value to row.

ref: https://en.wikipedia.org/wiki/Latin_square

Is that how you do it?

Still not quite sure why this gives you a matrix representation other than some vague notion of how it would act on a column vector of the β€œheaders”.

Hi @Orbots,

Yes - that’s pretty much how I do it. While 2x2 real matrices can indeed generate a basis for \mathbb R_2 (as in your example using \sigma_1 and \sigma_3), that is not the case for all signatures (e.g. \mathbb R_{0,2}, also 2D, but no 2x2 real matrix rep). For 2D spaces of any signature, a 4x4 real matrix is needed. TBH, I implemented this a couple of years ago after staring at Cayley tables for to long, and have always assumed it was a known procedure. Reviewing it, there’s some quirks (sign/symmetry swaps) I’d need to think about, and I seem to be unable to find a reference with a similar approach. (and as you might guess, I have a better way to do GA than matrix reps).

Now I’ll be thinking about this all day.

Cheers,

Steven.

1 Like

Thanks for discovering this! Since the matrices are so large ( but sparse! ) not sure if they are useful in practice. Very cool thing to have in the toolbox though.

I’m actually trying to solve the reverse problem. Take a set of mutually orthogonal matrices that mostly anti-commute and try to find a best fit geometric algebra.

In your example :

β”‚ ? β”‚ e₁ β”‚ eβ‚‚ β”‚ e₁eβ‚‚ β”‚
┼───────┼────────┼────────┼─────────
β”‚ e₁ β”‚ 1 β”‚ e₁eβ‚‚ β”‚ eβ‚‚ β”‚
β”‚ eβ‚‚ β”‚ -e₁eβ‚‚ β”‚ 1 β”‚ -e₁ β”‚
β”‚ e₁eβ‚‚ β”‚ -eβ‚‚ β”‚ e₁ β”‚ -1 β”‚
``

From the cayley table, you start from a generic element z :

1z = a + be1 + ce2 + de1e2
e1
z = ae1 + b + ce1e2 + de2
e2z = ae2 - be1e2 +c -de1
e1e2
z = ae1e2 -be2 +ce1 -d

we recognize the Cayley table in a system form
but then you reorganize the basis elements in the correct order :

1z = a + be1 + ce2 + de1e2
e1
z = b +ae1 + de2 + ce1e2
e2z = c -de1 + ae2 - be1e2
e1e2
z = -d +ce1 -be2 + ae1e2

You can read the matrix directly :

a b c d
b a d c
c -d a -b
-d c -b a

for z=e1 then (a=0,b=1,c=0,d=0), we get :
0 1 0 0
1 0 0 0
0 0 0 -1
0 0 -1 0

With this method you get a 2^n matrix regular representation.

1 Like