Free, with every step shown

Matrix Calculator with Steps

Find determinants, inverses, transposes, RREF and rank, or multiply, add and subtract matrices, with exact fractions. det [[1, 2], [3, 4]] = 1·4 − 2·3 = −2, and [[4, 7], [2, 6]]⁻¹ = [[0.6, −0.7], [−0.2, 0.4]].

Type each row on its own line. Works up to 6×6.

Matrix calculator

One row per line (or separate rows with ;), entries separated by spaces or commas. Up to 6×6. Fractions and decimals are kept exact.

det(A) = -9

  1. Cofactor expansion along row 1: det = a(ei − fh) − b(di − fg) + c(dh − eg)
  2. = 2·(-8) − 1·(-4) + 3·1
  3. = -16 − (-4) + 3 = -9
  4. det ≠ 0, so A is invertible.
Explain the steps with AI

Worked examples

Example 1: Determinant of a 3×3 matrix

A = [[2, 1, 3], [0, −1, 4], [1, 2, 0]]

  1. det = 2((−1)(0) − 4·2) − 1(0·0 − 4·1) + 3(0·2 − (−1)·1)
  2. = 2(−8) − 1(−4) + 3(1)
  3. = −16 + 4 + 3

det(A) = −9, so A is invertible.

Example 2: Inverse of [[4, 7], [2, 6]]

Use the 2×2 formula.

  1. ad − bc = 4·6 − 7·2 = 10
  2. Swap a and d, negate b and c: [[6, −7], [−2, 4]]
  3. Divide by 10

[[0.6, −0.7], [−0.2, 0.4]]. Check: A·A⁻¹ = I.

Example 3: Multiply [[1, 2], [3, 4]] × [[5, 6], [7, 8]]

Rows of A times columns of B.

  1. c₁₁ = 1·5 + 2·7 = 19; c₁₂ = 1·6 + 2·8 = 22
  2. c₂₁ = 3·5 + 4·7 = 43; c₂₂ = 3·6 + 4·8 = 50

[[19, 22], [43, 50]]

Stuck on a step, or have a word problem?

Press Explain the steps with AI under any answer and the MathAI GPT math solver opens with your numbers already filled in, then explains the method line by line and answers follow-up questions. You can also type or photograph the whole question. On your phone, use MathAI GPT for iPhone or MathAI GPT for Android.

Matrix calculator FAQ

How do I find the determinant of a 2×2 matrix?

For [[a, b], [c, d]], det = ad − bc. For [[1, 2], [3, 4]]: 1·4 − 2·3 = −2.

How do I find the determinant of a 3×3 matrix?

Expand along the first row: det = a(ei − fh) − b(di − fg) + c(dh − eg). For [[2, 1, 3], [0, −1, 4], [1, 2, 0]]: 2(0 − 8) − 1(0 − 4) + 3(0 + 1) = −16 + 4 + 3 = −9.

How do I find the inverse of a matrix?

A 2×2 matrix [[a, b], [c, d]] has inverse (1/(ad − bc))·[[d, −b], [−c, a]]. For [[4, 7], [2, 6]], ad − bc = 10, so the inverse is [[0.6, −0.7], [−0.2, 0.4]]. Larger matrices are inverted by row-reducing [A | I]. If det = 0 there is no inverse.

How do I multiply two matrices?

Entry (i, j) of A×B is row i of A dotted with column j of B, so A’s column count must equal B’s row count. [[1, 2], [3, 4]] × [[5, 6], [7, 8]] = [[19, 22], [43, 50]]. Order matters: A×B is usually not B×A.

What is reduced row echelon form (RREF) and rank?

RREF is the matrix after row operations make every pivot 1 with zeros above and below it. The number of pivots is the rank. [[1, 2, 3], [4, 5, 6], [7, 8, 9]] reduces to [[1, 0, −1], [0, 1, 2], [0, 0, 0]], so its rank is 2.

Are the answers exact?

Yes. Every entry is kept as an exact fraction, so an inverse shows 1/3 rather than 0.3333, and decimals you type are converted exactly.

Related calculators