matrix square



Sorry, I should have added that the use of Clifford algebra to find the most general solution of the matrix equation
X^^2 = ident(n)
works only for even dimensions. I also used "n" in a confusing way.
Another nice example with n=4 (Dirac matrices). 
Try the following maxima code.
/* We need the tensor product of matrices *//* Tensor Product of Matrices */
tp(A,B):=  block([n,n1,n2,m,m1,m2,p1,p2,C],       n:matrix_size(A), n1:first(n), n2:second(n),       m:matrix_size(B), m1:first(m),  m2:second(m),       p1:n1*m1, p2:n2*m2,       C:zeromatrix(p1,p2),       for i1:1 thru n1 do        for i2:1 thru n2 do         for j1:1 thru m1 do          for j2:1 thru m2 do           C[(i1-1)*m1+j1,(i2-1)*m2+j2]:A[i1,i2]*B[j1,j2],        return(C))$
/* Again we start with the hyperbolic quaternions (Pauli matrices)*/
e[0]:matrix([1,0],[0,1]);e[1]:matrix([0,1],[1,0]);e[2]:matrix([0,%i],[-%i,0]);e[3]:matrix([1,0],[0,-1]);
/* Quaternion units */
I:%i*e[1]; J:%i*e[2]; K:%i*e[3];
/* Now we form the tensor products of the elements of the basis      to get a Lorentz invariant basis for 4 dimensional space-time */
E[0]:tp(e[3],e[0]);E[1]:tp(e[1],I);E[2]:tp(e[1],J);E[3]:tp(e[1],K);
/* It forms a vector basis for a Clifford algebra */
for i:0 thru 3 do disp(E[i]^^2);for i:0 thru 2 do for j:i+1 thru 3 do disp((1/2)*(E[i].E[j]+E[j].E[i]));
/* Now construct a 4-vector X with components: */
x[0]:cosh(w);x[1]:cos(u)*sin(v)*sinh(w);x[2]:sin(u)*sin(v)*sinh(w);x[3]:cos(v)*sinh(w);
/* in that Clifford basis: */
X:sum(x[i]*E[i],i,0,3);trigsimp(expand(X^^2));
> answer: X^^2 = iden(4). QED
The solution has three free parameters (u,v,w) and the set fits the hyperboloid
x[0]^2 - x[1]^2 - x[2]^2 - x[3]^2 = 1.
Its equation is Lorentz invariant (pseudo-hypersphere).
One can extend the method to any even dimension by tensor product of matrices, an operation which should be added to maxima.
Regards,
Rene'.dositheus at hotmail.com