Function reference · Linear algebra

rref

Returns the reduced row-echelon form of a matrix.

Pass a prime number as a second argument to work modulo that prime.

Notation

rref(matrix[, prime])

Write it in an expression: nerdamer('rref(matrix([1,2],[3,4]))'), or in the Playground.

Parameters

matrix
Matrix to reduce.
prime
Optional modulus for finite-field arithmetic.

Examples

An invertible matrix reduces to the identity.

rref(matrix([1,2],[3,4]))
// → matrix([1, 0], [0, 1])
Open in Playground

← Back to Function reference