SolutionMat( mat, vec )
SolutionMat
returns one solution of the equation x * mat =
vec
or false
if no such solution exists.
gap> SolutionMat( [ [ 2, -4, 1 ], [ 0, 0, -4 ], [ 1, -2, -1 ] ], > [ 10, -20, -10 ] ); [ 5, 15/4, 0 ] gap> SolutionMat( [ [ 2, -4, 1 ], [ 0, 0, -4 ], [ 1, -2, -1 ] ], > [ 10, 20, -10 ] ); false
Note that for large rational matrices SolutionMat
may take very long,
because the entries may become very large during the Gaussian
elimination, even if the final result only contains small integers.
GAP 3.4.4