gauss(matrix, argument)

Gaussian elimination.

matrixThe input matrix for Gauss elimination.
argumentArgument matrix (optional). If given, all row operations will be applied for this matrix, too.
return valueif 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.