Skip to content
100% local

Matrix calculator

Add, subtract, multiply, transpose, or find the determinant, inverse or power of a matrix.

Input
Second matrix
Output

Matrix calculator

Paste one or two matrices as rows of numbers and this tool performs the operation you choose — addition, subtraction, multiplication, transposition, determinant, inverse or a whole-number power — and shows the working steps alongside the result. It is built for students checking linear algebra homework, engineers running quick calculations and anyone who needs an exact answer without opening a spreadsheet or a computer algebra system.

Numbers in each row can be separated by a space, a comma or a semicolon — pick whichever matches how you already have your data. Addition, subtraction and multiplication use two matrices, entered in the first and second input fields; the tool checks that the dimensions actually match the operation and explains clearly when they don't, rather than failing silently. Transpose, determinant, inverse and power work on the first matrix alone. Results can be shown as exact fractions (so 1/3 stays 1/3 instead of turning into a rounded decimal) or as decimals with a chosen number of places, and the whole result — including any step matrices — can be rendered as plain-text grid or as LaTeX ready to paste into a document.

Determinants and inverses are computed with exact fraction arithmetic through Gaussian elimination, so results never pick up floating-point rounding errors the way a calculator built on ordinary decimal numbers would. When a matrix has no inverse, the tool says so directly instead of dividing by zero. With "Show intermediate steps" turned on, you can see each row operation, elimination or elementwise calculation that produced the answer — useful for following along or checking your own work by hand; very large matrices skip the step-by-step listing and show only the final result, so the page never has to render an unreasonable amount of text.

Everything runs locally in your browser — no matrix, however sensitive, is ever uploaded anywhere. Copy the result, download it as a .txt file, or send it straight back into the input to chain another operation on it.

FAQ

Can I enter fractions directly, not just decimals?
Yes. Alongside plain integers and decimals like 2.5, you can type fractions like 3/5 directly into either matrix, and the result can be shown back as fractions too.
What happens if my matrix dimensions don’t match the operation?
The tool checks dimensions before calculating and shows a clear error — for example that addition needs matrices of the same size, or that multiplication needs the first matrix’s column count to match the second matrix’s row count.
What if a matrix has no inverse?
A matrix with a determinant of zero is singular and has no inverse. The tool detects this and explains it, rather than showing a division-by-zero result.
Can I use the result as LaTeX in a document?
Yes. Switch "Output as" to LaTeX and the matrix is wrapped in a pmatrix environment you can paste straight into a LaTeX document.
Is my matrix data uploaded anywhere?
No. All matrix calculations run entirely in your browser using JavaScript — your numbers never leave your device.