Skip to main content
1+1
EN
All calculators

Categories

Matrix calculator

Result

Fill in the fields to see your result.

How it works

Addition and subtraction combine matrices of the same shape entry by entry. Multiplication is different: each entry of the result is a sum of products between a row of A and a column of B, which is why the inner dimensions have to match (A's columns = B's rows) even when the outer shape does not.

The determinant and inverse only make sense for a square matrix. The determinant is computed by cofactor expansion, which generalizes the familiar 2×2 shortcut (ad − bc) to any size. The inverse exists only when the determinant is nonzero — a zero determinant means the matrix collapses information (its rows or columns are not truly independent), which cannot be undone.

Formulas used

2×2 determinant

det = ad − bc, for matrix [[a, b], [c, d]]

Inverse

A⁻¹ = adj(A) ÷ det(A)

Worked examples

Adding two 2×2 matrices

[[1, 2], [3, 4]] + [[5, 6], [7, 8]] = [[6, 8], [10, 12]].

The determinant of a 2×2 matrix

The determinant of [[1, 2], [3, 4]] is 1×4 − 2×3 = −2.

Assumptions and limits

  • Matrices are limited to 8×8 to keep the determinant and inverse calculations fast.
  • All entries must be plain numbers — no fractions or expressions inside the matrix text.

Frequently asked questions

How do I format the matrix input?

One row per line, with the values in that row separated by commas or spaces — for example, a 2×3 matrix is two lines, each with three numbers.

Why does matrix multiplication need matching dimensions?

Each result entry sums products of a full row of A against a full column of B, so A's row length must match B's column length — if they don't line up, the sum simply cannot be formed.

What does a determinant of zero mean?

It means the matrix is singular: its rows (or columns) are linearly dependent, so it cannot be inverted, and the linear system it represents does not have a single unique solution.

Is matrix multiplication the same as multiplying entry by entry?

No — that operation exists (called the Hadamard product) but is different and much less common; standard matrix multiplication is the row-by-column sum-of-products described above, and this calculator uses that standard definition.

Updated