The PauliMatrix is a square matrix which can be represented by a linear combination of basis matrices.
I'm not sure if this is the best name as I think this is a bit more general than the matrices that arise in Pauli's treatment of spin in quantum mechanics?
One application of this is to find matrix representation isomorphic to a given Clifford Algebra.
There are two reasons that make this useful:
 It gives a completely independent method of calculating the Clifford product which can be used to check the multiplication in the CliffordAlgebra domain and more importantly,
 It allows us to calculate the CliffordAlgebra multiplicative inverse which would be difficult using other methods.
(1) > P := PauliMatrix(Integer,2,2) (1) PauliMatrix(Integer,2,2) Type: Type (2) > a := matrix([[1,2],[3,4]])$P +1 2+ (2)   +3 4+ Type: PauliMatrix(Integer,2,2) (3) > a*a +7 10+ (3)   +15 22+ Type: PauliMatrix(Integer,2,2) (4) >
Rafal Ablamowicz method: (Also see Pertti Lounesto 2nd ed P225) A matrix will itself satisfy the characteristic polynomial equation obeyed by its own eigenvalues and that therefore the equivalent Clifford number will also obey the same characteristic equation
det(A  λ I) = 0
where
 A = matrix
 λ = eigenvalues
 I = identity matrix
Example 1  Two Dimensional Case
The bilinear form is:
a_{11}  a_{12} 
a_{21}  a_{22} 
m1*m2 = m1 /\ m2 + bilinear(m1,m2)
m1*m1 = m1 /\ m1 + bilinear(m1,m1) = bilinear(m1,m1)
(1) > )library CLIF CliffordAlgebra is now explicitly exposed in frame frame1 CliffordAlgebra will be automatically loaded when needed from /home/martin/CLIF.NRLIB/CLIF (1)>B:=CliffordAlgebra(2,Expression(Fraction(Integer)),[[a1,a2],[a3,a4]]) (1) CliffordAlgebra(2,Expression(Fraction(Integer)),[[a1,a2],[a3,a4]]) Type: Type (2) > C:B := multivector[c1,c2,c3,c4] (2) c1 + c2 e + c3 e + c4 e e 1 2 1 2 Type: CliffordAlgebra(2,Expression(Fraction(Integer)),[[a1,a2],[a3,a4]]) (3) > C*C (3) 2 2 2 2 ( a1 a4 + a2 a3)c4 + a4 c3 + (a3 + a2)c2 c3 + a1 c2 + c1 + ((a3  a2)c2 c4 + 2c1 c2)e + ((a3  a2)c3 c4 + 2c1 c3)e 1 2 + 2 ((a3  a2)c4 + 2c1 c4)e e 1 2 Type: CliffordAlgebra(2,Expression(Fraction(Integer)),[[a1,a2],[a3,a4]]) (4) >
:
a_{11} = 1  a_{12} = 0 
a_{21} = 0  a_{22} = 1 
(1) > )library CLIF CliffordAlgebra is now explicitly exposed in frame frame1 CliffordAlgebra will be automatically loaded when needed from /home/martin/CLIF.NRLIB/CLIF (1) > B := CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,0],[0,1]]) (1) CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,0],[0,1]]) Type: Type (2) > C:B := multivector[c1,c2,c3,c4] (2) c1 + c2 e + c3 e + c4 e e 1 2 1 2 Type: CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,0],[0,1]]) (3) > C*C 2 2 2 2 (3)  c4 + c3 + c2 + c1 + 2c1 c2 e + 2c1 c3 e + 2c1 c4 e e 1 2 1 2 Type: CliffordAlgebra(2,Expression(Fraction(Integer)),[[1,0],[0,1]]) (4) >
c1 =  c4² + c3² + c2² + c1²
c2 = 2c1 c2
c3 = 2c1 c3
c4 = 2c1 c4
so:
c1 = 1/2
1/4 =  c4² + c3² + c2²
We need to find primitive idempotent (it squares to itself). So an idempotent is:
ƒ=½(1+e_{1})
because:
ƒ=ƒ²
since:
ƒ²= ¼(1+e_{1})(1+e_{1}) = ¼(1 + 2e_{1}+ e_{1}²) = ¼(2e_{1}+ 2e_{1}) =½(1+e_{1}) = ƒ
so if we take ƒ as the first base, to get the other bases we take all combinations:
ƒ_{1} =ƒ=½(1+e_{1})
ƒ_{2} =e_{2}ƒ = ½e_{2}(1+e_{1}) = ½(1 e_{1})e_{2}
ƒ_{3} =ƒe_{2} = ½(1+e_{1}) e_{2}
ƒ_{4 }=e_{2}ƒe_{2} = ½ e_{2}(1+e_{1}) e_{2} = ½ (1e_{1})
A ƒ = 

= 

ƒ 
Converting Instances

= m1 

+ m2 

+ m3 

+ m4 


= 


= 


= 


Compute the inverse using the coefficients from the polynomial.
Pauli Matrix
For two dimensions the Pauli matricies would be:
b1 := matrix[[1,0],[0,1]]
b2 := matrix[[0,1],[1,0]]
These square to 1:
(3) > b1*b1 +1 0+ (3)   +0 1+ Type: Matrix(Integer) (4) > b2*b2 +1 0+ (4)   +0 1+ Type: Matrix(Integer)
For three dimensions the Pauli matricies would be:
b1 := matrix[[1,0],[0,1]] b2 := matrix[[1,0],[0,1]] b3 := matrix[[0,1],[1,0]] b4 := matrix[[0,%i],[%i,0]]
Which square to one:
(5) > b1*b1 +1 0+ (5)   +0 1+ Type: Matrix(Integer) (6) > b2*b2 +1 0+ (6)   +0 1+ Type: Matrix(Integer) (7) > b3*b3 +1 0+ (7)   +0 1+ Type: Matrix(Integer) (13) > b4*b4 +1 0+ (13)   +0 1+ Type: Matrix(Complex(Integer))
Power Sets
A set S, the power set (or powerset) of S, written P(S) or 2S, is the set of all subsets of S, including the empty set and S itself.
(1) > P :=PauliMatrix(2,Float,[matrix[[1,0],[0,1]],matrix[[0,1],[1,0]]]) (1) PauliMatrix(2,Float,[MATRIX,MATRIX]) Type: Type (2) > localPowerSets(1)$P (2) [[1],[]] Type: List(List(PositiveInteger)) (3) > localPowerSets(2)$P (3) [[2],[2,1],[1],[]] Type: List(List(PositiveInteger)) (4) > localPowerSets(3)$P (4) [[3],[3,1],[3,2,1],[3,2],[2],[2,1],[1],[]] Type: List(List(PositiveInteger)) (5) > localPowerSets(4)$P (5) [[4], [4,1], [4,2,1], [4,2], [4,3,2], [4,3,2,1], [4,3,1], [4,3], [3], [3,1],[3,2,1], [3,2], [2], [2,1], [1], []] Type: List(List(PositiveInteger)) (6) >
Discussion
See this thread on FriCAS forum.