Linear Algebra • Systems of Linear Equations & Matrices

Solving Ax=b via Inverses — Solving Ax=b Using Inverses (Conceptual and Computational)

Unlock systems of equations by using the power of matrix inverses to find solutions in one elegant step.

Linear Algebra emblem with a matrix grid, a variable, and three-dimensional axes.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

People have been solving systems of equations for thousands of years. Ancient civilizations needed to figure out things like how to divide land or how many items to trade. Over time, mathematicians discovered that you could organize the numbers from a system of equations into a neat grid called a matrix. Once matrices were invented, people started asking: "Can we use matrices to solve entire systems of equations all at once?" The answer was yes — and the key tool turned out to be the matrix inverse.

~200 BCE • Ancient Systems of Equations

Chinese mathematicians recorded methods for solving systems of linear equations in the book The Nine Chapters on the Mathematical Art, using techniques similar to what we now call elimination.

1683 • Determinants Introduced

Japanese mathematician Seki Takakazu and German mathematician Gottfried Leibniz independently discovered determinants, a special number computed from a matrix that tells you whether an inverse exists.

1850s • Matrix Algebra Formalized

Arthur Cayley formalized matrices as mathematical objects in their own right, defining addition, multiplication, and the concept of a matrix inverse.

1940s–Today • Computers and Linear Algebra

With the rise of computers, solving Ax = b using inverses became a practical tool in engineering, physics, computer graphics, and data science.

The central question this lesson tackles is: if you have a system of equations written as Ax = b, how can you find x by "undoing" the matrix A? That undoing process is exactly what the inverse of A does.

SECTION 2

Core Principles & Definitions

Before we solve Ax = b using inverses, let's nail down the key ideas you need. Think of a matrix as a rectangular grid of numbers, and think of a system of linear equations as a set of equations where each variable appears only to the first power. When you write these equations in matrix form, you get the equation Ax = b, where A holds the coefficients, x holds the unknowns, and b holds the constants on the right side.

1

The Equation Ax = b

A is the coefficient matrix (the numbers in front of each variable), x is the column of unknowns, and b is the column of constants. This single matrix equation represents an entire system.
2

Matrix Inverse (A⁻¹)

The inverse of a square matrix A is the matrix A⁻¹ such that A⁻¹ × A = I, where I is the identity matrix. Not every matrix has an inverse.
3

Identity Matrix (I)

The identity matrix is a square matrix with 1s on the diagonal and 0s everywhere else. Multiplying any matrix by I gives back the original matrix, just like multiplying a number by 1.
4

Determinant

The determinant is a single number computed from a square matrix. If the determinant is zero, the matrix has no inverse and we say it is singular.
5

The Solution: x = A⁻¹b

If A has an inverse, you can solve for x by multiplying both sides of Ax = b on the left by A⁻¹. This gives x = A⁻¹b — the unique solution to the system.
✦

KEY TAKEAWAY

Think of the matrix A as a lock and A⁻¹ as its key. The equation Ax = b says "this lock was applied to some secret code x, producing b." If you have the key (A⁻¹), you can unlock b to discover x. Just as a lock only works if it's properly built, A⁻¹ only exists when the determinant of A is not zero.

SECTION 3

Visual Explanation — How Ax = b Works

Let's see what the equation Ax = b looks like when we expand it. The diagram below shows how a 2×2 system of equations translates into the matrix equation, and how applying A⁻¹ to both sides isolates x.

From System of Equations → Matrix Form → SolutionSystem of Equations2x + 3y = 81x + 4y = 13→Matrix Form: Ax = b[2 3][1 4][x][y]=[ 8][13]Multiply both sides by A⁻¹Solution: x = A⁻¹bA⁻¹ =[ 4/5 −3/5][−1/5 2/5]×[ 8][13]=[−1][ ?]Result: x = −1, y = 3.4 ... (we compute fully in Section 6!)
This diagram shows the three stages: writing the system as equations (left), converting to matrix form Ax = b (center), and solving by multiplying both sides by A⁻¹ (bottom). The purple brackets represent matrix A, the cyan values represent the unknowns x, and the pink values represent vector b.

Notice how the whole process boils down to one idea: if multiplying by A "scrambles" x into b, then multiplying by A⁻¹ "unscrambles" b back into x. This only works when A has an inverse — that is, when the determinant of A is not zero.

SECTION 4

Mathematical Framework

Let's formalize what we've been discussing. The key equations are straightforward once you see the pattern.

MATRIX EQUATION

A⋅x=bA · x = b

A is an n×n coefficient matrix, x is the n×1 column vector of unknowns, and b is the n×1 column vector of constants.

SOLUTION VIA INVERSE

x=A−1⋅bx = A⁻¹ · b

If A is invertible (det(A) ≠ 0), multiply both sides on the left by A⁻¹. Since A⁻¹A = I and Ix = x, the left side simplifies to just x.

2×2 INVERSE FORMULA

A−1=(1/det(A))×[d−b;−ca]whereA=[ab;cd]A⁻¹ = (1 / det(A)) × [d −b; −c a] where A = [a b; c d]

For a 2×2 matrix A = [a b; c d], the determinant is det(A) = ad − bc. You swap the diagonal entries (a and d), flip the signs of the off-diagonal entries (b and c), and divide everything by the determinant.

DETERMINANT CHECK

det(A)=ad−bc≠0⟹A−1existsdet(A) = ad − bc ≠ 0 ⟹ A⁻¹ exists

If det(A) = 0, the matrix is singular and has no inverse. This means the system either has no solution or infinitely many solutions — the inverse method won't work in either case.

Why do we multiply on the left by A⁻¹? Because matrix multiplication is not commutative — A × B does not always equal B × A. So the order matters. Multiplying A⁻¹ on the left of both sides keeps the equation balanced: A⁻¹(Ax) = A⁻¹b simplifies to Ix = A⁻¹b, which gives x = A⁻¹b.

SECTION 5

Step-by-Step Process for Solving Ax = b

Here is the complete process, broken into clear steps. The diagram below walks you through the decision-making and computation involved.

Flowchart: Solving Ax = b Using InversesStart: Write system as Ax = bStep 1: Identify A, x, and bWrite coefficients in A, unknowns in x, constants in bdet(A) ≠ 0?NoSTOP: No uniquesolution existsYesStep 2: Compute A⁻¹Use formula: A⁻¹ = (1/det(A)) × [d −b; −c a]Step 3: Multiply x = A⁻¹ × bPerform matrix × vector multiplicationDone: x is the solution!
This flowchart shows the three main steps: (1) identify A, x, and b from your system, (2) check the determinant and compute A⁻¹ if it exists, and (3) multiply A⁻¹ by b to find x. If the determinant is zero, the method cannot be used.
  1. Step 1 — Set up Ax = b: Write the coefficient matrix A, the variable vector x, and the constant vector b from your system of equations.
  2. Step 2 — Compute the determinant: For a 2×2 matrix [a b; c d], calculate det(A) = ad − bc. If it equals zero, stop — no unique solution exists.
  3. Step 3 — Find A⁻¹: Swap the diagonal entries, negate the off-diagonal entries, and divide everything by det(A).
  4. Step 4 — Compute x = A⁻¹b: Multiply the inverse matrix by the vector b using row-by-column multiplication to find each unknown.

SECTION 6

Worked Example

Let's solve a complete system step by step. Suppose you need to solve:

ℹ

Problem

Solve the system: 2x + 3y = 8 and x + 4y = 13.

Solving 2x + 3y = 8, x + 4y = 13

  1. 1

    Step 1 — Write as Ax = b

    Identify the coefficients: A = [2 3; 1 4], x = [x; y], and b = [8; 13]. The first row of A comes from the first equation (coefficients 2 and 3), and the second row comes from the second equation (coefficients 1 and 4).
    A = [2 3; 1 4], b = [8; 13]
  2. 2

    Step 2 — Compute the determinant

    For A = [a b; c d] = [2 3; 1 4], we compute det(A) = a×d − b×c = 2×4 − 3×1 = 8 − 3 = 5. Since 5 ≠ 0, the inverse exists and there is a unique solution.
    det(A) = 5 ≠ 0 ✓
  3. 3

    Step 3 — Find A⁻¹

    Using the formula A⁻¹ = (1/det(A)) × [d −b; −c a], we get: A⁻¹ = (1/5) × [4 −3; −1 2] = [4/5 −3/5; −1/5 2/5]. We swapped the 2 and 4 on the diagonal, negated the 3 and 1, and divided each entry by 5.
    A⁻¹ = [4/5 −3/5; −1/5 2/5]
  4. 4

    Step 4 — Multiply x = A⁻¹b

    Now multiply A⁻¹ by b. For the first entry of x: (4/5)(8) + (−3/5)(13) = 32/5 − 39/5 = −7/5. For the second entry (y): (−1/5)(8) + (2/5)(13) = −8/5 + 26/5 = 18/5.
    x = −7/5 = −1.4, y = 18/5 = 3.6
  5. 5

    Step 5 — Verify the solution

    Plug x = −7/5 and y = 18/5 back into the original equations. First equation: 2(−7/5) + 3(18/5) = −14/5 + 54/5 = 40/5 = 8 ✓. Second equation: 1(−7/5) + 4(18/5) = −7/5 + 72/5 = 65/5 = 13 ✓. Both check out!
    Solution: x = −7/5, y = 18/5

SECTION 7

Strengths and Limitations

Using the inverse method to solve Ax = b is elegant, but it's not always the best tool. Let's compare it with other approaches.

FeatureInverse Method (x = A⁻¹b)Elimination / Row Reduction
When it worksOnly when A is square and det(A) ≠ 0Works for any system, including non-square
Multiple right-hand sidesExcellent — compute A⁻¹ once, multiply for each bMust redo elimination for each new b
Speed for large systemsSlower — computing the inverse is expensiveFaster — elimination is more efficient
Conceptual clarityVery clear — x = A⁻¹b is one formulaRequires multiple row operations
Singular matricesCannot handle — method failsCan still reveal no solution or infinite solutions

Comparison of the inverse method vs. elimination

⚡

WHEN TO USE INVERSES

The inverse method shines when you need to solve Ax = b for many different b vectors with the same A. Imagine a factory that produces different products — A describes the machine settings, and each b is a different production order. You compute A⁻¹ once (calibrate the machine), and then every new order is handled by a quick multiplication. For a single system, elimination is usually faster and more flexible.

SECTION 8

Connections to Advanced Topics

The idea of solving Ax = b using inverses is your gateway to many advanced topics in linear algebra. As you continue your studies, you'll encounter more powerful tools that build directly on what you've learned here.

This LessonAdvanced Topic
2×2 inverse formulaGeneral n×n inverses via row reduction (augmented matrix [A | I] → [I | A⁻¹])
Determinant ≠ 0 checkEigenvalues and the rank of a matrix determine when solutions exist
x = A⁻¹b for one bLU decomposition and QR factorization for solving many systems efficiently
Singular matrix (no inverse)Pseudo-inverse (A⁺) for systems with no exact solution — used in machine learning and statistics

How this lesson connects to future topics

In computer graphics, matrices are used to rotate, scale, and translate objects on screen. When you need to undo a transformation (like rotating an image back to its original position), you're computing and applying an inverse matrix — exactly the idea from this lesson. In machine learning, solving systems of equations with matrix inverses is at the heart of methods like linear regression, which finds the best-fit line through data points.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Explain in your own words why the equation x = A⁻¹b solves the system Ax = b. What role does the identity matrix play in the derivation?
Show answer
When you multiply both sides of Ax = b on the left by A⁻¹, you get A⁻¹(Ax) = A⁻¹b. By the associative property of matrix multiplication, the left side becomes (A⁻¹A)x. Since A⁻¹A equals the identity matrix I, this simplifies to Ix. The identity matrix acts like the number 1 in regular multiplication — multiplying any vector by I gives back the same vector. So Ix = x, and we arrive at x = A⁻¹b. The identity matrix is the bridge that allows A⁻¹ to "cancel" A.

Question 2: BASIC CALCULATION

Solve the system 3x + 2y = 12 and x + y = 5 using the inverse method. That is, write the system as Ax = b, find A⁻¹, and compute x = A⁻¹b.
Show answer
First, A = [3 2; 1 1] and b = [12; 5]. The determinant is det(A) = 3(1) − 2(1) = 1. Since det(A) = 1 ≠ 0, the inverse exists. Using the formula: A⁻¹ = (1/1) × [1 −2; −1 3] = [1 −2; −1 3]. Now compute x = A⁻¹b: x = 1(12) + (−2)(5) = 12 − 10 = 2, and y = (−1)(12) + 3(5) = −12 + 15 = 3. So the solution is x = 2, y = 3. You can verify: 3(2) + 2(3) = 12 ✓ and 2 + 3 = 5 ✓.

Question 3: INTERMEDIATE

Consider the system 4x − 2y = 10 and −2x + y = −5. Find the determinant of the coefficient matrix. What does it tell you about the system? Can you solve using the inverse method?
Show answer
The coefficient matrix is A = [4 −2; −2 1]. The determinant is det(A) = 4(1) − (−2)(−2) = 4 − 4 = 0. Since the determinant is zero, A is singular and has no inverse. This means the inverse method cannot be used. Looking more closely at the equations, the second equation is just the first equation multiplied by −1/2: if you multiply 4x − 2y = 10 by −1/2, you get −2x + y = −5. So the two equations describe the same line, and there are infinitely many solutions — any point on the line 4x − 2y = 10 works. The determinant correctly warned us that a unique solution does not exist.

Question 4: APPLIED

A store sells two types of trail mix. Type P uses 3 cups of nuts and 1 cup of dried fruit per bag. Type Q uses 2 cups of nuts and 2 cups of dried fruit per bag. The store has 24 cups of nuts and 16 cups of dried fruit. Write this as a matrix equation Ax = b and solve using the inverse method to find how many bags of each type can be made.
Show answer
Let p = number of Type P bags and q = number of Type Q bags. The nut constraint gives 3p + 2q = 24, and the fruit constraint gives 1p + 2q = 16. So A = [3 2; 1 2] and b = [24; 16]. The determinant is det(A) = 3(2) − 2(1) = 6 − 2 = 4. The inverse is A⁻¹ = (1/4) × [2 −2; −1 3] = [1/2 −1/2; −1/4 3/4]. Multiplying: p = (1/2)(24) + (−1/2)(16) = 12 − 8 = 4, and q = (−1/4)(24) + (3/4)(16) = −6 + 12 = 6. The store can make 4 bags of Type P and 6 bags of Type Q. Verify: nuts used = 3(4) + 2(6) = 12 + 12 = 24 ✓, fruit used = 1(4) + 2(6) = 4 + 12 = 16 ✓.

Question 5: CRITICAL THINKING

Suppose you have a 2×2 matrix A with det(A) = 5. You solve Ax = b₁ and get x₁, then solve Ax = b₂ and get x₂. Without computing any inverses, explain why A(x₁ + x₂) = b₁ + b₂. What does this property — called the superposition principle — tell you about the relationship between solutions to different systems that share the same coefficient matrix?
Show answer
Since Ax₁ = b₁ and Ax₂ = b₂, we can add both equations: Ax₁ + Ax₂ = b₁ + b₂. Matrix multiplication distributes over addition, so A(x₁ + x₂) = b₁ + b₂. This means x₁ + x₂ is the solution to the system Ax = b₁ + b₂. This is the superposition principle: you can combine known solutions to build solutions for new right-hand sides. It also illustrates why computing A⁻¹ once is so powerful — since x = A⁻¹b, the inverse "encodes" how A transforms any input, and A⁻¹(b₁ + b₂) = A⁻¹b₁ + A⁻¹b₂ = x₁ + x₂. This linearity is foundational in physics and engineering, where complex signals are broken into simpler components and solved separately.

SUMMARY

Lesson Summary

Summary

A system of linear equations can be written compactly as Ax = b, where A is the coefficient matrix, x is the vector of unknowns, and b is the vector of constants. If the determinant of A is not zero, then A has an inverse A⁻¹, and the unique solution is found by computing x = A⁻¹b.

For a 2×2 matrix, the inverse is calculated by swapping diagonal entries, negating off-diagonal entries, and dividing by the determinant. This method is especially powerful when you need to solve multiple systems with the same coefficient matrix A but different right-hand sides b. When the determinant equals zero, the matrix is singular and has no inverse — in that case, the system either has no solution or infinitely many, and you'll need a different method like row reduction to investigate further.

Varsity Tutors • Linear Algebra • Solving Ax=b via Inverses