Algebra 2 (Common Core) • Systems of Equations

Representing Linear Systems with Matrices

Transform systems of equations into compact matrix form to unlock powerful solving techniques.

Algebra illustration with a variable, function graph, and equality symbol
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

You have likely solved systems of two or three equations by substitution or elimination, writing each equation on its own line and carefully juggling variables. That approach works fine for small systems, but mathematicians and scientists routinely face problems with dozens—even thousands—of equations. The search for an organized, scalable notation led to one of algebra's most powerful ideas: the matrix. A matrix is essentially a rectangular grid of numbers arranged in rows and columns, and when paired with vector notation, it compresses an entire system of equations into a single, elegant statement.

The story of matrices stretches across several centuries and multiple cultures. Ancient Chinese scholars organized coefficients on counting boards long before anyone coined the word "matrix." European mathematicians rediscovered and formalized these ideas in the 1800s, and by the twentieth century, matrix algebra had become indispensable in engineering, computer graphics, data science, and physics.

~200 BCE • Chinese Counting Boards

The Chinese text Jiuzhang Suanshu ("Nine Chapters on the Mathematical Art") describes solving systems of equations by arranging coefficients in rectangular arrays on counting boards—an early form of matrix representation.

1683 • Determinants Introduced

Japanese mathematician Seki Takakazu and, independently, Gottfried Wilhelm Leibniz in Germany developed the theory of determinants—special numbers computed from square arrays that reveal whether a system has a unique solution.

1850 • The Word "Matrix"

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

1858 • Matrix Algebra Formalized

Arthur Cayley published rules for adding and multiplying matrices, establishing matrix algebra as a formal branch of mathematics. His framework allowed entire systems to be written as a single equation.

1940s–Today • Computers & Modern Applications

With the rise of digital computers, matrix methods became the backbone of scientific computing. Today, every smartphone game, search engine ranking, and weather forecast relies on solving massive matrix equations at lightning speed.

The central question this lesson addresses is straightforward: How do we take a familiar system of linear equations and rewrite it as a single matrix equation? Mastering this translation is the gateway to an entire toolkit of advanced solving strategies you will encounter in later courses.

SECTION 2

Core Principles & Definitions

Before translating a system into matrix form, you need to understand several foundational building blocks. Each piece has a specific role, and together they let you compress multiple equations into a single compact statement.

1

Matrix

A matrix is a rectangular array of numbers organized in rows and columns. Its size is described as m × n, where m is the number of rows and n is the number of columns.
2

Coefficient Matrix (A)

The coefficient matrix collects the numbers that multiply each variable. Each row corresponds to one equation, and each column corresponds to one variable.
3

Variable Vector (x⃗)

The variable vector is a column matrix listing all the unknowns in the system—typically x, y, z, and so on, stacked vertically.
4

Constant Vector (b⃗)

The constant vector is a column matrix containing the numbers on the right side of each equation, representing the values each linear combination must equal.
5

Matrix Equation A·x⃗ = b⃗

The matrix equation combines all three pieces. When you multiply the coefficient matrix by the variable vector, you get the constant vector. This single equation encodes every equation in the original system.

The key idea behind the matrix equation is matrix multiplication. When you multiply a matrix A by a column vector x⃗, you take the dot product of each row of A with the entries of x⃗. Each dot product produces exactly one equation from the original system. So the single expression A·x⃗ = b⃗ automatically generates every equation at once.

✦

KEY TAKEAWAY

Think of the matrix equation like a vending machine. You drop in your variable vector (the coins), the coefficient matrix (the machine's programming) processes them, and out comes the constant vector (the product). The equation A·x⃗ = b⃗ says: "When this machine processes these unknowns, it must produce these specific outputs." Solving the system means figuring out exactly which coins to insert.

SECTION 3

Visualizing the Translation

The diagram below shows exactly how a system of two linear equations is dismantled and reorganized into matrix form. Follow the color coding: coefficients fill the coefficient matrix, variables form the variable vector, and constants become the constant vector.

From System of Equations to Matrix EquationA · x⃗ = b⃗ORIGINAL SYSTEM:2x+3y=54x−1y=6CoefficientsVariablesConstantsA2 34 −1·x⃗xy=b⃗56VERIFICATION (Row 1 dot product):(2)(x) + (3)(y) = 5← This is the first original equation!(4)(x) + (−1)(y) = 6← This is the second original equation!
The color-coded diagram shows how each piece of the original system maps into the matrix equation. Cyan coefficients fill matrix A, pink variables form the variable vector x⃗, and amber constants make up the constant vector b⃗. The verification section at the bottom confirms that multiplying the first row of A by x⃗ reproduces the first equation.

Notice how each row of the coefficient matrix A corresponds to one equation. The first row [2, 3] holds the coefficients from the first equation, and the second row [4, −1] holds the coefficients from the second equation. The order of the columns must match the order of the variables in the variable vector. If x is listed first in x⃗, then the first column of A must contain the coefficients of x from each equation. This consistent ordering is critical—mixing up the columns would produce entirely different (and incorrect) equations.

SECTION 4

Mathematical Framework

Let's formalize the translation. Consider a general system of m linear equations in n unknowns. We define three components: the coefficient matrix, the variable vector, and the constant vector. When multiplied according to the rules of matrix multiplication, they reproduce every equation in the original system.

GENERAL SYSTEM OF LINEAR EQUATIONS

a11x1+a12x2+⋯+a1nxn=b1a21x1+a22x2+⋯+a2nxn=b2⋮am1x1+am2x2+⋯+amnxn=bma₁₁x₁ + a₁₂x₂ + ⋯ + a₁ₙxₙ = b₁ a₂₁x₁ + a₂₂x₂ + ⋯ + a₂ₙxₙ = b₂ ⋮ aₘ₁x₁ + aₘ₂x₂ + ⋯ + aₘₙxₙ = bₘ

Each aᵢⱼ is the coefficient in the i-th equation multiplying the j-th variable. Each bᵢ is the constant on the right side of the i-th equation.

MATRIX EQUATION FORM

A⋅x⃗=b⃗A · x⃗ = b⃗

A = m × n coefficient matrix, x⃗ = n × 1 variable vector, b⃗ = m × 1 constant vector. The product A · x⃗ yields an m × 1 column vector whose i-th entry is the dot product of row i of A with x⃗, which is exactly the left side of the i-th equation.

2 × 2 EXAMPLE — EXPANDED

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

Multiplying row 1 of A by the variable vector gives a₁₁x + a₁₂y = b₁. Multiplying row 2 gives a₂₁x + a₂₂y = b₂. These are exactly the original two equations.

The dimensions must be compatible for the multiplication to work. The coefficient matrix A is m × n, the variable vector x⃗ is n × 1, and the result b⃗ is m × 1. The number of columns in A must equal the number of rows in x⃗ (both are n), and the resulting product has the same number of rows as A (which is m), matching the size of b⃗.

💡

Dimension Check Rule

Before writing A · x⃗ = b⃗, always verify: if your system has m equations and n variables, then A is m × n, x⃗ is n × 1, and b⃗ is m × 1. If a variable is missing from an equation, its coefficient is 0 in that row.

SECTION 5

Extending to Larger Systems

The real power of matrix notation becomes clear when you move beyond two equations. A 3 × 3 system—three equations in three unknowns—follows the same structure, but the coefficient matrix now has three rows and three columns. The diagram below illustrates a concrete 3 × 3 system and its matrix equation.

3 × 3 System → Matrix EquationSYSTEM: x + 2y + 3z = 14 2x − y + z = 3−3x + 4y − 2z = 1MATRIX EQUATION: A · x⃗ = b⃗Coefficient Matrix A 1 2 3 2 −1 1−3 4 −2·Variable Vector x⃗xyz=Constant Vector b⃗14 3 1DIMENSION CHECK:A: 3 × 3×x⃗: 3 × 1=b⃗: 3 × 1✓ Inner dimensions match (3 = 3)✓ Result is 3 × 1, matching b⃗
A 3 × 3 system shown alongside its matrix equation. The dimension check at the bottom confirms the multiplication is valid: the inner dimensions of A (3 columns) and x⃗ (3 rows) match, and the resulting product has 3 rows, matching b⃗.

There are a few important details to keep in mind when building larger matrix equations. First, every equation must be in standard form with all variable terms on the left and the constant on the right. Second, the variables must appear in the same order across every equation. If a variable is absent from a particular equation, you insert a coefficient of zero. For example, the equation 3x + 5z = 10 has no y term, so its row in the coefficient matrix would be [3, 0, 5].

System SizeCoefficient Matrix AVariable Vector x⃗Constant Vector b⃗
2 equations, 2 unknowns2 × 22 × 12 × 1
3 equations, 3 unknowns3 × 33 × 13 × 1
m equations, n unknownsm × nn × 1m × 1

Matrix dimensions for systems of different sizes

SECTION 6

Worked Example

Let's walk through a complete example, converting a system of three equations into a single matrix equation and then verifying it by performing the matrix multiplication.

Converting a 3 × 3 System to Matrix Form

  1. 1

    Step 1 — Write the system in standard form

    Consider the system: 3x − 2y + z = 7 x + 4y − 3z = −5 5x + y + 2z = 13 All three equations already have variables on the left in x, y, z order and constants on the right, so no rearranging is needed.
  2. 2

    Step 2 — Identify the coefficient matrix A

    Extract the coefficient of each variable from each equation, reading left to right, top to bottom: Row 1 (from 3x − 2y + z = 7): [3, −2, 1] Row 2 (from x + 4y − 3z = −5): [1, 4, −3] Row 3 (from 5x + y + 2z = 13): [5, 1, 2] So A is the 3 × 3 matrix with these rows.
    A = ⎡ 3 −2 1 ⎤ ⎢ 1 4 −3 ⎥ ⎣ 5 1 2 ⎦
  3. 3

    Step 3 — Write the variable vector x⃗

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

    Step 4 — Write the constant vector b⃗

    Collect the right-hand side of each equation, in order.
    b⃗ = ⎡ 7 ⎤ ⎢ −5 ⎥ ⎣ 13 ⎦
  5. 5

    Step 5 — Assemble the matrix equation

    Combine all three components into the matrix equation A · x⃗ = b⃗.
    ⎡ 3 −2 1 ⎤ ⎡ x ⎤ ⎡ 7 ⎤ ⎢ 1 4 −3 ⎥ ⎢ y ⎥ = ⎢ −5 ⎥ ⎣ 5 1 2 ⎦ ⎣ z ⎦ ⎣ 13 ⎦
  6. 6

    Step 6 — Verify by expanding row 2

    To confirm, compute the dot product of row 2 of A with x⃗: (1)(x) + (4)(y) + (−3)(z) = x + 4y − 3z. This matches the second original equation x + 4y − 3z = −5. You can verify the other two rows the same way.
    ✓ The matrix equation correctly encodes all three original equations.

SECTION 7

Strengths & Limitations of Matrix Form

Rewriting a system as A · x⃗ = b⃗ is not just an exercise in notation—it opens doors to powerful techniques. However, like any tool, matrix form has both advantages and situations where extra caution is needed.

StrengthsLimitations / Cautions
Compresses any number of equations into one statement, making large systems manageable.Every equation must be in standard form first; terms on the wrong side will produce incorrect coefficients.
Enables systematic solving methods like Gaussian elimination, Cramer's rule, and matrix inverses.Matrix multiplication is not commutative: A · x⃗ ≠ x⃗ · A, so the order must be exact.
Computers can store and manipulate matrices efficiently, solving systems with thousands of variables.If a variable is missing from an equation, you must remember to include a coefficient of 0 in the matrix.
The determinant of A quickly reveals whether the system has a unique solution.Non-square systems (more equations than variables or vice versa) require additional analysis beyond A⁻¹.

Comparing the strengths and limitations of matrix form for linear systems

✦

KEY TAKEAWAY

Matrix notation is like switching from handwriting individual letters to using a printing press. The setup takes a moment of care—aligning variables, placing coefficients correctly—but once the matrix is built, you gain access to an entire suite of efficient, scalable solving techniques that would be impractical with individual equations.

SECTION 8

Connection to Advanced Topics

Once you can express a system as A · x⃗ = b⃗, you are standing at the entrance to a rich landscape of advanced methods. In precalculus and linear algebra courses, you will learn to solve the matrix equation directly using matrix inverses, row reduction, and decomposition techniques. Here is a quick preview of how matrix form connects to what lies ahead.

What You Learn NowWhat Comes Next
Writing A · x⃗ = b⃗ from a system of equationsSolving x⃗ = A⁻¹ · b⃗ when the inverse exists
Understanding dimension compatibilityUsing augmented matrices and row echelon form (Gaussian elimination)
Recognizing the coefficient matrix AComputing det(A) to determine if a unique solution exists (Cramer's Rule)
Checking that coefficients are correctly placedEigenvalues, eigenvectors, and transformations in linear algebra

From CCSS.A-REI.8 to future coursework

The big takeaway is that learning to represent a system in matrix form is not an end in itself—it is the launchpad for nearly every advanced technique in linear algebra. Think of it as learning to read sheet music: the notation itself does not make the music, but without it, you cannot access the symphonies that follow.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

In the matrix equation A · x⃗ = b⃗, what does each row of the coefficient matrix A represent, and why must the columns of A be in the same order as the entries of x⃗?
Show answer
Each row of A holds the coefficients from one equation in the system. When you take the dot product of that row with x⃗, you reconstruct the left side of that equation. The columns of A must match the order of x⃗ because matrix multiplication pairs the first entry in the row with the first entry in the column vector, the second with the second, and so on. If the order is wrong, each product pairs a coefficient with the wrong variable, producing an equation that does not match the original system.

Question 2: BASIC CALCULATION

Write the following system as a matrix equation A · x⃗ = b⃗. Clearly state A, x⃗, and b⃗. 5x + 2y = 11 −x + 7y = 4
Show answer
The coefficient matrix A is the 2 × 2 matrix with rows [5, 2] and [−1, 7]. The variable vector is x⃗ = [x, y]ᵀ (a column vector). The constant vector is b⃗ = [11, 4]ᵀ. So the matrix equation is: ⎡ 5 2 ⎤ ⎡ x ⎤ ⎡ 11 ⎤ ⎣ −1 7 ⎦ ⎣ y ⎦ = ⎣ 4 ⎦ You can verify by computing the dot product of row 1 with x⃗: 5x + 2y, which matches the first equation. Row 2 gives −x + 7y, matching the second equation.

Question 3: INTERMEDIATE

Write the following 3 × 3 system as a matrix equation. Note that the second equation has no y term. 2x − y + 4z = 10 6x + z = 3 −x + 3y − 2z = −8
Show answer
Because the second equation has no y term, its y-coefficient is 0. The coefficient matrix A has rows [2, −1, 4], [6, 0, 1], and [−1, 3, −2]. The variable vector is x⃗ = [x, y, z]ᵀ, and the constant vector is b⃗ = [10, 3, −8]ᵀ. The matrix equation is: ⎡ 2 −1 4 ⎤ ⎡ x ⎤ ⎡ 10 ⎤ ⎢ 6 0 1 ⎥ ⎢ y ⎥ = ⎢ 3 ⎥ ⎣ −1 3 −2 ⎦ ⎣ z ⎦ ⎣ −8 ⎦ The zero in position (2, 2) of A is essential. Omitting it would shift the z-coefficient into the y-column, producing an incorrect system.

Question 4: APPLIED

A store sells apples, bananas, and cherries. On Monday, a customer buys 3 apples, 2 bananas, and 5 cherries for $8.50. On Tuesday, another customer buys 1 apple and 4 bananas for $3.80 (no cherries). On Wednesday, a customer buys 2 apples, 1 banana, and 3 cherries for $5.70. Let a, b, and c be the prices per apple, banana, and cherry, respectively. Write a matrix equation that represents this pricing system.
Show answer
Translating the purchases into equations: 3a + 2b + 5c = 8.50, 1a + 4b + 0c = 3.80, and 2a + 1b + 3c = 5.70. The coefficient matrix A captures the quantities purchased: rows [3, 2, 5], [1, 4, 0], and [2, 1, 3]. The variable vector is x⃗ = [a, b, c]ᵀ (the unknown prices), and the constant vector is b⃗ = [8.50, 3.80, 5.70]ᵀ (the totals). The zero in position (2, 3) reflects the Tuesday customer buying no cherries. Solving this matrix equation would yield the price of each fruit.

Question 5: CRITICAL THINKING

A student writes the matrix equation for the system "4x − y = 9, 2x + 3y = 1" as: ⎡ 4 2 ⎤ ⎡ x ⎤ ⎡ 9 ⎤ ⎣ −1 3 ⎦ ⎣ y ⎦ = ⎣ 1 ⎦ Identify the error, explain why it leads to incorrect equations, and write the correct matrix equation.
Show answer
The student placed coefficients column-by-column instead of row-by-row. The first row of A should contain the coefficients from the first equation (4 and −1), and the second row should come from the second equation (2 and 3). The student's version effectively creates the system 4x + 2y = 9 and −x + 3y = 1, which is a completely different system. The correct matrix equation is: ⎡ 4 −1 ⎤ ⎡ x ⎤ ⎡ 9 ⎤ ⎣ 2 3 ⎦ ⎣ y ⎦ = ⎣ 1 ⎦ This error highlights the importance of building the coefficient matrix one row at a time, where each row corresponds to one equation, read from left to right.

SUMMARY

Lesson Summary

Summary

Any system of linear equations can be rewritten as a single matrix equation of the form A · x⃗ = b⃗. The coefficient matrix A is built row by row, with each row containing the coefficients from one equation in the system. The variable vector x⃗ lists the unknowns in a consistent order, and the constant vector b⃗ collects the right-hand side values. When a variable is absent from an equation, its coefficient is recorded as zero in the matrix.

The key mechanism behind this representation is matrix multiplication: the dot product of each row of A with x⃗ reconstructs the left side of one equation. Dimension compatibility requires that A be m × n, x⃗ be n × 1, and b⃗ be m × 1. Mastering this translation is the essential first step toward advanced solving methods including Gaussian elimination, matrix inverses, and Cramer's Rule.

Varsity Tutors • Algebra 2 • Representing Linear Systems with Matrices