Jacobian matrix rank
Consider the following code :
R.<x,y,z> = QQ[];
p=(x-y)(y-z)(x-z);
J = matrix(R,[[x-y],[y]]);
J.rank();
The answer displayed is 1. This is the rank over the polynomia ring I suppose. I would like to compute rank over the field of rationals. That is if there are rational numbers a,b and c such that a diff(p,x) + b diff(p,y) + c diff(p,z) =0 but a,b,c non zero then rank should be 3.
What is the way to do it ?
The matrix is defined over a "bigger" ring, $R$. So it is computed over the ring of definition....
Using
J.rank?
orJ.rank??
gives more info. In our case, the work is delegated toJ.pivots()
. (The length of this list of pivots is the rank.)