Matrix Calculator

Perform matrix addition, subtraction, multiplication, find the determinant, inverse, and transpose of 2×2 and 3×3 matrices.

+

How to Use This Tool

  1. Select a matrix size, 2×2 or 3×3.
  2. Select the operation you want: addition, subtraction, multiplication, determinant, inverse, or transpose.
  3. Fill in the cells of Matrix A (and Matrix B, when the operation needs a second matrix).
  4. Read the result — a full matrix grid for addition, subtraction, multiplication, and transpose, or a single scalar value for determinant and inverse.

Formula & How It Works

Addition / Subtraction

(A ± B)ᵢⱼ = Aᵢⱼ ± Bᵢⱼ

Add or subtract each element of A with the corresponding element of B, position by position.

Matrix Multiplication

(A × B)ᵢⱼ = Σₖ Aᵢₖ × Bₖⱼ

Each element of the result is the dot product of the corresponding row of A and column of B.

2×2 Determinant

det(A) = a₁₁a₂₂ − a₁₂a₂₁

For a 2×2 matrix [[a,b],[c,d]], the determinant is ad − bc. A 3×3 determinant is computed by cofactor expansion along the first row.

2×2 Inverse

A⁻¹ = (1 / det(A)) × [[d, −b], [−c, a]]

Swap the diagonal elements, negate the off-diagonal elements, then divide every entry by the determinant. The inverse only exists when det(A) ≠ 0.

Practical Examples & Common Use Cases

Example: 2×2 Addition

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

Example: 2×2 Determinant

A = [[4,3],[6,2]] → det(A) = (4 × 2) − (3 × 6) = 8 − 18 = −10.

Example: 2×2 Inverse

A = [[4,7],[2,6]] → det(A) = 24 − 14 = 10, so A⁻¹ = [[0.6, −0.7], [−0.2, 0.4]].

Frequently Asked Questions

The determinant is a scalar value that encodes several properties of a matrix. For a 2×2 matrix [[a,b],[c,d]], det = ad − bc. A non-zero determinant means the matrix is invertible.

The inverse does not exist when the determinant equals zero. Such a matrix is called "singular" or "degenerate".

Matrix multiplication computes the dot product of rows and columns. It is not commutative (A × B ≠ B × A in general) and requires the number of columns in A to equal the number of rows in B.

The transpose of a matrix flips it over its main diagonal — rows become columns and columns become rows. For matrix A, the transpose is written Aᵀ.

Related Tools