Boneyard Tools

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

  1. Set the rows and columns for matrix A, and matrix B if your operation needs a second matrix.
  2. Type a number into each cell, then choose the operation you want to run.
  3. 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