Precalculus (Common Core) • Systems of Equations

Representing Linear Systems with Matrices

Learn how to package an entire system of equations into one compact matrix equation.

Precalculus subject emblem with a curved function graph, function notation, and pi.
Inside this lesson 10 sections 5 questions 7 figures

SECTION 1

Historical Context & Motivation

Systems of linear equations are among the oldest problems in mathematics — merchants in ancient civilizations needed to solve them when balancing trade accounts or dividing resources. For centuries, mathematicians solved these systems one equation at a time, using methods we now call substitution and elimination. As the number of equations grew — think engineering problems with dozens or even hundreds of unknowns — those methods became painfully slow and error-prone. Mathematicians asked: is there a more organized, scalable way to write down and solve big systems?

~200 BCE • Chinese "Nine Chapters"

The Chinese text Jiuzhang Suanshu described a method of arranging coefficients on a counting board and performing column operations — an early precursor to matrix row reduction.

1683 • Seki Takakazu's Determinants

Japanese mathematician Seki Takakazu independently developed the concept of determinants, a numerical value computed from a square array of coefficients that reveals whether a system has a unique solution.

1850 • Sylvester Coins 'Matrix'

English mathematician James Joseph Sylvester introduced the word matrix (Latin for "womb") to describe a rectangular array of numbers from which determinants are born.

1858 • Cayley Formalizes Matrix Algebra

Arthur Cayley published rules for adding and multiplying matrices, establishing the matrix equation Ax = b as a standard way to represent linear systems.

1947–present • Computer-Age Linear Algebra

With the advent of electronic computers, matrix methods became the backbone of modern science and engineering — from 3-D graphics rendering to machine-learning algorithms that process millions of equations.

The central question this lesson addresses is straightforward: how do we translate an entire system of linear equations into one neat matrix equation? Mastering this translation is the gateway to powerful solution techniques you will encounter later, such as Gaussian elimination and inverse-matrix methods.

SECTION 2

Core Principles & Definitions

Before we build a matrix equation, we need to understand the building blocks. A matrix is a rectangular array of numbers arranged in rows and columns, enclosed in brackets. Each number in the array is called an entry (or element). A matrix with m rows and n columns is called an m × n matrix. When a matrix has only one column (dimensions m × 1), we call it a column vector.

1

Coefficient Matrix (A)

A rectangular array that holds all the coefficients from the system's equations. For a system of m equations and n unknowns, A is m × n.
2

Variable Vector (x)

A column vector that lists the unknown variables in a fixed order (e.g., x, y, z). It has dimensions n × 1.
3

Constant Vector (b)

A column vector that holds the constants from the right side of each equation. It has dimensions m × 1.
4

Matrix Multiplication (Ax)

Multiplying A (size m × n) by x (size n × 1) yields a column vector of size m × 1. Each entry is the dot product of a row of A with the vector x.
5

Matrix Equation (Ax = b)

The single compact statement that encodes every equation in the system at once. Solving this equation means finding the vector x that makes Ax equal b.
✦

KEY TAKEAWAY

Think of a matrix equation like a zip file on your computer. The original system of equations is a folder full of separate files — each equation is its own document. The matrix form Ax = b compresses all of that information into a single, tidy package. No data is lost; every coefficient, variable, and constant is still there — just reorganized so it is easier to transport and process.

SECTION 3

Visual Explanation — Anatomy of Ax = b

Translating a System into Ax = bORIGINAL SYSTEM2x + 3y = 74x − 1y = 5Two equations, two unknownsCOEFFICIENT MATRIX A2 34 −1xxy=b75How Matrix Multiplication Recovers Each EquationRow 1 of A · x : [2 3] · [x y] = 2x + 3y = 7Row 2 of A · x : [4 −1] · [x y] = 4x − 1y = 5COLOR KEYCoefficients (A)Variables (x)Constants (b)Equals sign
The diagram shows how each equation's coefficients (violet) fill a row of A, the unknowns (cyan) become the vector x, and the constants (amber) become the vector b. Matrix multiplication of each row by x reproduces the original equation.

Look carefully at the diagram above. The first row of the coefficient matrix A contains the coefficients 2 and 3, taken directly from the first equation 2x + 3y = 7. The second row contains 4 and −1 from the second equation. When we multiply A by the variable vector x, each row "reaches across" and performs a dot product with x, recreating the left side of its corresponding equation. The result is a column vector that must equal b, the vector of constants on the right. This is exactly why Ax = b works as a compact representation of the entire system.

SECTION 4

Mathematical Framework

Let's formalize the translation from a system of linear equations to a single matrix equation. Consider a general system of m equations with n unknowns. Each equation has the form a₁x₁ + a₂x₂ + … + aₙxₙ = bᵢ. We separate the three types of information — coefficients, unknowns, and constants — into their own structures.

GENERAL MATRIX EQUATION

Ax=bAx = b

A is the m × n coefficient matrix, x is the n × 1 variable vector, and b is the m × 1 constant vector.

2 × 2 EXAMPLE

⎡a11a12⎤⎡x1⎤⎡b1⎤⎣a21a22⎦⎣x2⎦=⎣b2⎦⎡ a₁₁ a₁₂ ⎤ ⎡ x₁ ⎤ ⎡ b₁ ⎤ ⎣ a₂₁ a₂₂ ⎦ ⎣ x₂ ⎦ = ⎣ b₂ ⎦

Row i of A times the vector x produces the left side of equation i: ai1x1 + ai2x2 = bi.

3 × 3 EXAMPLE

⎡a11a12a13⎤⎡x⎤⎡b1⎤⎢a21a22a23⎥⎢y⎥=⎢b2⎥⎣a31a32a33⎦⎣z⎦⎣b3⎦⎡ a₁₁ a₁₂ a₁₃ ⎤ ⎡ x ⎤ ⎡ b₁ ⎤ ⎢ a₂₁ a₂₂ a₂₃ ⎥ ⎢ y ⎥ = ⎢ b₂ ⎥ ⎣ a₃₁ a₃₂ a₃₃ ⎦ ⎣ z ⎦ ⎣ b₃ ⎦

For three equations and three unknowns, the coefficient matrix is 3 × 3, and both the variable and constant vectors have three entries.

💡

Dimension Check

Matrix multiplication Ax is only defined when the number of columns in A equals the number of rows in x. Since A is m × n and x is n × 1, the inner dimensions match (n = n), and the product Ax is m × 1 — exactly the same size as b. Always verify dimensions before writing a matrix equation.

SECTION 5

Step-by-Step Translation Process

Translating a system of equations into the matrix form Ax = b is a structured process. The key is consistency: always list variables in the same order, and always include zero coefficients for any variable that does not appear in a particular equation. Below is a detailed roadmap and a diagram that shows the mapping visually.

  1. Align variables. Rewrite every equation so variables appear in the same order on the left and the constant is on the right.
  2. Insert zero coefficients. If a variable is missing from an equation, use 0 as its coefficient. For example, if an equation reads 5x = 10 in a system with x and y, rewrite it as 5x + 0y = 10.
  3. Read off the coefficient matrix A. Each equation becomes one row of A, and each variable's coefficient becomes the entry in its column.
  4. Form the variable vector x. List the variables in the same order as the columns of A, stacked vertically.
  5. Form the constant vector b. List the right-side constants in the same order as the rows of A.
  6. Write Ax = b and verify. Mentally multiply the first row of A by x to confirm it equals the first equation.
Mapping a 3×3 System to Ax = bSYSTEM1x + 2y + 3z = 94x + 5y + 6z = 247x + 8y + 0z = 15Note: z missing in eq. 3 → coefficient = 0A1 2 34 5 67 8 0xxyz=b 92415Verification: Multiply Row 1 of A by x[1 2 3] · [x y z]ᵀ = 1·x + 2·y + 3·z = 9 ✓DIMENSION SUMMARYA : 3 × 3 (3 equations, 3 unknowns)x : 3 × 1 (3 unknowns in a column)b : 3 × 1 (3 constants in a column)Inner dimensions: 3 = 3 ✓Product Ax : 3 × 1 (matches b) ✓
This diagram maps a 3 × 3 system to Ax = b. Dashed violet arrows trace how each equation's coefficients fill a row of A. Dashed amber arrows trace how each equation's constant fills an entry of b. The verification section at the bottom confirms that the dot product of Row 1 with x recovers the first equation.
⚠

Common Mistake

If a variable does not appear in an equation, do not skip its column. Use 0 as the coefficient. In the diagram above, the third equation has no z term, so its row in A ends with 0. Forgetting this zero shifts all entries to the wrong columns and breaks the matrix equation.

SECTION 6

Worked Example

Let's walk through a complete example to cement the process. We will convert a 3 × 3 system into matrix form and then verify one row to make sure everything checks out.

Converting a 3 × 3 System to Ax = b

  1. 1

    Step 1 — Write the System

    Consider the system: 2x − 3y + z = 1 x + y − 4z = −3 3x + 2y + 5z = 14 All three variables (x, y, z) appear in every equation, and the constants are already on the right side.
  2. 2

    Step 2 — Identify the Coefficient Matrix A

    Read the coefficients from each equation in the order x, y, z: Row 1 → [ 2, −3, 1] Row 2 → [ 1, 1, −4] Row 3 → [ 3, 2, 5] So A is the 3 × 3 matrix with these rows.
    A = ⎡ 2 −3 1 ⎤ ⎢ 1 1 −4 ⎥ ⎣ 3 2 5 ⎦
  3. 3

    Step 3 — Form the Variable Vector x

    List the unknowns in the same order used for the columns of A.
    x = ⎡ x ⎤ ⎢ y ⎥ ⎣ z ⎦
  4. 4

    Step 4 — Form the Constant Vector b

    List the right-side constants in the order of the equations.
    b = ⎡ 1 ⎤ ⎢ −3 ⎥ ⎣ 14 ⎦
  5. 5

    Step 5 — Write Ax = b

    Combine A, x, and b into the single matrix equation:
    ⎡ 2 −3 1 ⎤ ⎡ x ⎤ ⎡ 1 ⎤ ⎢ 1 1 −4 ⎥ ⎢ y ⎥ = ⎢ −3 ⎥ ⎣ 3 2 5 ⎦ ⎣ z ⎦ ⎣ 14 ⎦
  6. 6

    Step 6 — Verify Row 2

    Multiply Row 2 of A by x: [1, 1, −4] · [x, y, z]ᵀ = 1·x + 1·y + (−4)·z = x + y − 4z. This matches the left side of the second equation x + y − 4z = −3. ✓ The translation is correct.
    Row 2 of A · x = x + y − 4z = −3 ✓

SECTION 7

Advantages and Limitations of Matrix Form

Representing a system as Ax = b is not just a notational convenience — it opens the door to powerful solution strategies. However, it also has some constraints that are important to understand before you rely on it.

FeatureAdvantageLimitation / Note
Compact notationAn entire system (even with 100 equations) reduces to one equation: Ax = b.You must keep track of variable order; swapping columns changes the meaning.
ScalabilityMatrix methods work equally well for 2 × 2 and 2000 × 2000 systems.For very large systems, computational cost can be high (though computers handle this efficiently).
Solution techniquesEnables inverse-matrix method (x = A⁻¹b), row reduction, Cramer's rule, and computer algorithms.Some techniques (like A⁻¹b) require A to be square and invertible — not all systems qualify.
Error detectionDimension checks catch mismatches before you start solving.A correct matrix equation does not guarantee a unique solution; the system may be inconsistent or dependent.
Applies only to linear systemsLinear systems are extremely common in science and engineering.Non-linear equations (with x², xy, sin x, etc.) cannot be expressed in Ax = b form.

Strengths and constraints of the matrix equation Ax = b.

✦

KEY TAKEAWAY

Think of the matrix form like switching from giving someone a list of driving directions ("turn left, then go 2 miles, then turn right…") to handing them a GPS address. Both contain the same destination information, but the GPS address is a standard format that any navigation app can process instantly. Similarly, Ax = b is a standard format that any matrix-solving algorithm can process, no matter how many equations you have.

SECTION 8

Connection to Advanced Topics

Writing a system as Ax = b is often the first step, not the last. Once you have the matrix equation, a whole toolkit of solution methods becomes available. Understanding how this representation connects to more advanced ideas will help you see the bigger picture.

This Lesson (Ax = b)Advanced Extension
Form the coefficient matrix A from a system.Gaussian elimination (row reduction): Apply row operations to the augmented matrix [A | b] to solve for x.
Know that Ax = b can represent any linear system.Inverse matrices: If A is square and invertible, compute x = A⁻¹b directly.
Understand variable and constant vectors.Eigenvalues and eigenvectors: Special vectors x for which Ax = λx, fundamental in physics and data science.
Check dimensions for compatibility.Linear transformations: The matrix A can be viewed as a function that transforms one vector into another — the foundation of linear algebra.

How today's concept builds toward future topics.

In college-level linear algebra, you will study how the properties of the coefficient matrix A — its rank, determinant, and eigenvalues — determine whether the system has one solution, infinitely many solutions, or no solution at all. Everything starts from the representation you are learning right now: Ax = b.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

In the matrix equation Ax = b, explain what each of the three parts — A, x, and b — represents in terms of the original system of equations. Why is the order of variables important?
Show answer
A is the coefficient matrix: each row contains the coefficients from one equation, and each column corresponds to one variable. The vector x lists the unknown variables in a fixed, agreed-upon order (e.g., x, y, z from left to right). The vector b holds the constants from the right side of each equation, in the same row order as A. Variable order matters because matrix multiplication matches the entries of a row of A with the corresponding entries of x; if you swap two variables in x, you must also swap the corresponding columns of A to keep the equation correct.

Question 2: BASIC CALCULATION

Write the following system as a matrix equation Ax = b: 3x + 2y = 12 −x + 5y = 7
Show answer
The coefficient matrix A is formed by reading the coefficients in order: Row 1 gives [3, 2] from 3x + 2y, and Row 2 gives [−1, 5] from −x + 5y. The variable vector is x = [x, y]ᵀ, and the constant vector is b = [12, 7]ᵀ. So the matrix equation is: ⎡ 3 2 ⎤ ⎡ x ⎤ = ⎡ 12 ⎤ ⎣−1 5 ⎦ ⎣ y ⎦ ⎣ 7 ⎦. You can verify by multiplying Row 1: 3x + 2y = 12, which matches the first equation.

Question 3: INTERMEDIATE

Convert the following system into the matrix equation Ax = b. Note that not every variable appears in every equation. 4x − y + 2z = 10 x + 3z = 6 −2x + y − z = −1
Show answer
First, insert zero coefficients where variables are missing. The second equation has no y term, so rewrite it as x + 0y + 3z = 6. Now read the coefficients in order (x, y, z) for each equation: Row 1 → [4, −1, 2], Row 2 → [1, 0, 3], Row 3 → [−2, 1, −1]. The coefficient matrix is A = ⎡ 4 −1 2 ⎤ ⎢ 1 0 3 ⎥ ⎣−2 1 −1 ⎦, the variable vector is x = [x, y, z]ᵀ, and b = [10, 6, −1]ᵀ. Check Row 2: 1·x + 0·y + 3·z = x + 3z = 6. ✓

Question 4: APPLIED

A movie theater sells adult tickets for $12, child tickets for $8, and senior tickets for $10. On Friday, 150 tickets were sold for a total of $1,540. The number of child tickets was 20 more than the number of senior tickets. Set up the system of equations and then represent it as a single matrix equation Ax = b, using variables a, c, and s for the number of each ticket type.
Show answer
Let a = adult tickets, c = child tickets, s = senior tickets. The three conditions give: (1) a + c + s = 150 (total tickets), (2) 12a + 8c + 10s = 1540 (total revenue), (3) c − s = 20 (children exceed seniors by 20), which is 0a + c − s = 20. The coefficient matrix is A = ⎡ 1 1 1 ⎤ ⎢12 8 10 ⎥ ⎣ 0 1 −1 ⎦, x = [a, c, s]ᵀ, and b = [150, 1540, 20]ᵀ. The matrix equation Ax = b compactly encodes all three conditions. Solving (using methods you'll learn next) yields a = 50, c = 60, s = 40.

Question 5: CRITICAL THINKING

Suppose you have a system of 3 equations with 2 unknowns: 2x + y = 5 x − y = 1 3x + 2y = 8 Can you still write this as Ax = b? What are the dimensions of A, x, and b? What does having more equations than unknowns suggest about the system?
Show answer
Yes, you can absolutely write this as Ax = b. The coefficient matrix A is 3 × 2 (three rows for three equations, two columns for two unknowns): A = ⎡ 2 1 ⎤ ⎢ 1 −1 ⎥ ⎣ 3 2 ⎦, x = [x, y]ᵀ (2 × 1), and b = [5, 1, 8]ᵀ (3 × 1). The dimensions are compatible: A (3×2) times x (2×1) gives a 3×1 vector that must equal b. Having more equations than unknowns creates an overdetermined system. This means one of the equations may be redundant (it already follows from the others), or the system may be inconsistent (no solution satisfies all three). In this case, solving the first two gives x = 2 and y = 1, and checking the third: 3(2) + 2(1) = 8 ✓, so the system is consistent and the third equation is dependent on the first two.

SUMMARY

Lesson Summary

Summary

Any system of linear equations can be rewritten as a single matrix equation Ax = b. The coefficient matrix A stores all the coefficients (one row per equation, one column per variable), the variable vector x lists the unknowns in a fixed order, and the constant vector b holds the right-side values. When you multiply A by x using matrix multiplication, each row of A takes a dot product with x, reproducing the left side of that equation.

Key steps: align variables across all equations, insert zero coefficients for missing variables, read off A and b, and always perform a dimension check to confirm compatibility. This compact representation is the foundation for every matrix-based solution method you will encounter in precalculus and beyond, including Gaussian elimination, inverse matrices, and Cramer's rule.

Varsity Tutors • Precalculus • Representing Linear Systems with Matrices