Function: factrix - take out common scalar factors from a matrix or vector
Calling sequence:
factrix(M);
Parameters:
M - a Matrix, Vector, matrix, vector, list or listlist, or an expression that evaluates to one of these under evalm .
Description:
Examples:
> factrix(matrix([[3/4*t^2,6*t^3],[9*q*(t+t^4),3/7*t]]));
> factrix(Matrix([[3/4*t^2,6*t^3],[9*q*(t+t^4),3/7*t]]));
Note that evaluating this result puts the constant factor 3/28 back into the Matrix.
> %;
But using convert(..., list) we can separate the factors.
> convert(factrix(Matrix([[3/4*t^2,6*t^3],[9*q*(t+t^4),3/7*t]])),list);
A purely numeric factor can't be taken out of a list:
> factrix([2/3,4/3]);
But it would work for a vector:
> factrix(vector([2/3,4/3]));
Some more complicated factors:
>
factrix(matrix([[x^2+x, x^3+x^2],
[x^3+2*x^2+x, x^3+3*x^2+3*x+1],
[w*x^2+2*w*x+w, 3*x+2+x^2]]));
> factrix(vector([1+sqrt(2),3+2*sqrt(2)]));
Removing a floating-point factor:
> factrix([15.3*x,15.3*x*y]);
However, 4.6 and 2.3 are not recognized as related.
> factrix([4.6*x,2.3*x]);
Try converting to rational first:
> factrix(convert([4.6*x,2.3*x],rational));
See also: array , dot , factor , list , matrix , Matrix , vector , Vector
Maple Advisor Database
R. Israel, 1998