Gaussian elimination.
matrix | The input matrix for Gauss elimination. |
argument | Argument matrix (optional). If given, all row operations will be applied for this matrix, too. |
return value | if argument is not given, then the upper triangluar matrix. Otherwise, see description. |
Performs gaussian elimination on a matrix. It returns a matrix in upper triangular form.
If argument is given, all the row operations done on matrix will be also done on argument. This can be helpful for calculating the inverse.
If argument is not given, the result is a matrix in upper triangular form. If it is given,
then the result is an object with the following fields:
- singular: Boolean stating if the matrix was singular.
- matrix: The matrix in upper triangular form.
- argument: The argument with all row operations done as on the matrix.
gauss([1,2;3,7])