Matrix Calculator

Perform matrix operations including addition, multiplication, and determinants. Free, fast, accurate — no signup, mobile

Matrix Operations

Matrix A

Matrix B

Operation Info

Addition requires matrices of the same dimensions.

Addition Result

[6, 8]
[10, 12]

Trace

5

Sum of diagonal

Solution Steps

1Matrix Addition: A + B
2Add corresponding elements: (A[i][j] + B[i][j])

How it works

A matrix calculator performs operations on grids of numbers: addition, scalar multiplication, matrix multiplication, transpose, determinant, and inverse. Addition is element-by-element; multiplication combines rows of the first matrix with columns of the second.

Matrix multiplication

(AB)ᵢⱼ = Σₖ Aᵢₖ · Bₖⱼ        (columns of A must equal rows of B)
A, B
the matrices being multiplied
(i, j)
row i of A with column j of B

Worked example

  • A = [[1, 2], [3, 4]]
  • Multiply by B = [[5, 6], [7, 8]]
  1. Top-left = 1×5 + 2×7 = 19
  2. Continue for each entry

AB = [[19, 22], [43, 50]].

Good to know

  • Matrix multiplication isn't commutative: AB usually doesn't equal BA.
  • You can multiply A·B only if A's column count equals B's row count.
  • The determinant tells you whether a square matrix is invertible (nonzero) or not (zero).

Can't find the exact calculator you need?

Describe it in one sentence — get a working, math-verified calculator in seconds. Free, no signup.

Build your own calculator

Related Calculators

Frequently Asked Questions

How does matrix multiplication work?

Each entry of the product is the dot product of a row from the first matrix with a column from the second. An m×n matrix times an n×p matrix gives an m×p result — the inner dimensions must match or the product is undefined.

Why isn't matrix multiplication commutative?

In general AB ≠ BA: the row-by-column structure means order matters, and reversing the order can even change the result's dimensions or make the product undefined. Always keep matrices in the intended order when setting up a calculation.

When can I add or subtract two matrices?

Only when they have identical dimensions. Addition and subtraction are element-wise: add or subtract each entry with the corresponding entry in the same position of the other matrix.

What does the determinant tell me?

The determinant is a single number summarizing a square matrix: it's nonzero exactly when the matrix is invertible, and its absolute value gives the scaling factor the matrix applies to areas or volumes. For a 2×2 matrix [[a,b],[c,d]], it's ad − bc.

What is the inverse of a matrix?

The inverse A⁻¹ undoes A: A·A⁻¹ = I, the identity matrix. Only square matrices with nonzero determinant have inverses. Inverses are central to solving linear systems Ax = b, since x = A⁻¹b.