How the Matrix Calculator Computes Each Operation
AnyTool Matrix Calculator runs a pure, unit-tested linear-algebra engine entirely in the browser. Addition and subtraction work entry by entry after a dimension check; multiplication verifies that the columns of A equal the rows of B before forming each dot product. The determinant is obtained by LU decomposition with partial pivoting — reducing the matrix to upper-triangular form and multiplying the pivots while tracking the sign of every row swap — which is numerically stable and runs in O(n³), unlike recursive cofactor expansion. The inverse uses Gauss–Jordan elimination on the augmented matrix [A | I], and the rank and reduced row-echelon form come from the same elimination routine. Results are computed at full double precision and rounded only for display.
- Determinant by LU decomposition with partial pivoting (O(n³))
- Inverse by Gauss–Jordan elimination on [A | I]
- Rank and RREF from the same stable elimination routine
- Dimension checks before add, subtract and multiply
- Pure, unit-testable engine — no DOM, no server
