Use symbolic linear algebraLesson 33 of 48 · 8 min

Check an inverse by multiplication

Use a determinant and an exact product to establish invertibility in a small example.

Maths refresher: The identity transformation

The identity matrix leaves every compatible vector unchanged. An inverse undoes another matrix’s action.

A−1A=IA^{-1}A=I
Worked example

Multiplying a vector by AA and then by A−1A^{-1} restores that vector when the inverse exists. A zero determinant rules this out.

Maths prerequisite map ↗

A square matrix is invertible when its transformation can be undone uniquely. The determinant is a number calculated from the matrix. If it is zero, the matrix is singular and has no inverse. A singular matrix sends some distinct inputs to the same output, so that output cannot tell them apart.

An inverse reverses a map
  1. Illustrative vector
    v=(12)v=\binom12
  2. Apply A
    Av=(43)Av=\binom43
  3. Apply its inverse
    A−1Av=(12)A^{-1}Av=\binom12
Starter reference. Here A has rows (2, 1) and (1, 1), so its determinant is 1. A singular matrix cannot undo every input this way.

The code checks the determinant before calling A.inv() to find the inverse. Multiplying the inverse by the original matrix gives the identity matrix, which leaves every vector unchanged.

These are small exact matrices. Large numerical systems usually use a solver that factors the matrix and avoids computing the inverse explicitly.

Can a matrix with dependent rows have a two-sided inverse?

Write a prediction (optional)

Exact symbolic investigation

Select Run Python with the code unchanged.

Tools
About Python

Python and the course packages can load while you read. Each run starts with fresh user variables; imported modules stay loaded. Stop replaces the worker. Runtime details ↗

Ctrl+Enter or ⌘+Enter runs Python.

Compare with the worked example

Executed from the published Python during the site build. Your own run appears above. Build environment ↗

Determinant of A
11
Inverse
[1−1−12]\left[\begin{matrix}1 & -1\\-1 & 2\end{matrix}\right]
Inverse check
[1001]\left[\begin{matrix}1 & 0\\0 & 1\end{matrix}\right]
Worked text output
Determinant of A: 1
Inverse: Matrix([[1, -1], [-1, 2]])
Inverse check: Matrix([[1, 0], [0, 1]])

Read the starter result

Find Determinant of A and Inverse check. The determinant is 1. The product in Inverse check has ones on the diagonal and zeroes elsewhere.

Edit and compare

Replace the bottom-right 1 in A with sp.Rational(1,2) for exactly one half. Select Run Python. What do Determinant of A and Inverse report for the edited matrix?

Return to the editor

Scope. Numerically tiny determinants alone are poor conditioning diagnostics; floating-point problems need scale-aware analysis.

Try a fresh case

What does a nonzero determinant establish for a square exact matrix?

Choose an answer
Need a hint?
Hint 1

Connect determinant zero with collapsed directions.

Hint 2

A reversible square transformation has no lost direction.

Your notesNotes save in this browser when storage is available.