FerRowReduce[mat]
uses Fermat to obtain the row-reduced
echelon form of matrix mat
. An important difference to
Mathematica’s RowReduce
is that Fermat does not assume all
symbolic variables to be nonzero by default.
The location of script, input and output files is controlled by the
options FerScriptFile
, FerInputFile
,
FerOutputFile
. When set to Automatic
(default), these files will be automatically created via
CreateTemporary[]
. If the option Delete
is set
to True
(default), the files will be deleted after a
successful Fermat run.
The syntax of FerSolve is very similar to that of
Solve
= RowReduce[{{3, 1, a}, {2, 1, b}}] res1
\left( \begin{array}{ccc} 1 & 0 & a-b \\ 0 & 1 & 3 b-2 a \\ \end{array} \right)
= FerRowReduce[{{3, 1, a}, {2, 1, b}}] // Normal
res2
(*FerRunScript: Running Fermat.
FerRunScript: Done running Fermat, timing: 0.5115*)
\left( \begin{array}{ccc} 1 & 0 & a-b \\ 0 & 1 & 3 b-2 a \\ \end{array} \right)
=== res2 res1
\text{True}
This is an example for Mathematica SE, where RowReduce assumes a \neq 0
RowReduce[{{1, a, 2}, {0, 1, 1}, {-1, 1, 1}}]
\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right)
[{{1, a, 2}, {0, 1, 1}, {-1, 1, 1}}] // Normal
FerRowReduce
(*FerRunScript: Running Fermat.
FerRunScript: Done running Fermat, timing: 0.1393*)
\left( \begin{array}{ccc} 1 & 0 & 2-a \\ 0 & 1 & 1 \\ 0 & 0 & 2-a \\ \end{array} \right)