Matrix calculator: determinant, inverse, multiplication

A matrix is a rectangular array of numbers. The determinant tells you whether the matrix has an inverse, and the inverse undoes the transformation the matrix describes.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What this topic covers

Multiply by rows times columns (matrix product entry). Find a 2 × 2 determinant and inverse, or the 3 × 3 determinant and inverse. Use solving with the inverse for equations and the rotation matrix for transformations.

Each part of this topic has its own page with the formula, worked examples and a solver: Determinant of a 2 × 2 matrix, Inverse of a 2 × 2 matrix, Determinant of a 3 × 3 matrix, Inverse of a 3 × 3 matrix, Determinant of a product, Inverse of a product, Transpose of a product, Solving a linear system with an inverse, Rotation matrix, Reflection matrix in y = x tan θ.

Closely related topics: Simultaneous equations, Vectors, Complex numbers.

What is it used for?

A matrix is a rectangular array of numbers. Matrices represent transformations and systems of equations, and can be added, multiplied, inverted and have determinants.

How to solve it

  1. Enter a matrix as rows inside square brackets, for example [[1,2],[3,4]].
  2. 2 by 2 determinant: ad - bc.
  3. A matrix has an inverse only if its determinant is not zero.
  4. 2 by 2 inverse: swap a and d, change the signs of b and c, and divide by the determinant.
  5. Multiply row by column; the number of columns in the first matrix must equal the rows in the second.

Worked examples

The examples marked with a button were worked out by the solver on this page. You can try each one yourself.

Example 1: inverse of [[2,1],[5,3]]

Worked out by the solver on this page. Press the button to try it yourself.

Matrices Answer checked
Answer
(3−1−52)\begin{pmatrix}3 & -1 \\ -5 & 2\end{pmatrix}
  1. For a 2 by 2 matrix,
  2. Swap the diagonal, change the signs of the other two, and divide by the determinant
  3. Simplify
  4. Check: gives the identity matrix

Example 2: determinant of [[1,2],[3,4]]

Worked out by the solver on this page. Press the button to try it yourself.

Matrices Answer checked
Answer
det⁡=−2\det = -2
  1. For a 2 by 2 matrix,
  2. Check: the determinant also equals the product from expanding down the first column

Example 3: determinant of [[1,2,3],[0,1,4],[5,6,0]]

Worked out by the solver on this page. Press the button to try it yourself.

Matrices Answer checked
Answer
det⁡=1\det = 1
  1. Expand along the first row, using the 2 by 2 minors with signs
  2. Check: the determinant also equals the product from expanding down the first column

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

Worked out by the solver on this page. Press the button to try it yourself.

Matrices Answer checked
Answer
(19224350)\begin{pmatrix}19 & 22 \\ 43 & 50\end{pmatrix}
  1. Multiply each row of the first matrix by each column of the second
  2. Work out every entry
  3. Check: the result has 2 rows and 2 columns

Example 5: inverse of [[1,2,3],[0,1,4],[5,6,0]]

Worked out by the solver on this page. Press the button to try it yourself.

Matrices Answer checked
Answer
(−2418520−15−4−541)\begin{pmatrix}-24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1\end{pmatrix}
  1. Expand along the first row, using the 2 by 2 minors with signs
  2. Find the matrix of cofactors, transpose it (the adjugate) and divide by the determinant
  3. Simplify
  4. Check: gives the identity matrix

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

2 × 2 determinant

(1 2; 3 4): −2

ad − bc.

Product entry

(1 2; 3 4) × (5 6; 7 8): 19

Row × column.

Inverse

(2 1; 5 3)⁻¹ = (3 −1; −5 2)

Det 1.

3 × 3 determinant

Expand along a row: 1

Signs + − +.

Word problems

Multiply rows by columns. The determinant tells you whether an inverse exists and how areas scale.

Determinant

Determinant of (1 2; 3 4).

  1. ad − bc4 − 6
  2. Check: −2 ✓-2

Product

Top-left entry of (1 2; 3 4) × (5 6; 7 8).

  1. Row 1 × column 15 + 14
  2. Check: 19 ✓19

Inverse Higher

Inverse of (2 1; 5 3).

  1. Determinant6 − 5 = 1
  2. Swap and negate(3 −1; −5 2)
  3. Check: product is the identity ✓1

3 × 3 Higher

Determinant of (1 2 3; 0 1 4; 5 6 0).

  1. 1(0 − 24) − 2(0 − 20) + 3(0 − 5)−24 + 40 − 15
  2. Check: 1 ✓1

Common mistakes

Multiplying entry by entry

1 × 5 in every place ✗

row · column ✓

Matrix multiplication.

AB = BA

commutative ✗

usually not ✓

Order matters.

Inverse of a singular matrix

exists ✗

det = 0: no inverse ✓

Check the determinant.

Wrong signs in the inverse

swap b, c without negating ✗

negate b and c ✓

Adjugate.

Exam tips

  1. Row × column.
  2. det = ad − bc.
  3. Inverse: swap a, d; negate b, c; divide by det.
  4. det 0: no inverse.
  5. Check A A⁻¹ = I.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. det (3 1; 2 4) Foundation

10

2. Top-left of (2 0; 1 3) × (1 4; 2 5) Foundation

2

3. Bottom-right of the same product Foundation

19

4. det (5 2; 3 1) Higher

-1

5. det of the identity (1 0; 0 1) Higher

1

6. Top-left of the inverse of (2 1; 5 3) Higher

3

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Matrix
A rectangular array.
Determinant
A number from a square matrix.
Inverse
A matrix that undoes another.
Identity matrix
The matrix I.
Singular
Determinant zero.
Transformation
A map such as a rotation.

Frequently asked questions

How do I multiply matrices?

Multiply rows of the first by columns of the second.

What is a determinant?

ad − bc for a 2 × 2 matrix.

When does an inverse exist?

When the determinant is not zero.

Which page covers determinants?

2 × 2 determinant and 3 × 3 determinant.

Which page covers inverses?

2 × 2 inverse and 3 × 3 inverse.

Which page covers transformations?

rotation matrix and composite transformation.

More in Vectors and matrices and the formula sheets.