EVA version :  1.24
enter Cl(p) or Cl(p,q) :  p+q number basis vectors up to 5  , p positive squares, q negative squares
 
> tutor5()
 
##### example : electromagnetism : Run Script and call tutor5()  #####
Cl(3,1)
oriented volume :
j = e1234
signature : (1,1,1,-1)
 
E=gp(e1+2e2+4e3,e4)     # E = E e4
(0,0,0,0,0,0,0,1,0,2,4,0,0,0,0,0)
 
B=gp(3e1+5e2+7e3,e4)    # B = B e4
(0,0,0,0,0,0,0,3,0,5,7,0,0,0,0,0)
 
j=e1234                   # role of imaginary unit is played by j=e1234  j^2=-1
 
F=E-gp(j,B)              # electromagnetic field  F = E - jB
(0,0,0,0,0,-7,5,1,-3,2,4,0,0,0,0,0)
 
consider a boost of half the velocity of ligth, direction of positive x-axis :
 
v=gp(0.5*e1,e4)       # v = v e4
(0,0,0,0,0,0,0,0.5,0,0,0,0,0,0,0,0)
 
a=atanh1(v)
(0,0,0,0,0,0,0,0.54927,0,0,0,0,0,0,0,0)
 
s=exp1(a/2)
(1.03795,0,0,0,0,0,0,0.2781,0,0,0,0,0,0,0,0)
 
G=gp(gp(s,F),rev(s))    # Lorentz transform of electromagnetic field: s F/s
(0,0,0,0,0,-6.92814,8.08263,1,-3,-1.7318,7.50526,0,0,0,0,0)
 
gp(F,F/2)               # compute Lorentz invariants : F F/2, G G/2
(-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-41)
gp(G,G/2)
(-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-41)
 
gp(F,gp(e4,F/2))       # Poynting vector and energy density: F e4 F/2, G e4 G/2
(0,6,-5,1,-52,0,0,0,0,0,0,0,0,0,0,0)
gp(G,gp(e4,G/2)
(0,72.66,-15.59,-13.28,-91.33,0,0,0,0,0,0,0,0,0,0,0)
>
    electromagnetism