MATRIX OPERATIONS

m = { {1,2,3,4}, {4,3,2,1}, {1,2,3,4}, {4,3,2,1}}

v = {1,2,3,4}

m . v

Transpose[m]

MatrixForm[m]

Inverse[m]

IdentityMatrix[4]

MatrixForm[ m . m - % ]

Eigenvalues[m]

Table[ Random[], {i,4}, {j,4} ]

Eigenvalues[%]

Dirac Matrices

g1 = { {0,0,0,-I}, {0,0,-I,0}, {0,I,0,0}, {I,0,0,0} }

MatrixForm[g1]

g2 = { {0,0,0,-1}, {0,0,1,0}, {0,1,0,0}, {-1,0,0,0} } ;

MatrixForm[g2]

MatrixForm[ g1 . g1 ]

MatrixForm[ g2 . g2 ]

MatrixForm[ g1 . g2 + g2 . g1 ]

MatrixForm[ (g1 . g2 - g2 . g1)/(2 I) ]

Eigenvalues[ g1 ]

Eigenvalues[ g2 ]

op = px g1 + py g2 ;

MatrixForm[ op ]

Det[ op - e IdentityMatrix[4] ]

Factor[%]

Solve[ % == 0, e ]

Pauli Spin Matrices

s1 = { {0,1}, {1,0} }

s2 = { {0,-I}, {I,0} }

s3 = { {1,0}, {0,-1} }

s1 . s2 / I

s2 . s3 / I

s3 . s1 / I

s1^2 + s2^2 + s3^2

( s1 . s2 - s2 . s1 ) / (2 I)

( s2 . s3 - s3 . s2 ) / (2 I)

( s3 . s1 - s1 . s3 )/ (2 I)

I s3 . s2 . s1

Eigenvalues[s1]

Eigenvectors[s1]

Eigenvalues[s2]

Eigenvectors[s2]

Eigenvalues[s3]

Eigenvectors[s3]

dop = px s1 + py s2 + pz s3 ;

MatrixForm[dop]

Eigenvalues[dop]

Eigenvectors[dop]

rot = { {Cos[t],Sin[t]}, {-Sin[t], Cos[t]} } ;

MatrixForm[%]

MatrixPower[rot,2] ;

MatrixForm[%]

MatrixForm[ Simplify[%] ]