determinant of a matrix of rationals
d = detr(h)
square matrix of numbers or polynomials or rationals
scalar of the h
's type.
d=detr(h)
computes the determinant d
of the
matrix h
, according to the Leverrier's algorithm.
// Matrix of doubles A = rand(5,5); detr(A) A = A+%i; detr(A) // Matrix of polynomials x = poly(0, 'x') A = [1+x 2 5; 3 4-x 3+x; x^2 1 x]; detr(A) // Matrix of rationals A = [1/x, 2, 3 ; 3, 4/x, 3/x ; 1/x^2, 1, 1/x]; detr(A) | ![]() | ![]() |
--> detr(A) ans = -2 -3x -6x² +9x³ ---------------- x³