The gaussjordan command performs Gaussian elimination (row reduction) on the matrix A followed by back substitution to obtain a reduced row echelon form. An optional second argument P specifies the modulus.
gaussjordan([[1,2],[3,4]]); [[1, 0], [0, 1]]