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
of:
A1*X=B1
are the same as :
A*X=B
For example, to solve the system:
input :
rref([[3,1,-2],[3,2,2]])
Output :
[[1,0,-2],[0,1,4]]
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.
Input :
rref([[3,1,-2,1],[3,2,2,2]])
Output :
[[1,0,-2,0],[0,1,4,1]]
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