Matrix Calculator
Add and multiply matrices or find exact determinants, inverses, RREF and linear-system solutions.
Your result
About this tool
Work with rational entries in matrices up to eight rows and columns. Choose addition, multiplication, determinant, inverse, reduced row echelon form or classify and solve a square system. Row-operation notes and a tab-separated export keep the result inspectable.
Calculate a matrix and inspect the working
- Enter Matrix A with rows on separate lines or separated by semicolons. Separate entries with spaces or commas. Use fractions such as 1/3 to retain exact rational values.
- Select an operation. Addition needs matching shapes; multiplication needs A columns equal to B rows. Solve needs square A and a one-column right-hand side B. Inverse and determinant need square A.
- For inverse, RREF or solve, open successive row-operation steps. Inverse works with [A | I]; solve works with [A | b]. A row swap, scaling or row replacement changes the whole working row.
- Check the exact inverse product or solution substitution, then download the final matrix as TSV. The export contains the result, not the displayed working states. A singular inverse produces an error. A nonunique square system instead shows its augmented RREF and explains whether it has no solution or infinitely many solutions.
How the calculation works
Addition is element-wise. (AB)ij=Σ AikBkj. Gauss–Jordan elimination normalizes pivots and eliminates their columns to produce RREF. An inverse reduces [A|I] to [I|A⁻¹]; a system reduces [A|b].
Worked example
For A=[[1,2],[3,4]], determinant is −2 and inverse is [[−2,1],[3/2,−1/2]]. With b=[5,6], the unique solution is [−4,9/2].
Check a solution in the original equations
For A = [[1,2],[3,4]] and b = [5,6], the solution is x = -4 and y = 9/2. The first equation gives -4 + 2 × (9/2) = 5. The second gives 3 × (-4) + 4 × (9/2) = 6. Each residual, calculated left side minus entered right side, is exactly zero with these rational inputs.
The inverse for the same A is [[-2,1],[3/2,-1/2]]. Multiplying A by this inverse produces [[1,0],[0,1]], the identity. These checks verify the computed arithmetic; they do not establish that an entered matrix models a real situation correctly.
Read the augmented matrix and display limits
An inverse starts from [A | I] and row-reduces it to [I | inverse]. A square-system solve starts from [A | b]; its final rightmost column is the unique solution when the left block becomes identity. RREF works on A itself. The step tables keep all columns visible rather than silently dropping the augmented part.
For readability and bounded output, the display retains at most sixteen working states with a combined 100,000-character entry budget. Larger traces are labelled as truncated; the final result and operation notes are still complete. Exact arithmetic is separately limited to 1,000-digit intermediate fractions and 8 × 8 input matrices. The TSV is a tab-separated final matrix, not a spreadsheet formula or full derivation export.
No solution or infinitely many solutions?
A reduced row with zero coefficients and a nonzero right-hand side is a contradiction, so the system has no solution. If there is no contradiction but fewer coefficient pivots than variables, free variables remain and infinitely many solutions exist. Full coefficient rank gives one unique solution.
For A = [[1,2],[2,4]], b = [3,6] leaves one free variable and infinitely many solutions. Changing b to [3,7] creates a contradictory row and no solution. Nonunique systems export the augmented RREF; the tool does not generate a parametric family of solutions.
Can I divide one matrix by another?
There is no single matrix division operation like ordinary number division. With a square invertible B, A times inverse(B) and inverse(B) times A are different products in general. The first solves X times B = A; the second solves B times X = A. The dimensions must allow the chosen product. A singular or nonsquare B has no two-sided inverse in this calculator.
For A = [[1,2],[3,4]] and B = [[2,0],[0,4]], inverse(B) is [[1/2,0],[0,1/4]]. A times inverse(B) is [[1/2,1/2],[3/2,1]], whereas inverse(B) times A is [[1/2,1],[3/4,1]]. Keep the multiplication order from your equation.
To calculate A times inverse(B), enter B in the Matrix A field and select Inverse of A. Retain the resulting fractions, then enter the original A in Matrix A and that inverse in Matrix B; select Multiply A times B. For inverse(B) times A, place the inverse first instead. The Solve option is a separate square-system operation with a one-column right-hand side; it does not accept an arbitrary matrix right-hand side.
Assumptions and limitations
Rows must have equal widths. Solve requires square A and one-column B. Singular inverses are rejected. Square systems distinguish a unique solution, no solution and infinitely many solutions. Exact arithmetic is bounded to 1,000-digit intermediate numerators and denominators.
Separate rows with new lines or semicolons and entries with spaces or commas. Use 1/3 for exact fractions; decimal entries are also parsed exactly.
Sources and editorial responsibility
Maintained by Renvoro Pty Ltd. Sources inform the methods and assumptions shown here; outputs have the limitations described on this page.
Common questions
Do matrices need the same size to multiply?
The columns in the first matrix must equal the rows in the second. A 2 × 3 matrix times a 3 × 4 matrix produces a 2 × 4 matrix.
Why can’t a singular matrix be inverted?
A singular matrix lacks an inverse. For a square matrix, a determinant of zero is the mathematical test. Near-singular cases can also be sensitive to numerical rounding.
What shapes are required for Solve?
Enter a square coefficient matrix A and a one-column B with the same number of rows. The solver distinguishes unique, inconsistent and underdetermined systems within its numerical limits.
Guide updated 2026-11-05. Calculation method and source dates remain separate.
Method reviewed 2026-10-13. Calculation standards · Report an issue