Wolfram Research

Function Repository Resource:

DiracMatrix

Source Notebook

Dirac matrices in any dimensions

Contributed by: Enrique Zeleny

ResourceFunction["DiracMatrix"][n]

gives the nth Dirac matrix.

Details and Options

Dirac matrices for dimensions higher than four can be generalized as Kronecker products of Pauli matrices.
For dimension n, the number of Dirac matrices is the same as n (labeled from 1 to n), and the dimension of the matrices is 2ν×2ν, where n=2ν.

Examples

Basic Examples

Standard Dirac matrices:

In[1]:=
ResourceFunction["DiracMatrix"][1]
Out[1]=
In[2]:=
ResourceFunction["DiracMatrix"][4]
Out[2]=

Plot matrices:

In[3]:=
ArrayPlot[ResourceFunction["DiracMatrix"][4], ColorFunction -> Hue, ColorRules -> {0 -> White, I -> Red, -I -> Green, 1 -> Blue, -1 -> Yellow}, Mesh -> True]
Out[3]=

With higher dimensions:

In[4]:=
GraphicsGrid[{Table[
   ArrayPlot[ResourceFunction["DiracMatrix"][n, "Dimension" -> 8], ColorFunction -> Hue, ColorRules -> {0 -> White, I -> Red, -I -> Green, 1 -> Blue, -1 -> Yellow}, Mesh -> True], {n, 8}]}, ImageSize -> 650]
Out[4]=

Options

Dimension

In[5]:=
ResourceFunction["DiracMatrix"][1, "Dimension" -> 4]
Out[5]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

Source Metadata

License Information