ApasScript.

Matrices

mat

Constructs a matrix from row arrays -- exactly 2x2 or 3x3 dispatches to the fixed-size fast path, anything else (including non-square) uses the general matrix type.

matDet

The determinant of a matrix.

matTrace

The trace (sum of diagonal entries) of a matrix.

matInverse

The inverse of a matrix, computed exactly (fractions, not floats). Returns explanatory text ('singular, no inverse') when the matrix has no inverse.

matTranspose

The transpose of a matrix.

matAdd

Adds two matrices of the same shape.

matSub

Subtracts b from a, for two matrices of the same shape.

matMul

Multiplies two compatibly-shaped matrices.

matScale

Multiplies every entry of a matrix by a scalar.

matSolve

Solves the linear system m*x = b for x, exactly, across 2x2/3x3/general shapes. Returns explanatory text ('no unique solution') when the system has none.

rref

Reduced row echelon form of any matrix (2x2, 3x3 or general rectangular), by exact Gauss-Jordan elimination -- fractions stay fractions.

rowReduce Apas Cloud

rref() as a step-by-step animation: one frame per elementary row operation (swap, scale, add a multiple of another row), each captioned with the exact operation, e.g. "R2 -> R2 - 2 R1".