Skip to content

Matrix Calculator

Add, subtract and multiply matrices, and find the determinant, inverse and transpose.

One row per line, numbers separated by spaces

Result

Result (2 × 2)

Result matrix
1922
4350

Runs in your browser — nothing you enter is sent to a server.

How the Matrix Calculator works

Type each matrix with one row per line and the numbers separated by spaces or commas (or rows separated by semicolons). Choose an operation and the result updates as you type.

  • A + B and A − B work element by element and need matrices of the same size.
  • A × B needs A's columns to match B's rows; each entry is a row of A times a column of B.
  • Determinant and inverse need a square matrix; they use Gaussian elimination with partial pivoting.

Formulas

Matrix product

(AB)ij = Σk Aik × Bkj

2 × 2 determinant and inverse

det = ad − bc; inverse = (1 ÷ det) × [d −b; −c a]

Examples

Multiplying

[1 2; 3 4] × [5 6; 7 8] = [19 22; 43 50]. The determinant of [1 2; 3 4] is −2.

An inverse

The inverse of [4 7; 2 6] is [0.6 −0.7; −0.2 0.4] (its determinant is 10). [1 2; 2 4] has no inverse: its determinant is 0.

Frequently asked questions

Why is A × B different from B × A?

Matrix multiplication isn't commutative: the order changes the result, and often the size.

Why does my inverse show tiny numbers like 0.0000000001?

Results are rounded to 10 decimal places; values that are 0 apart from rounding error are shown as 0.

How large can the matrices be?

Up to 10 × 10.

Scientific Calculator

An online scientific calculator with trigonometry, logarithms, powers, roots, factorials and history.

Math Tools

Quadratic Equation Solver

Solve ax² + bx + c = 0 with real or complex roots, the discriminant and the vertex, with working.

Math Tools