Matrix Calculator
Add, multiply, and invert matrices.
How to use Matrix Calculator
What this tool does
The matrix calculator lets you build two matrices, resize them up to 6×6, edit every cell, and apply the standard operations of linear algebra: addition, subtraction, multiplication, transpose, determinant, inverse and scalar multiplication. It loads with two sample 2×2 matrices and their product already shown, so the workflow is clear from the first glance. Results appear as a clean grid, and errors — a dimension mismatch or a singular matrix — are explained in plain language instead of producing nonsense.
All the arithmetic is hand-written. The inverse uses Gauss-Jordan elimination, the determinant uses row reduction with partial pivoting, and the rest are direct implementations of the textbook definitions. There is no external library, and nothing leaves your device.
When you would use it
Students taking a first linear algebra course use it to check homework: work a determinant or an inverse by hand, then confirm the answer here. Because the tool refuses impossible operations and says why, it also teaches the rules — attempt to multiply two matrices whose dimensions do not line up and the message states exactly which numbers must match.
Beyond coursework, matrices show up wherever several quantities transform together: solving systems of linear equations, rotating and scaling coordinates in graphics, stepping a model forward in economics or engineering. Whenever you need a quick, reliable matrix result without opening a full mathematics package, this calculator gives it to you.
How to use it
- Set the size of Matrix A and Matrix B with the Rows and Columns menus — anything from 1×1 up to 6×6. Existing values are kept when you resize.
- Click any cell to type a number into it.
- Choose an Operation from the menu. Operations that act on a single matrix are labelled “of A” or “of B”; scalar multiply reveals a box for the scalar.
- Press Calculate.
- Read the result grid, or the single value for a determinant. Use Copy result to copy it as tab-separated text you can paste into a spreadsheet.
How to read the result
The result panel shows a label such as A × B, Aᵀ or det(A) so you always
know what was computed. Matrix results are drawn as a grid; a determinant is
shown as one number. If the operation is not valid — adding matrices of
different sizes, multiplying with mismatched inner dimensions, inverting a
non-square or singular matrix — a red message explains the problem and no
result is produced. Results are rounded to clear away floating-point noise, so
an inverse of an integer matrix displays as tidy numbers.
For numeric work on plain numbers rather than matrices, the equation solver handles linear and quadratic equations, and the graph plotter draws functions on a coordinate grid. To work a linear equation step by step, see the algebra step-by-step tool.
Privacy
The matrix calculator runs entirely in your browser. Every cell value and every operation is processed locally in JavaScript — there is no upload, no logging and no storage between sessions. Refreshing the page returns the sample matrices. Since no server is involved, the calculator continues to work offline once the page has loaded.
Frequently asked questions
Why does matrix multiplication give a dimension error?
What does it mean when a matrix is singular?
How does the tool compute the inverse and determinant?
Why are some result entries tiny numbers like 0.0000000001 instead of zero?
Are the matrices I enter uploaded anywhere?
Related tools
Equation Solver
Solve linear and quadratic equations.
Graph Plotter
Plot equations on an interactive graph.
Algebra Step-by-Step
Solve basic algebra with step-by-step working.
Geometric Shape Calculator
Calculate area and perimeter for common shapes.
GCD & LCM Calculator
Find the GCD and LCM of multiple numbers.
Percentage Calculator
Solve percentage problems in several modes.