>From mailnull Tue Jan 1 13:50:49 2013
Date: Tue, 1 Jan 2013 21:50:26 +0800
From: Jianrong Li <lijr07 at gmail.com>
Content-Type: multipart/mixed;
boundary="===============5430374435244376035=="
--===============5430374435244376035==
Content-Type: multipart/alternative; boundary="047d7b33d6f078984604d23a697f"
--047d7b33d6f078984604d23a697f
Content-Type: text/plain; charset="ISO-8859-1"
Dear all,
How could I let the default field in maxima to be the two element field
F_2= {0, 1} (1+1=0)? I have a matrix over F_2 and want to check that
whether it is diagonalizable or not. How could I do this? Thank you very
much.
With best wishes,
Jianrong.
I don't know if anyone has answered this question yet. Here is one
approach.
First, if you want to know if a matrix a is diagonalizable over F_2,
then you just need to know if its minimal polynonmial is one of t, t+1
or t*(t+1). I doubt that is what you mean, though. You likely want to
know if a is diagonalizable over some algebraic extension of F_2.
Second, the rat* family of functions know something about finite
fields. modulus sets the order of the field:
(%i1) display2d:false$
(%i2) modulus:2$
(%i3) a:genmatrix(lambda([i,j],i+j),3,3);
(%o3) matrix([2,3,4],[3,4,5],[4,5,6])
We can reduce the coefficients mod 2:
(%i4) b:rat(a);
(%o4) matrix([0,1,0],[1,0,1],[0,1,0])
We compute the charpoly of a, then reduce mod 2:
(%i5) p:charpoly(a,t);
(%o5) ((4-t)*(6-t)-25)*(2-t)-3*(3*(6-t)-20)+4*(15-4*(4-t))
(%i6) p:rat(p);
(%o6) t^3
Ahhh! this says that a^^3 is the zero matrix in F_2, so all its
eigenvalues are 0. Now, since a is not zero, the geometric
multiplicity of 0 is less than 3, the algebraic multiplicity. This
shows a is not diagonalizable over F_2.
(%i7) b^^2;
(%o7) matrix([1,0,1],[0,0,0],[1,0,1])
In the general case, you want to know if the algebraic and geometric
multiplicity of each eigenvalue is the same. This means that when you
factor the charpoly p into irreducibles, p = product(p[i]^n[i],i,1,k),
the minimal polynomial m = product(p[i],i,1,k).
Leo