Matrix Calculator
Run the core matrix operations in one place. Resize the grids, type your numbers, pick an operation, and read the result instantly. It handles addition, subtraction, multiplication, scalar multiplication, transpose, determinant, and inverse.
How to use the matrix calculator
- Set the rows and columns for matrix A, and matrix B if your operation needs a second matrix.
- Type a number into each cell, then choose the operation you want to run.
- Read the result grid below and use Copy to grab it as text.
Examples
Multiply two 2x2 matrices
A = [[1, 2], [3, 4]], B = [[5, 6], [7, 8]]
[[19, 22], [43, 50]]
Determinant of a 3x3 matrix
[[6, 1, 1], [4, -2, 5], [2, 8, 7]]
-306
Inverse of a 2x2 matrix
[[1, 2], [3, 4]]
[[-2, 1], [1.5, -0.5]]
Frequently asked questions
Which matrix operations does this calculator support?
It handles addition, subtraction, multiplication, scalar multiplication, transpose, determinant, and inverse. Each operation checks that your matrices have compatible shapes first and explains the problem if they do not.
When can I add or multiply two matrices?
You can add or subtract matrices only when they have the same number of rows and columns. To multiply A by B, the number of columns in A must equal the number of rows in B, and the result has the rows of A and the columns of B.
How is the determinant calculated?
The determinant is computed by cofactor expansion, which works for any square matrix of size 1x1 and up. Only square matrices have a determinant, so a non-square grid will return an error instead of a number.
Why does the inverse sometimes fail?
A matrix has an inverse only when it is square and its determinant is not zero. When the determinant is zero the matrix is singular and cannot be inverted, so the calculator reports that clearly rather than returning misleading numbers.
Why are some inverse entries rounded?
Inverse entries are rounded to six decimal places to remove tiny floating point errors that would otherwise show values like 0.9999999998. This keeps results readable while staying accurate for everyday use.
Is my data sent anywhere?
No. Every calculation runs entirely in your browser, so the numbers you enter never leave your device.
Related tools
Standard Deviation Calculator
Calculate standard deviation and variance online. Paste a list of numbers to get the mean, count, and both sample and population results instantly.
Scientific Notation Converter
Convert numbers to and from scientific notation and E notation. Enter a number or a value like 1.23 x 10^4 to see the standard decimal form. Free and private.
Average Calculator
Find the mean, median, mode, range, sum, count, min and max of a list of numbers. Paste values separated by commas, spaces or new lines.
Area Calculator
Find the area of a circle, square, rectangle, triangle, trapezoid, parallelogram, ellipse, sector or rhombus. Free and runs in your browser.
Arithmetic Sequence Calculator
Find the nth term, the sum of n terms and the full term list for any arithmetic or geometric sequence. Enter the first term, step or ratio, and n.
Big Number Calculator
Add, subtract, multiply, divide, power, modulo, factorial, GCD and LCM on integers of any length. Exact results with no rounding, computed in your browser.