Psigma - Maple Help

Physics[Psigma] - the Pauli's 2 x 2 sigma matrices

 Calling Sequence Psigma[n]

Parameters

 n - an integer between 0 and 4, or an algebraic expression representing it, identifying a Pauli matrix

Description

 • The Psigma[n] command, where n ranges from 1 to 3, represents the three Pauli matrices, displayed on the screen as ${{\mathrm{\sigma }}}_{n}$; these are the Hermitian and unitary matrices

${{\mathrm{\sigma }}}_{1}=\left[\begin{array}{cc}0& 1\\ 1& 0\end{array}\right],{{\mathrm{\sigma }}}_{2}=\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right],{{\mathrm{\sigma }}}_{3}=\left[\begin{array}{cc}1& 0\\ 0& -1\end{array}\right]$

 where $I$ is the imaginary unit (to represent it with a lowercase $i$, see interface,imaginaryunit). Psigma[...] can be also be indexed with the letters x, y and z, with the standard correspondence ${{\mathrm{\sigma }}}_{x}={{\mathrm{\sigma }}}_{1}$ ${{\mathrm{\sigma }}}_{y}={{\mathrm{\sigma }}}_{2}$ and ${{\mathrm{\sigma }}}_{z}={{\mathrm{\sigma }}}_{3}$, and also with + and - (include the ), representing the ladder operators

${{\mathrm{\sigma }}}_{+}\equiv {{\mathrm{\sigma }}}_{1}+I{{\mathrm{\sigma }}}_{2}=\left[\begin{array}{cc}0& 2\\ 0& 0\end{array}\right]$

${{\mathrm{\sigma }}}_{-}\equiv {{\mathrm{\sigma }}}_{1}-I{{\mathrm{\sigma }}}_{2}=\left[\begin{array}{cc}0& 0\\ 2& 0\end{array}\right]$

 To see the matrix form of any of these formulas use Physics:-Library:-RewriteInMatrixForm.
 • The Pauli matrices satisfy the commutation relations

${\left[{{\mathrm{\sigma }}}_{a},{{\mathrm{\sigma }}}_{b}\right]}_{-}=2I{\mathrm{\epsilon }}_{a,b,c}{{\mathrm{\sigma }}}_{c}$

${\left[{{\mathrm{\sigma }}}_{a},{{\mathrm{\sigma }}}_{b}\right]}_{+}=2{\mathrm{\delta }}_{a,b}$

 where ${\mathrm{\delta }}_{a,b}$ and ${\mathrm{\epsilon }}_{a,b,c}$ are respectively the KroneckerDelta and LeviCivita symbols, and $a,b,c$ range from 1 to 3. The Pauli matrices satisfy $\mathrm{Det}\left({{\mathrm{\sigma }}}_{a}\right)=-1,\mathrm{Trace}\left({{\mathrm{\sigma }}}_{a}\right)=0$, and ${{\mathrm{\sigma }}}_{a}^{2}=1$ (the 2 x 2 identity matrix), where Det represents the determinant, and Trace represents/computes the trace.
 • When Physics is loaded, the three Pauli matrices Psigma[a], with a ranging from 1 to 3, together with Psigma[4] representing the 2 x 2 identity, are the components of a 4-vector in spacetime, Psigma[mu], with mu ranging from 1 to 4 and displayed as ${{\mathrm{\sigma }}}_{\mathrm{\mu }}$. As with all spacetime tensors, you can use the value 0 of an index to refer to the position of the timelike component (by default equal to 4). The defining algebra for the 3D Pauli matrices ${{\mathrm{\sigma }}}_{a}$ shown above is extended to the 4D ${{\mathrm{\sigma }}}_{\mathrm{\mu }}$ as follows

${\left[{{\mathrm{\sigma }}}_{\mathrm{\mu }},{{\mathrm{\sigma }}}_{\mathrm{\nu }}\right]}_{-}=2I{\mathrm{\epsilon }}_{4,\mathrm{\mu },\mathrm{\nu }\phantom{\mathrm{\alpha }}}^{\phantom{4}\phantom{,\mathrm{\mu },\mathrm{\nu }}\mathrm{\alpha }}{{\mathrm{\sigma }}}_{\mathrm{\alpha }}$

${\left[{{\mathrm{\sigma }}}_{\mathrm{\mu }},{{\mathrm{\sigma }}}_{\mathrm{\nu }}\right]}_{+}=2{{\mathrm{\sigma }}}_{\mathrm{\mu }}{\mathrm{\delta }}_{\mathrm{\nu }\phantom{4}}^{\phantom{\mathrm{\nu }}4}+2{{\mathrm{\sigma }}}_{\mathrm{\nu }}{\mathrm{\delta }}_{\mathrm{\mu }\phantom{4}}^{\phantom{\mathrm{\mu }}4}-2{g}_{\mathrm{\mu },\mathrm{\nu }}$

 • Note: The default metric is of Minkowski type with signature (---+), so the space components of the contravariant ${\mathrm{\sigma }}^{\mathrm{\mu }}$ change in sign with respect to the definition of the Pauli matrices shown above.
 • You can use Setup to change the metric or set a different signature, for example with the timelike component in position 1, as in (+---) or (-+++). That, however, makes the values 1, 2 and 3 of the index $\mathrm{\mu }$ respectively refer to the identity matrix and the Pauli matrices 1, 2. To work with (+---) or (-+++) and avoid the inconvenience of having Psigma[1] referring to the identity matrix instead of ${{\mathrm{\sigma }}}_{x}$, set spaceindices or su2indices, for example via $\mathrm{Setup}\left(\mathrm{su2indices}=\mathrm{lowercaselatin_ah}\right)$, and use Define with its redo option to redefine the type of tensor of Psigma, for example entering $\mathrm{Define}\left(\mathrm{redo},{\mathrm{Psigma}}_{a}\right)$. In that way Psigma[a] becomes a 3D tensor, free of the issue mentioned about the numerical value of the index 1 in Psigma[mu].

Examples

 > $\mathrm{with}\left(\mathrm{Physics}\right):$
 > $\mathrm{Setup}\left(\mathrm{mathematicalnotation}=\mathrm{true}\right)$
 $\left[{\mathrm{mathematicalnotation}}{=}{\mathrm{true}}\right]$ (1)
 > $\mathrm{Psigma}\left[1\right]$
 ${{\mathrm{\sigma }}}_{{1}}$ (2)

You can see the matrix contents of ${\mathrm{\sigma }}_{1}$ in different ways, for example:

 > $\mathrm{Psigma}\left[1,\mathrm{matrix}\right]$
 ${{\mathrm{Psigma}}}_{{1}}{=}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)$ (3)

or for generic expressions involving tensors that represent matrices use

 > $\mathrm{Library}:-\mathrm{RewriteInMatrixForm}\left(\right)$
 $\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]$ (4)
 > $\mathrm{Psigma}\left[1\right]\mathrm{Psigma}\left[2\right]+\mathrm{Psigma}\left[2\right]\mathrm{Psigma}\left[1\right]$
 ${{\mathrm{\sigma }}}_{{1}}{}{{\mathrm{\sigma }}}_{{2}}{+}{{\mathrm{\sigma }}}_{{2}}{}{{\mathrm{\sigma }}}_{{1}}$ (5)
 > $\mathrm{Library}:-\mathrm{RewriteInMatrixForm}\left(\right)$
 ${\mathrm{.}}{}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]{,}\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right]\right){+}{\mathrm{.}}{}\left(\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right]{,}\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)$ (6)

Besides Library:-RewriteInMatrixForm, which shows the matrix contents of a tensorial expression, to perform those matrix operations you can use

 > $\mathrm{Library}:-\mathrm{PerformMatrixOperations}\left(\right)$
 $\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]$ (7)

Among the basic properties of Pauli matrices, there are

 > $\mathrm{Psigma}\left[1\right]\mathrm{Psigma}\left[1\right]$
 ${{\mathrm{\sigma }}}_{{1}}^{{2}}$ (8)
 > $\mathrm{Trace}\left(\right)$
 ${2}$ (9)
 > $\mathrm{Psigma}\left[1\right]\mathrm{Psigma}\left[2\right]$
 ${{\mathrm{\sigma }}}_{{1}}{}{{\mathrm{\sigma }}}_{{2}}$ (10)
 > $\mathrm{Trace}\left(\right)$
 ${0}$ (11)

To see the algebra satisfied by the Pauli matrices at any moment use Library:-DefaultAlgebraRules

 > $\mathrm{Library}:-\mathrm{DefaultAlgebraRules}\left(\mathrm{Psigma}\right)$
 ${\mathrm{%Commutator}}{}\left({{\mathrm{Psigma}}}_{{\mathrm{μ}}}{,}{{\mathrm{Psigma}}}_{{\mathrm{ν}}}\right){=}{2}{}{I}{}{{\mathrm{\epsilon }}}_{{4}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}\phantom{{\mathrm{\alpha }}}}^{\phantom{{4}}\phantom{{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{\mathrm{\alpha }}}{}{{\mathrm{\sigma }}}_{{\mathrm{\alpha }}}{,}{\mathrm{%AntiCommutator}}{}\left({{\mathrm{Psigma}}}_{{\mathrm{μ}}}{,}{{\mathrm{Psigma}}}_{{\mathrm{ν}}}\right){=}{2}{}{{\mathrm{\sigma }}}_{{\mathrm{\mu }}}{}{{\mathrm{g_}}}_{{\mathrm{\nu }}\phantom{{4}}}^{\phantom{{\mathrm{\nu }}}{4}}{+}{2}{}{{\mathrm{\sigma }}}_{{\mathrm{\nu }}}{}{{\mathrm{g_}}}_{{\mathrm{\mu }}\phantom{{4}}}^{\phantom{{\mathrm{\mu }}}{4}}{-}{2}{}{{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (12)

These equations can be verified in different ways. For example, construct an array with their components, then use its simplifier option to evaluate the commutators and anticommutators

 > $\mathrm{TensorArray}\left(\left[\right]\right)$
 $\left[\left[\begin{array}{cccc}\mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{2}\right)=2{}I{}{\mathrm{Psigma}}_{3}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{3}\right)=-2{}I{}{\mathrm{Psigma}}_{2}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{4}\right)=0\\ \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{1}\right)=-2{}I{}{\mathrm{Psigma}}_{3}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{3}\right)=2{}I{}{\mathrm{Psigma}}_{1}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{4}\right)=0\\ \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{1}\right)=2{}I{}{\mathrm{Psigma}}_{2}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{2}\right)=-2{}I{}{\mathrm{Psigma}}_{1}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{3}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{4}\right)=0\\ \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{4},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{4},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{4},{\mathrm{Psigma}}_{3}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{4},{\mathrm{Psigma}}_{4}\right)=0\end{array}\right]{,}\left[\begin{array}{cccc}\mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{1}\right)=2& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{3}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{4}\right)=2{}{\mathrm{Psigma}}_{1}\\ \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{2}\right)=2& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{3}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{4}\right)=2{}{\mathrm{Psigma}}_{2}\\ \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{3}\right)=2& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{4}\right)=2{}{\mathrm{Psigma}}_{3}\\ \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{4},{\mathrm{Psigma}}_{1}\right)=2{}{\mathrm{Psigma}}_{1}& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{4},{\mathrm{Psigma}}_{2}\right)=2{}{\mathrm{Psigma}}_{2}& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{4},{\mathrm{Psigma}}_{3}\right)=2{}{\mathrm{Psigma}}_{3}& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{4},{\mathrm{Psigma}}_{4}\right)=4{}{\mathrm{Psigma}}_{4}-2\end{array}\right]\right]$ (13)

Note that in the lines above the matricial operations are performed abstractly, with the 2x2 matrices 0 and 1 (identity) omitted. To represent the algebra of the Pauli matrices with those two matrices not omitted, see the approach used in the MaplePrimes post Algebra of the Dirac matrices with an identity matrix on the right-hand side.

 > $\mathrm{TensorArray}\left(\left[\right],\mathrm{simplifier}=\mathrm{value}\right)$
 $\left[\left[\begin{array}{cccc}0=0& 2{}I{}{\mathrm{LeviCivita}}_{1,2,4,\mathrm{~beta}}{}{\mathrm{Psigma}}_{\mathrm{β}}=2{}I{}{\mathrm{Psigma}}_{3}& 2{}I{}{\mathrm{LeviCivita}}_{1,3,4,\mathrm{~beta}}{}{\mathrm{Psigma}}_{\mathrm{β}}=-2{}I{}{\mathrm{Psigma}}_{2}& 0=0\\ -2{}I{}{\mathrm{LeviCivita}}_{1,2,4,\mathrm{~beta}}{}{\mathrm{Psigma}}_{\mathrm{β}}=-2{}I{}{\mathrm{Psigma}}_{3}& 0=0& 2{}I{}{\mathrm{LeviCivita}}_{2,3,4,\mathrm{~beta}}{}{\mathrm{Psigma}}_{\mathrm{β}}=2{}I{}{\mathrm{Psigma}}_{1}& 0=0\\ -2{}I{}{\mathrm{LeviCivita}}_{1,3,4,\mathrm{~beta}}{}{\mathrm{Psigma}}_{\mathrm{β}}=2{}I{}{\mathrm{Psigma}}_{2}& -2{}I{}{\mathrm{LeviCivita}}_{2,3,4,\mathrm{~beta}}{}{\mathrm{Psigma}}_{\mathrm{β}}=-2{}I{}{\mathrm{Psigma}}_{1}& 0=0& 0=0\\ 0=0& 0=0& 0=0& 0=0\end{array}\right]{,}\left[\begin{array}{cccc}2=2& 0=0& 0=0& 2{}{\mathrm{Psigma}}_{1}=2{}{\mathrm{Psigma}}_{1}\\ 0=0& 2=2& 0=0& 2{}{\mathrm{Psigma}}_{2}=2{}{\mathrm{Psigma}}_{2}\\ 0=0& 0=0& 2=2& 2{}{\mathrm{Psigma}}_{3}=2{}{\mathrm{Psigma}}_{3}\\ 2{}{\mathrm{Psigma}}_{1}=2{}{\mathrm{Psigma}}_{1}& 2{}{\mathrm{Psigma}}_{2}=2{}{\mathrm{Psigma}}_{2}& 2{}{\mathrm{Psigma}}_{3}=2{}{\mathrm{Psigma}}_{3}& 4{}{\mathrm{Psigma}}_{4}-2=4{}{\mathrm{Psigma}}_{4}-2\end{array}\right]\right]$ (14)

Alternatively, for instance, rewrite in matrix form the equations before computing the commutators, then activate the inert commutators using value

 > $\mathrm{Library}:-\mathrm{RewriteInMatrixForm}\left(\left[1\right]\right)$
 $\left[\begin{array}{cccc}\mathrm{%Commutator}{}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right],\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)=0& \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right],\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right]\right)=2{}I{}\left(\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right]\right)& \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right],\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right]\right)=-2{}I{}\left(\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right]\right)& \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right],\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right]\right)=0\\ \mathrm{%Commutator}{}\left(\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right],\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)=-2{}I{}\left(\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right]\right)& \mathrm{%Commutator}{}\left(\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right],\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right]\right)=0& \mathrm{%Commutator}{}\left(\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right],\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right]\right)=2{}I{}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)& \mathrm{%Commutator}{}\left(\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right],\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right]\right)=0\\ \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right],\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)=2{}I{}\left(\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right]\right)& \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right],\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right]\right)=-2{}I{}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)& \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right],\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right]\right)=0& \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right],\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right]\right)=0\\ \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right],\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)=0& \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right],\left[\begin{array}{cc}0& -I\\ I& 0\end{array}\right]\right)=0& \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right],\left[\begin{array}{rr}1& 0\\ 0& -1\end{array}\right]\right)=0& \mathrm{%Commutator}{}\left(\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right],\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right]\right)=0\end{array}\right]$ (15)
 > $\mathrm{map}\left(\mathrm{expand},\mathrm{value}\left(\right)\right)$
 $\left[\begin{array}{cccc}\left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0& \left(\left[\begin{array}{cc}2{}I& 0\\ 0& -2{}I\end{array}\right]\right)=\left(\left[\begin{array}{cc}2{}I& 0\\ 0& -2{}I\end{array}\right]\right)& \left(\left[\begin{array}{rr}0& -2\\ 2& 0\end{array}\right]\right)=\left(\left[\begin{array}{rr}0& -2\\ 2& 0\end{array}\right]\right)& \left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0\\ \left(\left[\begin{array}{cc}-2{}I& 0\\ 0& 2{}I\end{array}\right]\right)=\left(\left[\begin{array}{cc}-2{}I& 0\\ 0& 2{}I\end{array}\right]\right)& \left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0& \left(\left[\begin{array}{cc}0& 2{}I\\ 2{}I& 0\end{array}\right]\right)=\left(\left[\begin{array}{cc}0& 2{}I\\ 2{}I& 0\end{array}\right]\right)& \left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0\\ \left(\left[\begin{array}{rr}0& 2\\ -2& 0\end{array}\right]\right)=\left(\left[\begin{array}{rr}0& 2\\ -2& 0\end{array}\right]\right)& \left(\left[\begin{array}{cc}0& -2{}I\\ -2{}I& 0\end{array}\right]\right)=\left(\left[\begin{array}{cc}0& -2{}I\\ -2{}I& 0\end{array}\right]\right)& \left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0& \left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0\\ \left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0& \left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0& \left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0& \left(\left[\begin{array}{rr}0& 0\\ 0& 0\end{array}\right]\right)=0\end{array}\right]$ (16)

A notational issue, correct but that could be seen as an inconvenience, happens when you set the signature with the timelike component in position 1, as in (+---) or (-+++), in that Psigma[1] points to Psigma[0], the identity 2x2 matrix instead of to Psigma[x]

 > $\mathrm{Setup}\left(\mathrm{signature}=\mathrm{+---}\right)$
 $\left[{\mathrm{signature}}{=}{\mathrm{+ - - -}}\right]$ (17)
 > $\mathrm{Psigma}\left[1\right]=\mathrm{Psigma}\left[0\right]$
 ${{\mathrm{\sigma }}}_{{1}}{=}{{\mathrm{\sigma }}}_{{1}}$ (18)
 > $\mathrm{Psigma}\left[1,\mathrm{matrix}\right]$
 ${{\mathrm{Psigma}}}_{{1}}{=}\left(\left[\begin{array}{rr}1& 0\\ 0& 1\end{array}\right]\right)$ (19)

You can still refer to ${\mathrm{\sigma }}_{x}$ indexing with the letter x

 > $\mathrm{Psigma}\left[x\right]=\mathrm{Library}:-\mathrm{RewriteInMatrixForm}\left(\mathrm{Psigma}\left[x\right]\right)$
 ${{\mathrm{Psigma}}}_{{2}}{=}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)$ (20)

To avoid this potential inconvenience you could set Psigma to be a 3D tensor. One way of doing that is to set spaceindices and redefine Psigma using Define with its redo option (necessary)

 > $\mathrm{Setup}\left(\mathrm{spaceindices}=\mathrm{lowercaselatin_is}\right)$
 $\left[{\mathrm{spaceindices}}{=}{\mathrm{lowercaselatin_is}}\right]$ (21)

Note that the redefinition requires passing Psigma indexed with a space index

 > $\mathrm{Define}\left(\mathrm{redo},\mathrm{Psigma}\left[j\right]\right)$
 $\mathrm{Defined Pauli sigma matrices \left(Psigma\right):}{}{\mathrm{\sigma }}_{1}{},{}{\mathrm{\sigma }}_{2}{},{}{\mathrm{\sigma }}_{3}$
 $\mathrm{__________________________________________________}$
 $\mathrm{Defined objects with tensor properties}$
 $\left\{{{\mathrm{\gamma }}}_{{\mathrm{\mu }}}{,}{{\mathrm{\sigma }}}_{{j}}{,}{{\partial }}_{{\mathrm{\mu }}}{,}{{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{\mathrm{\gamma }}}_{{i}{,}{j}}{,}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}\right\}$ (22)

Now we have ${\mathrm{\sigma }}_{1}$ = ${\mathrm{\sigma }}_{x}$

 > $\mathrm{Psigma}\left[1,\mathrm{matrix}\right]$
 ${{\mathrm{Psigma}}}_{{1}}{=}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)$ (23)

Note that in this case the algebra is expressed in terms of the 3D metric, gamma_, displayed as ${\mathrm{\gamma }}_{i,j}$.

 > $\mathrm{Library}:-\mathrm{DefaultAlgebraRules}\left(\mathrm{Psigma}\right)$
 ${\mathrm{%Commutator}}{}\left({{\mathrm{Psigma}}}_{{i}}{,}{{\mathrm{Psigma}}}_{{j}}\right){=}{2}{}{I}{}{{\mathrm{\epsilon }}}_{{i}{,}{j}\phantom{{k}}}^{\phantom{{i}}\phantom{{,}{j}}{k}}{}{{\mathrm{\sigma }}}_{{k}}{,}{\mathrm{%AntiCommutator}}{}\left({{\mathrm{Psigma}}}_{{i}}{,}{{\mathrm{Psigma}}}_{{j}}\right){=}{2}{}{{\mathrm{\gamma }}}_{{i}{,}{j}}$ (24)
 > $\mathrm{TensorArray}\left(\left[\right]\right)$
 $\left[\left[\begin{array}{ccc}\mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{2}\right)=2{}I{}{\mathrm{Psigma}}_{3}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{3}\right)=-2{}I{}{\mathrm{Psigma}}_{2}\\ \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{1}\right)=-2{}I{}{\mathrm{Psigma}}_{3}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{3}\right)=2{}I{}{\mathrm{Psigma}}_{1}\\ \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{1}\right)=2{}I{}{\mathrm{Psigma}}_{2}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{2}\right)=-2{}I{}{\mathrm{Psigma}}_{1}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{3}\right)=0\end{array}\right]{,}\left[\begin{array}{ccc}\mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{1}\right)=2& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{3}\right)=0\\ \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{2}\right)=2& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{3}\right)=0\\ \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{3}\right)=2\end{array}\right]\right]$ (25)

Alternatively, to entirely detach the definition of the Pauli matrices from the details of the spacetime or space metric and signatures you can set Psigma as a tensor of a generic SU(2) space setting su2indices and redefining Psigma in the same way

 > $\mathrm{Setup}\left(\mathrm{su2indices}=\mathrm{lowercaselatin_ah}\right)$
 $\left[{\mathrm{su2indices}}{=}{\mathrm{lowercaselatin_ah}}\right]$ (26)

Note that the redefinition requires passing Psigma indexed with a su2 index

 > $\mathrm{Define}\left(\mathrm{redo},\mathrm{Psigma}\left[a\right]\right)$
 $\mathrm{Defined objects with tensor properties}$
 $\left\{{{\mathrm{\gamma }}}_{{\mathrm{\mu }}}{,}{{\mathrm{\sigma }}}_{{a}}{,}{{\partial }}_{{\mathrm{\mu }}}{,}{{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{\mathrm{\gamma }}}_{{i}{,}{j}}{,}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}\right\}$ (27)

Now, again, we have ${\mathrm{\sigma }}_{1}$ = ${\mathrm{\sigma }}_{x}$

 > $\mathrm{Psigma}\left[1,\mathrm{matrix}\right]$
 ${{\mathrm{Psigma}}}_{{1}}{=}\left(\left[\begin{array}{rr}0& 1\\ 1& 0\end{array}\right]\right)$ (28)

This time the algebra is expressed using ${\mathrm{\delta }}_{a,b}$, the KroneckerDelta, used to represent the metric in the SU(2) space, and the components of these tensorial equations are the same as those computed for Psigma as a 3D space tensor lines above

 > $\mathrm{Library}:-\mathrm{DefaultAlgebraRules}\left(\mathrm{Psigma}\right)$
 ${\mathrm{%Commutator}}{}\left({{\mathrm{Psigma}}}_{{a}}{,}{{\mathrm{Psigma}}}_{{b}}\right){=}{2}{}{I}{}{{\mathrm{\epsilon }}}_{{a}{,}{b}{,}{c}}{}{{\mathrm{\sigma }}}_{{c}}{,}{\mathrm{%AntiCommutator}}{}\left({{\mathrm{Psigma}}}_{{a}}{,}{{\mathrm{Psigma}}}_{{b}}\right){=}{2}{}{{\mathrm{\delta }}}_{{a}{,}{b}}$ (29)
 > $\mathrm{TensorArray}\left(\left[\right]\right)$
 $\left[\left[\begin{array}{ccc}\mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{2}\right)=2{}I{}{\mathrm{Psigma}}_{3}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{3}\right)=-2{}I{}{\mathrm{Psigma}}_{2}\\ \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{1}\right)=-2{}I{}{\mathrm{Psigma}}_{3}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{3}\right)=2{}I{}{\mathrm{Psigma}}_{1}\\ \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{1}\right)=2{}I{}{\mathrm{Psigma}}_{2}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{2}\right)=-2{}I{}{\mathrm{Psigma}}_{1}& \mathrm{%Commutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{3}\right)=0\end{array}\right]{,}\left[\begin{array}{ccc}\mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{1}\right)=2& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{1},{\mathrm{Psigma}}_{3}\right)=0\\ \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{2}\right)=2& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{2},{\mathrm{Psigma}}_{3}\right)=0\\ \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{1}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{2}\right)=0& \mathrm{%AntiCommutator}{}\left({\mathrm{Psigma}}_{3},{\mathrm{Psigma}}_{3}\right)=2\end{array}\right]\right]$ (30)

To activate the inert commutators and anticommutators use value

 > $\mathrm{value}\left(\right)$
 $\left[\left[\begin{array}{ccc}0=0& 2{}I{}{\mathrm{Psigma}}_{3}=2{}I{}{\mathrm{Psigma}}_{3}& -2{}I{}{\mathrm{Psigma}}_{2}=-2{}I{}{\mathrm{Psigma}}_{2}\\ -2{}I{}{\mathrm{Psigma}}_{3}=-2{}I{}{\mathrm{Psigma}}_{3}& 0=0& 2{}I{}{\mathrm{Psigma}}_{1}=2{}I{}{\mathrm{Psigma}}_{1}\\ 2{}I{}{\mathrm{Psigma}}_{2}=2{}I{}{\mathrm{Psigma}}_{2}& -2{}I{}{\mathrm{Psigma}}_{1}=-2{}I{}{\mathrm{Psigma}}_{1}& 0=0\end{array}\right]{,}\left[\begin{array}{ccc}2=2& 0=0& 0=0\\ 0=0& 2=2& 0=0\\ 0=0& 0=0& 2=2\end{array}\right]\right]$ (31)
 > 

Compatibility

 • The Physics[Psigma] command was updated in Maple 2020.