Skip to content
Calcapedia
Math

Matrix Calculator

Find the determinant, inverse or transpose of a 2×2 or 3×3 matrix, or add, subtract, multiply and scale matrices, with the working shown.

Level: Grade 11 to college

  • Common Core standard HSN.VM.C.8(+) Add, subtract, and multiply matrices of appropriate dimensions.
  • Common Core standard HSN.VM.C.7(+) Multiply matrices by scalars to produce new matrices, e.g., as when all of the payoffs in a game are doubled.
  • Common Core standard HSN.VM.C.10(+) Understand that the zero and identity matrices play a role in matrix addition and multiplication similar to the role of 0 and 1 in the real numbers. The determinant of a square matrix is nonzero if and only if the matrix has a multiplicative inverse.
Printable worksheet

Matrix Calculator

Know the answer you need? Pick an input to work backward.

Inputs
Matrix size

Matrix A, row 1, column 1. Each box is named by its row first, then its column.

Result

Determinant of A

-9

det A = -9.

See the step-by-step solution ↓

Step-by-step solution

  1. Break the 3×3 problem into three small 2×2 ones. Multiply each top-row number by its minor (the 2×2 left when you cover its row and column), using the signs +, −, +

    det A=a₁₁M₁₁ − a₁₂M₁₂ + a₁₃M₁₃
  2. Minor M₁₁: cover row 1 and column 1, which leaves [-1, 4; 2, 0], and find its 2×2 determinant

    M₁₁=(−1)×0−4×2=−8
  3. Minor M₁₂: cover row 1 and column 2, which leaves [0, 4; 1, 0], and find its 2×2 determinant

    M₁₂=0×0−4×1=−4
  4. Minor M₁₃: cover row 1 and column 3, which leaves [0, -1; 1, 2], and find its 2×2 determinant

    M₁₃=0×2−(−1)×1=1
  5. Combine the three parts with their signs to get the determinant

    det A=2×(−8)−1×(−4)+3×1=−9

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

What this calculator does

Do matrix math on a 2×2 or 3×3 grid of numbers and see every step of the working. A matrix is just a rectangular grid of numbers. Small ones turn up when you solve a few equations at once, or when you rotate, stretch or combine moves on a shape.

The math follows clear rules, but it takes a long time by hand. One wrong sign in a determinant spoils everything after it, so it helps to have each step laid out.

This calculator finds the determinant, a single number that tells you a lot about the grid. It also finds the inverse (the grid that undoes A), the transpose (rows turned into columns), sums, differences, products and multiples of a number. Each answer appears as a table, and the steps show the arithmetic one number at a time.

Where it's used

Why this math matters outside the classroom:

  • Computer graphics. Video games rotate every point of a 3D model by multiplying its coordinates by a rotation matrix each frame.
  • Solving systems. Writing 2x + y = 5 and x − y = 1 as a matrix equation and using the inverse matrix gives x = 2 and y = 1.
  • Store revenue. A chain multiplies a matrix of units sold per store by a column of prices to get every store's revenue in one step.
  • Area scaling. A 2×2 matrix with determinant 3 triples the area of any shape it transforms, so a 4 square unit square becomes 12.
  • Price increases. A store raising every price by 10% multiplies its price matrix by the scalar 1.1.

Grade level and standards: Grade 11 to college; Common Core State Standards for Mathematics HSN.VM.C.8, HSN.VM.C.7, HSN.VM.C.10. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

How to use it

  1. Choose the size of the grid: 2 × 2 or 3 × 3.
  2. Choose what you want to do. Boxes for matrix B appear only for A × B, A + B and A − B. The number k (a plain number, also called a scalar) appears only for k × A.
  3. Fill in the numbers. aᵢⱼ is the number in row i, column j, so a₂₃ is row 2, column 3.
  4. Read the answer in the table. Open the steps to check how each number was found.

What the inputs mean

Matrix size
Both matrices are the same size. When you pick 2 × 2, the hidden boxes for the third row and column are ignored.
Operation
The determinant, inverse and transpose use A only. A × B is usually different from B × A, so the order matters.
Scalar k
The number that every entry of A is multiplied by. It can be negative, zero or a decimal.
a₁₁
Matrix A, row 1, column 1. Each box is named by its row first, then its column.
b₁₁
Matrix B, row 1, column 1. Each box is named by its row first, then its column.

Formula and method

2×2: det A = a₁₁a₂₂ − a₁₂a₂₁
3×3: det A = a₁₁M₁₁ − a₁₂M₁₂ + a₁₃M₁₃
A⁻¹ = adj(A) / det A, where adj(A) is the transpose of the cofactor matrix, Cᵢⱼ = (−1)^(i+j) Mᵢⱼ
(A × B)ᵢⱼ = aᵢ₁b₁ⱼ + aᵢ₂b₂ⱼ (+ aᵢ₃b₃ⱼ)
(A ± B)ᵢⱼ = aᵢⱼ ± bᵢⱼ,   (kA)ᵢⱼ = k × aᵢⱼ,   (Aᵀ)ᵢⱼ = aⱼᵢ

In the formulas, A and B are your two matrices, and aᵢⱼ and bᵢⱼ are the numbers in row i, column j of each. k is a plain number. det A is the determinant of A, and Mᵢⱼ is a minor: the determinant of the smaller grid left when you cover row i and column j. To get a 3×3 determinant, multiply each top-row number by its minor and use the signs +, −, +.

The inverse A⁻¹ is the grid that undoes A, and it exists only when the determinant isn't 0. A cofactor Cᵢⱼ is a minor with a sign from a checkerboard pattern. Flip the cofactor grid so rows become columns, and you get the adjugate, adj(A). Divide that by the determinant and you have the inverse.

For a 2×2 grid this comes down to a shortcut. Swap the two main-diagonal numbers, change the signs of the other two, and divide by the determinant.

In a product, each answer number pairs a row of A with a column of B. Multiply the matching numbers and add. Sums, differences and multiples of k work one number at a time. Aᵀ, the transpose, turns each row into a column.

Worked example

Find the determinant of A = [2, 1, 3; 0, −1, 4; 1, 2, 0], and its inverse if it has one.

  1. M₁₁ = (−1) × 0 − 4 × 2 = −8.
  2. M₁₂ = 0 × 0 − 4 × 1 = −4.
  3. M₁₃ = 0 × 2 − (−1) × 1 = 1.
  4. det A = 2 × (−8) − 1 × (−4) + 3 × 1 = −16 + 4 + 3 = −9.
  5. The adjugate is [−8, 6, 7; 4, −3, −8; 1, −3, −2]. Dividing it by −9 gives the inverse.

Result: det A = −9, and A⁻¹ = [8/9, −2/3, −7/9; −4/9, 1/3, 8/9; −1/9, 1/3, 2/9].

Understanding the result

A determinant of 0 means the matrix is "singular". One of its rows can be built from the others, it flattens shapes into fewer dimensions, and it has no inverse.

Ignoring its sign, the determinant tells you how much the matrix stretches areas (for 2×2) or volumes (for 3×3). A negative sign means the shape is also flipped over, like a mirror image.

When every number in A is a whole number, the inverse is shown as exact fractions. The decimal version is listed separately. Otherwise the numbers are decimals, rounded for display.

For a product, the calculator also shows det(A × B). It always equals det A × det B, which makes a handy check.

Assumptions and limitations

  • Both matrices are square and the same size, so every option on the menu works.
  • Answers are written one row at a time: commas separate the numbers and semicolons separate the rows.
  • Only 2×2 and 3×3 matrices are supported.
  • Decimal entries use ordinary computer arithmetic, which can leave tiny rounding errors. A matrix whose determinant is zero apart from rounding error is treated as singular.
  • Rank, trace, eigenvalues and matrix powers are not covered.

Frequently asked questions

Why is A × B usually different from B × A?

Each number in A × B pairs rows of A with columns of B. B × A pairs rows of B with columns of A, so it uses different numbers. Picture it as moves on a shape: doing one move and then another usually ends up different from doing them in the other order.

How can I tell whether a matrix has an inverse?

Work out its determinant. If it isn't 0, there's exactly one inverse. If it's 0, there's no inverse. For example, [1, 2; 2, 4] has determinant 1 × 4 − 2 × 2 = 0, because its second row is twice its first.

Can I expand a 3×3 determinant along a different row or column?

Yes. Any row or column gives the same answer, as long as you use the checkerboard of signs, starting with + in the top-left corner. Picking a row or column with zeros saves work. This calculator always uses the first row so the steps look the same every time.

How do I check an inverse?

Multiply the matrix by its inverse. You should get the identity matrix: 1s on the main diagonal (top-left to bottom-right) and 0s everywhere else.

How this calculator is checked

Method: Standard linear algebra: cofactor (Laplace) expansion, the adjugate formula for the inverse, and the row-by-column definition of the matrix product. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this Matrix Calculator on your own website or blog for free. Paste this code where you want it to appear: