Assuming unit vector?



> I want to know how to let Maxima know a relationship, bx^2+by^^2+bz^2==1, when simplifying formula.

Maybe ratsubst does what you need:

(%i25) ratsubst(1,bx^2+by^2+bz^2,C.S);

(%o25) matrix([-bz,-(by*bz)/bx,-(bz^2-1)/bx],[by/bx,-1,0])

I'm guessing you meant  bx^2+by^2+bz^2 = 1,  not bx^2+by^^2+bz^2 = 1; see

(%i28) ? ^^;
 -- Operator: ^^
     Noncommutative exponentiation operator.  `^^' is the
     exponentiation operator corresponding to noncommutative
     multiplication `.',  ....

--Barton

________________________________________