How to use it
- Set the size of matrix A (and B, if the operation needs it) with the two menus, up to 8 by 8, and type the entries. Whole numbers, decimals, fractions such as −3/4 and mixed numbers such as 2 1/2 all work; an empty cell counts as 0.
- Or press Text and paste a matrix: one row per line, entries separated by spaces or commas, as it comes out of a spreadsheet or a textbook PDF.
- Pick an operation. The result appears as exact fractions; switch on Decimals to see them as decimals, and open Row operations to see how a row-reduced form or an inverse was found.
Exact fractions, not rounded decimals
Most online matrix calculators work in floating-point numbers, so the inverse of a simple matrix comes back full of 0.333333 and 1.1102e-16 where the true entries are 1/3 and 0. This one keeps every entry as a fraction of two whole numbers of any length and only reduces it at the end. The inverse of [[2, 1, 1], [1, 3, 2], [1, 0, 0]], for example, is exactly [[0, 0, 1], [−2, 1, 3], [3, −1, −5]] with determinant −1, and a 6 × 6 matrix of fractions keeps every digit of its determinant.
What each operation does
| Operation | Needs | Notes |
|---|---|---|
| A + B, A − B | same size | entry by entry |
| A × B | columns of A = rows of B | the result has the rows of A and the columns of B; B × A is usually different |
| det(A) | square | found by elimination; each row swap flips the sign; 0 means A has no inverse |
| A−1 | square, det ≠ 0 | found by reducing [A | I] to [I | A−1]; the steps are listed |
| RREF(A), rank(A) | any size | reduced row echelon form by Gauss-Jordan elimination; the rank is the number of pivots |
| An | square | n from −64 to 64; negative powers use the inverse; computed by repeated squaring |
| A x = B | B is one column | reports one solution, no solution (a row reads 0 = nonzero) or infinitely many (with the free variables named) |
Reading the row operations
Row reduction uses three moves: swap two rows (R1 ↔ R2), multiply a row by a nonzero number (R1 → (1/2)R1), and add a multiple of one row to another (R3 → R3 − 2R1). None of them changes the solutions of the system, which is why they can be used to solve equations and invert matrices. The calculator works column by column from the left, takes the first nonzero entry it finds as the pivot, scales it to 1 and clears the rest of its column. Doing the moves in a different order can give different intermediate matrices, but the reduced row echelon form at the end is always the same.
What we tested
On October 15, 2026 we ran the page’s own functions on 1,500 random matrices from 1 × 1 to 6 × 6 with whole-number, fraction and decimal entries, and compared every result with the SymPy computer-algebra library: sums, products, scalar multiples, transposes, row-reduced forms and ranks for all of them; determinants, traces and powers for the 1,166 square ones; exact inverses for the 970 invertible ones, and an error message rather than an answer for the 196 singular ones and for every size mismatch. All 19,639 recorded row operations were replayed on the original matrices and produced SymPy’s reduced form. Systems A x = b came out as 971 with one solution (each checked by multiplying back), 334 with none and 195 with infinitely many, all agreeing with SymPy. There were no differences. In Chromium: the default matrix showed its exact inverse and determinant −1; RREF gave rank 3 with its row operations; A × B worked and a size mismatch gave a message; [[1, 2], [3, 4]] pasted as text inverted to [[−2, 1], [3/2, −1/2]] (−2, 1, 1.5, −0.5 as decimals) and copied as tab-separated text; A x = (5, 6) gave x = (−4, 9/2); A⁻¹ by power −1 matched; a singular matrix gave a message; everything survived a reload; a random 6 × 6 determinant fitted a 390 px phone with no errors. We also checked the check: leaving out the sign change on row swaps made 40 determinants wrong and the test failed.
Sources
Checked on .
- OpenStax: Precalculus 2e, section 9.5 Matrices and Matrix Operations; 9.6 Solving Systems with Gaussian Elimination; 9.7 Solving Systems with Inverses
- Strang, G.: Introduction to Linear Algebra, 6th ed., Wellesley-Cambridge Press, 2023 (elimination, determinants, inverses)
- SymPy 1.14 documentation: Matrices (reference answers)
Frequently Asked Questions
Built by Derek Giordano · Part of Ultimate Design Tools