Guide
Matrix arithmetic with exact fractions: multiply, invert, determinant, rank
Matrix problems are tedious by hand and risky on a floating-point calculator: a determinant that should be exactly zero comes out as 1e-16, and an inverse is full of long decimals. This calculator keeps every entry as an exact fraction, so a determinant of 1/60 stays 1/60 and a singular matrix is recognised as singular. Use it to check homework, test a transformation or find the rank of a system.
Entering matrices
Type one row per line and separate the entries with spaces or commas. An entry may be an integer, a decimal such as 0.25, a fraction such as 3/4 or a number in scientific form such as 1e-3, and each is converted to an exact fraction first: 0.1 becomes 1/10. Every row must have the same number of entries, and a matrix can be at most 8 by 8. Errors say which matrix and what is wrong.
The operations
The Operation menu offers A × B, A + B, A − B, the determinant of A, the inverse of A, the transpose, rank and reduced row echelon form, Aⁿ for a power from 0 to 64, k × A for a scalar that may be a fraction, and the trace. For addition and subtraction the sizes must match; for multiplication the number of columns of A must equal the number of rows of B, and the message names the sizes if they do not.
Methods behind the results
The determinant is found by Gaussian elimination with row swaps, tracking the sign, and an exact zero pivot returns 0. The inverse uses Gauss-Jordan elimination on A joined to the identity matrix; if a pivot is missing the matrix is singular. Rank and the reduced row echelon form come from the same elimination, with the pivot columns listed. Powers multiply repeatedly. Because all arithmetic is rational, results are exact at every step.
Worked examples
[[1,2],[3,4]] × [[5,6],[7,8]] = [[19,22],[43,50]], and the determinant of A is −2. For A = [[2,1,1],[1,3,2],[1,0,0]] the determinant is −1 and the inverse is [[0,0,1],[−2,1,3],[3,−1,−5]]; a note reminds you that A × A⁻¹ is the identity matrix, which you can verify with the multiply operation. The tridiagonal matrix [[2,−1,0],[−1,2,−1],[0,−1,2]] has determinant 4. The Fibonacci matrix [[1,1],[1,0]] raised to the 10th power is [[89,55],[55,34]]. [[1,2,3],[4,5,6],[7,8,9]] has rank 2, pivot columns 1 and 2 and row-reduced form [[1,0,−1],[0,1,2],[0,0,0]].
Fractions or decimals
The Show entries as menu switches the result between exact fractions and decimals rounded to six places, with trailing zeros removed. Fractions are the better choice for checking work, since 2/3 is not the same number as 0.666667. Decimals suit a report, or entries that are fractions of awkward denominators. Switching does not change the calculation, only the display.
Reading singular and rank-deficient cases
A determinant of 0, as in the rank example, means the rows are dependent: the matrix has rank below its size and no inverse. The rank also tells you how many independent equations a system holds. If the coefficient matrix of three equations has rank 2, the system has either no solution or infinitely many. Rank is one of the first things to compute for any linear system.
Limits
The calculator works with numeric matrices up to 8 × 8. It does not compute eigenvalues, eigenvectors, LU or QR decompositions, or solve a system Ax = b directly, although the inverse and the row-reduced form of an augmented matrix give the same information. Entries cannot be variables. Very large entries are handled exactly but make long results.
Related tools
- Quadratic Equation Solver solves the one-variable case before matrices take over.
- Fraction Calculator checks individual entries written as fractions.
- Average Calculator is the quick tool for a list of numbers rather than a grid.
- GCD and LCM Calculator helps clear denominators in a matrix of fractions.
Checked against the current version of the Matrix Calculator on .

