2.52.3 Gauss-Jordan reduction: rref gaussjord
rref solves a linear system of equations written in
matrix form (see also 2.31.17) :
rref takes one or two arguments.
If rref has only one argument, this argument is the augmented matrix
of the system (the matrix obtained by augmenting matrix A to the
right with the column vector B).
The result is a matrix [A1,B1] : A1 has zeros both above and under
its principal diagonal and has 1 on its principal diagonal, and the solutions
are the same as :
For example, to solve the system:
Hence x=−2 and y=4 is the solution of this system.
rref can also solve several linear systems
of equations having the same first member.
We write the second members as a column matrix.
Which means that (x=−2 and y=4) is the solution of the system
and (x=0 and y=1) is the solution of the system
- If rref has two parameters, the second parameter must be an integer
k, and the Gauss-Jordan reduction will be performed on (at most)
the first k columns.