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).

Related Calculators