Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

GeometricAlgebra

Guides

  • Dual numbers
  • Geometric Algebra
  • Matrix Gateway

Tech Notes

  • Conformal Geometry
  • Dual numbers
  • Geometric Numbers
  • Matrix Gateway
  • Operator Duality
  • Projective Geometry
  • Spinors

Symbols

  • ConvertGeometricAlgebra
  • GeometricAlgebra
  • GeometricProduct
  • Grade
  • Multivector
Spinors
SpinorMultivector
make a
Multivector
from a vector or a column matrix
PauliSpinor
make a column matrix from a
Multivector
in $PauliAlgebra
DiracSpinor
make a column matrix from a
Multivector
in $DiracAlgebra
Work with
Multivector
representation of spinors.

Pauli

In[3]:=
Get["Wolfram`GeometricAlgebra`PauliDirac`"]
In[4]:=
{,
σ
1
,
σ
2
,
σ
3
,ℐ}=$PauliAlgebra["Basis",{0,1,-1}];​​{
iσ
1
,
iσ
2
,
iσ
3
}=$PauliAlgebra["PseudoBasis",1];
In[6]:=
ϕ=SpinorMultivector[Table[Superscript[a,i],{i,0,3}]]​​η=SpinorMultivector[Table[Superscript[b,i],{i,0,3}]]
Out[6]=
0
a
+
3
a
σ
12
+(-
2
a
)
σ
13
+
1
a
σ
23
Out[7]=
0
b
+
3
b
σ
12
+(-
2
b
)
σ
13
+
1
b
σ
23
In[8]:=
PauliSpinor[ϕ]
Out[8]=
0
a
+
3
a
-
2
a
+
1
a
In[73]:=
SpinorMultivector@PauliSpinor[ϕ]ϕ
Out[73]=
True
Operating with Pauli matrix on multivector spinor

σ
i
|ϕ〉
σ
i
ϕ
σ
3
:
In[10]:=
Table[SpinorMultivector[PauliMatrix[i].PauliSpinor[ϕ]]
σ
i
**ϕ**
σ
3
,{i,3}]
Out[10]=
{True,True,True}
Imaginary unit multiplication
i|ϕ〉ϕℐ
σ
3
:
In[11]:=
SpinorMultivector[IPauliSpinor[ϕ]]ϕ**ℐ**
σ
3
ϕ**
iσ
3
Out[11]=
True
In $PauliSpectralBasis basis vectors has an (almost) familiar form of Pauli matrices:
In[12]:=
MatrixForm@Normal@MultivectorMatrix[#,"Basis"$PauliSpectralBasis]&/@{
σ
1
,
σ
2
,
σ
3
}
Out[12]=
In[13]:=
PauliMatrix[2]
Out[13]=
0
-

0
Second Pauli matrix looks like it has a wrong sign, but in the isomorphism

3
≡
M
2×2


0,1

pseudoscalar of

0,1
of matrix components represents pseudoscalar of the “complex” algebra for

3


n+1,n
or

n,n+1
depending on a commutativity of the pseudoscalar), which is

1,2
.But pseudoscalar converted from

1,2
to

3
acquires a minus sign:
In[14]:=
$PauliAlgebra["ComplexAlgebra"]
Out[14]=

1,2
In[15]:=
ConvertGeometricAlgebra
[$PauliAlgebra["ComplexAlgebra"]["Pseudoscalar"],$PauliAlgebra]
Out[15]=
-ℐ
A transformation that takes this into account is ComplexMultivector, that leaves only scalar and pseudoscalar parts with the correct multiplier:
In[16]:=
MultivectorMatrix[
σ
2
,"Basis"$PauliSpectralBasis][ComplexMultivector[#,$PauliAlgebra]&]
Out[16]=
Converting directly from a familiar Pauli matrix to

3
:
In[53]:=
Table[MatrixMultivector[MultivectorArray[PauliMatrix[i]],$PauliAlgebra,"Basis"$PauliSpectralBasis],{i,0,3}]
Out[53]=
Again second Pauli matrix does not directly converts to
σ
2
, but imaginary unit in this case is supposed to represent pseudoscalar of

3
.
A conversion of imaginary part in multivector coordinates as though it is a pseudoscalar (on the left) can be done with “Real” property”
In[58]:=
Map[#["Real"]&,Table[MatrixMultivector[MultivectorArray[PauliMatrix[i]],$PauliAlgebra,"Basis"$PauliSpectralBasis],{i,3}]]$PauliBasis
Out[58]=
True

Dirac

Dirac matrices
i

γ
from vectors of

1,3
:
In[87]:=
{
γ
0
,
γ
1
,
γ
2
,
γ
3
}=$DiracAlgebra["Basis",1];
In[85]:=
Table[MatrixForm@Normal@MultivectorMatrix[
γ
i
,"Basis"$DiracSpectralBasis],{i,0,3}]
Out[85]=
And the covariant version

γ
i
:
In[86]:=
Table[MatrixForm@Normal@MultivectorMatrix[
γ
i
,"Basis"$DiracCovariantSpectralBasis],{i,0,3}]
Out[86]=
Backwards from Dirac matrices to multivectors:
In[88]:=
Table[MatrixMultivector[MultivectorArray[DiracMatrix[i]],$DiracAlgebra,"Basis"$DiracSpectralBasis],{i,0,3}]
Out[88]=
In[89]:=
Table[MatrixMultivector[MultivectorArray[DiracMatrix[i]],$DiracAlgebra,"Basis"$DiracCovariantSpectralBasis],{i,0,3}]
Out[89]=
In[91]:=
Inverse/@{
γ
0
,
γ
1
,
γ
2
,
γ
3
}
Out[91]=
Dirac spinor:
In[109]:=
ψ=SpinorMultivector[Table[{Superscript[φ,i]},{i,0,3}]]
Out[109]=
-
0
φ
4
+
0
φ
4
γ
0
+-
3
φ
4
γ
1
+

3
φ
4
γ
2
+-
2
φ
4
γ
3
+-
3
φ
4
γ
01
+

3
φ
4
γ
02
+-
2
φ
4
γ
03
+-

0
φ
4
γ
12
+
1
φ
4
γ
13
+-

1
φ
4
γ
23
+

0
φ
4
γ
012
+-
1
φ
4
γ
013
+

1
φ
4
γ
023
+-

2
φ
4
γ
123
+-

2
φ
4
γ
5
In[95]:=
Normal@MultivectorMatrix[ψ,"Basis"$DiracSpectralBasis]
Out[95]=
In[94]:=
DiracSpinor[ψ]
Out[94]=
0
φ
1
φ
2
φ
3
φ
Multiplying spinor by Dirac gamma matrix

γ
i
|ψ〉
γ
i
ψ
γ
0
In[110]:=
Table[SpinorMultivector[DiracMatrix[i].DiracSpinor[ψ]]
γ
i
**ψ**
γ
0
,{i,0,3}]
Out[110]=
{True,True,True,True}
Multiplying by imaginary unit
|ψ〉ψℐ
σ
3
=-ψ
γ
12
In[111]:=
Table[SpinorMultivector[DiracSpinor[ψ]]-ψ**(
γ
1
**
γ
2
),{i,0,3}]
Out[111]=
{True,True,True,True}
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com