CurrentModule = AbstractAlgebra.Solve
The module AbstractAlgebra.Solve
provides the following four functions for solving linear systems:
solve
can_solve
can_solve_with_solution
can_solve_with_solution_and_kernel
All of these take the same set of arguments, namely:
- a matrix
$A$ of typeMatElem
; - a vector or matrix
$B$ of typeVector
orMatElem
; - a keyword argument
side
which can be either:left
(default) or:right
.
If side
is :left
, the system
The functionality of the functions can be summarized as follows.
-
solve
: return a solution, if it exists, otherwise throw an error. -
can_solve
: returntrue
, if a solution exists,false
otherwise. -
can_solve_with_solution
: returntrue
and a solution, if this exists, andfalse
and an empty vector or matrix otherwise. -
can_solve_with_solution_and_kernel
: likecan_solve_with_solution
and additionally return a matrix whose rows (respectively columns) give a basis of the kernel of$A$ .
Systems C
.
solve_init
Now the functions solve
, can_solve
, etc. can be used with C
in place of C
to be reused.
solve
can_solve
can_solve_with_solution
can_solve_with_solution_and_kernel
kernel