KnowledgeInSight
What Mathematicians Do
0% of Course 1 complete

Module 3 · Lesson 1

Linear Algebra: Systems of equations, vectors, and matrices from the Nine Chapters to Gauss

You'll solve a system of three equations with a method recorded in an ancient Chinese text and still taught today. You'll see how the numbers in such a system became a matrix, and how a matrix can be read as an instruction that moves every point in a plane.

What you will be able to do

  • Represent a system of linear equations with vectors and matrices and describe what a matrix does to space.

0% of this lesson · 9 items · 1h 3m total · 48m without the optional problem set

Contents of this lesson9 items
  1. ReadingThree Kinds of Grain and Three Unknowns3 min
  2. ReadingElimination from the Nine Chapters to Gauss4 min
  3. ReadingVectors and Linear Combinations4 min
  4. ReadingMatrices as Transformations of the Plane4 min
  5. ReadingNo Solution, One Solution, or Infinitely Many4 min
  6. Guided ReadingWorked Example: Solving the Grain Problem by Elimination7 min
  7. Guided ConversationTurn a Two-Unknown Problem into a Matrix12 min
  8. Problem Set · optionalSystems, Vectors, and Transformations15 min
  9. Knowledge CheckSystems of equations, vectors, and matrices from the Nine Chapters to Gauss10 min

Report an issue on this page

Reading 3 min Done

Three Kinds of Grain and Three Unknowns

Here is a problem from a Chinese mathematical text that is roughly two thousand years old. A farmer has bundles of grain in three grades: top, middle, and low. The yields are measured in dou, a traditional unit of volume for grain. You're told three facts:

  • Three bundles of top grade, two of middle grade, and one of low grade yield 39 dou.
  • Two bundles of top grade, three of middle grade, and one of low grade yield 34 dou.
  • One bundle of top grade, two of middle grade, and three of low grade yield 26 dou.

How much does one bundle of each grade yield? The problem opens the eighth chapter of the Nine Chapters on the Mathematical Art (Yuan 2012; O'Connor and Robertson 2003). Take a minute with it before reading on.

If you tried guessing, you probably found it frustrating. Change your guess for the top grade and all three totals shift at once. Fix one total and you break another. Each fact mixes all three unknowns, so you can't settle any one of them alone.

School algebra trains you for a different situation. One equation with one unknown, such as 3x = 39, gives way to a single division: x = 13. Here the unknowns are tied together. You need a method that untangles them, and that works no matter how the numbers are arranged.

The Nine Chapters supplies one. Its eighth chapter solves problems like this with up to six unknowns, and it uses negative numbers along the way (O'Connor and Robertson 2003). Calculations were done by moving small sticks of wood or bamboo (Yuan 2012). The numbers of each fact were laid out as a column on a counting board. The solver then multiplied one column by a number and subtracted another column from it, again and again, until one column held a single unknown alone. From there, the rest followed by working back.

That procedure matches, step for step, the one now taught as Gaussian elimination (O'Connor and Robertson 2003). Versions of it still run inside the software that solves large systems of equations today. The name points to a German mathematician of the early nineteenth century. The method is far older, and how it got that name is a story in itself.

What the branch offers is one procedure for any number of unknowns: three, six, or thousands. It does this by treating the whole table of numbers as a single object that can be stored, reduced, and acted on. That shift, from many separate equations to one table, is where linear algebra starts.

References

  • O'Connor, J. J., and E. F. Robertson. 2003. "Nine Chapters on the Mathematical Art." MacTutor History of Mathematics Archive, University of St Andrews. Last updated December 2003.
  • Yuan, Ya-xiang. 2012. "Jiu Zhang Suan Shu and the Gauss Algorithm for Linear Equations." Documenta Mathematica, Extra Volume: Optimization Stories, 9–14.

Reading 4 min Done

Elimination from the Nine Chapters to Gauss

Introduction

Methods in mathematics are often named for the person who made them famous in one tradition, not the person who found them. The method of solving equations called Gaussian elimination is a sharp example. This reading traces the method from a Chinese text about two thousand years old, through its European history and naming, to the arrival of the word "matrix."

A Method on a Counting Board

The Nine Chapters on the Mathematical Art is a Chinese collection of problems with methods for solving them. Its date is uncertain. Most historians place the original text around 200 BCE, others between 100 BCE and 50 CE, and different parts may come from different periods. Liu Hui wrote an influential commentary on it in 263 CE (O'Connor and Robertson 2003).

The eighth chapter holds 18 problems that each come down to a system of linear equations: a set of equations that must all hold at once, in which each unknown is only multiplied by a number and added, never squared or multiplied by another unknown. The largest systems in the chapter have six equations in six unknowns (O'Connor and Robertson 2003).

The work was done on a counting board: a flat surface on which numbers were represented by arranging small rods of wood or bamboo (Yuan 2012). Each equation became one column of numbers, with the total at the bottom. The solver then used elimination: removing an unknown from an equation by subtracting a multiple of another equation from it. Columns were multiplied and subtracted until the array reached a triangular form, with one unknown alone in the last column. The other unknowns followed by working back (O'Connor and Robertson 2003; Yuan 2012).

The arrangement differs from modern practice in one way. The Nine Chapters puts each equation in a column, where textbooks today put each equation in a row. Turn the board a quarter-turn and you have the modern layout (Yuan 2012). The chapter also needed negative numbers, since subtracting can leave a negative amount, and it gives rules for computing with them (O'Connor and Robertson 2003).

From "Common" Elimination to "Gaussian" Elimination

In Europe the method has a long, scattered history. Isaac Newton described an elimination process in notes he didn't want published, and later authors applied it to linear equations. Adrien-Marie Legendre called the method "ordinary." Carl Friedrich Gauss called it "common" (Grcar 2011).

Gauss used elimination in his work on the orbit of the asteroid Pallas. From observations made between 1803 and 1809, he obtained a system of six linear equations in six unknowns, and solved it systematically (O'Connor and Robertson 1996b). Much of his work of this kind used least squares, a method for finding the best-fitting values when there are more measurements than unknowns.

Joseph Grcar traces how the method came to carry Gauss's name. Professional computers, the people employed to do long calculations by hand, adopted a compact notation Gauss had devised for his least-squares calculations. That notation made elimination easy to describe as a fixed sequence of arithmetic steps, and the method became known by his name (Grcar 2011).

The Word "Matrix"

The table of numbers needed a name of its own. James Joseph Sylvester introduced the term "matrix" in 1850, describing it as "an oblong arrangement of terms" (O'Connor and Robertson 1996b). Today a matrix is a rectangular array of numbers arranged in rows and columns and treated as a single object.

Arthur Cayley went further in his 1858 "Memoir on the Theory of Matrices." It gave the first abstract definition of a matrix and an algebra for working with matrices: how to add them, multiply them, multiply them by a number, and find their inverses (O'Connor and Robertson 1996b). After Cayley, a matrix was an object you could calculate with, not only a way of laying out a problem.

Why the Name Points to Gauss

The name "Gaussian elimination" is a label, not a claim about who came first. The method appears in the Nine Chapters roughly two thousand years before Gauss, and it didn't become well known in Europe until the early nineteenth century (O'Connor and Robertson 1996b). Ya-xiang Yuan concludes that the method was in use in China at least 2,200 years ago (Yuan 2012).

Names like this usually record who made a method standard in the tradition that named it. Here that tradition was European numerical computing, and the notation it adopted was Gauss's (Grcar 2011). The name stuck even though Gauss himself called the method "common."

Conclusion

Elimination was recorded in China around two thousand years ago, practiced in Europe by Newton, Legendre, and Gauss, and named for Gauss through the habits of later human computers. The word "matrix" dates from 1850, and Cayley's 1858 memoir turned matrices into objects with their own algebra.

Key Terms

  • System of linear equations: A set of equations that must all hold at once, in which each unknown is only multiplied by a number and added, never squared or multiplied by another unknown.
  • Counting board: A flat surface on which numbers were represented by arranging small rods of wood or bamboo.
  • Elimination: Removing an unknown from an equation by subtracting a multiple of another equation from it.
  • Matrix: A rectangular array of numbers arranged in rows and columns and treated as a single object.

References

  • Grcar, Joseph F. 2011. "How Ordinary Elimination Became Gaussian Elimination." arXiv:0907.2397. doi:10.1016/j.hm.2010.06.003.
  • O'Connor, J. J., and E. F. Robertson. 1996b. "Matrices and Determinants." MacTutor History of Mathematics Archive, University of St Andrews. Last updated February 1996.
  • O'Connor, J. J., and E. F. Robertson. 2003. "Nine Chapters on the Mathematical Art." MacTutor History of Mathematics Archive, University of St Andrews. Last updated December 2003.
  • Yuan, Ya-xiang. 2012. "Jiu Zhang Suan Shu and the Gauss Algorithm for Linear Equations." Documenta Mathematica, Extra Volume: Optimization Stories, 9–14.

Reading 4 min Done

Vectors and Linear Combinations

Introduction

A map location, a recipe, and an order for three kinds of grain have something in common. Each is a short list of numbers where the position of each number tells you what it means. This reading explains vectors, how to add and scale them, how to mix them into linear combinations, and how a system of equations becomes a question about mixing.

Lists of Numbers in a Fixed Order

A vector is an ordered list of numbers. Each number in the list is an entry. The vector (3, 2, 1) might record an order of three bundles of top-grade grain, two of middle grade, and one of low grade. Order matters: (1, 2, 3) is a different order entirely.

Vectors are often written as columns, with the first entry on top:

\begin{pmatrix} 3 \\ 2 \\ 1 \end{pmatrix}

A vector with two entries has a picture. Read (x, y) as a point in the plane, x units across and y units up. Then draw an arrow from the origin, the point (0, 0), to that point. The vector (1, 2) is the arrow from the origin to the point one unit right and two units up (Hefferon n.d., chap. 1). Three entries give an arrow in space, and longer lists work the same way in algebra even when no picture is possible.

Adding and Scaling

You add two vectors entry by entry. The first entries add, then the second entries:

(1, 2) + (3, 1) = (1 + 3,\ 2 + 1) = (4, 3)

In the arrow picture, adding means placing the tail of the second arrow at the tip of the first. The sum is the arrow from the start of the first to the tip of the second.

You can also multiply a vector by a single number. A scalar is a single number used to multiply every entry of a vector. Multiplying (1, 2) by the scalar 2 gives (2, 4). The arrow keeps its direction and becomes twice as long. A negative scalar reverses the direction: -1 times (1, 2) is (-1, -2) (Hefferon n.d., chap. 1).

These two operations are all a vector needs. In linear algebra, anything that can be added and scaled by these rules behaves like a vector, whether it records grain, prices, or positions.

Mixing Vectors in Chosen Amounts

Put the two operations together and you get the central move of the branch. A linear combination is a sum of vectors, each first multiplied by a scalar. For example, 2 of (1, 2) plus 1 of (3, 1) is

2(1, 2) + 1(3, 1) = (2, 4) + (3, 1) = (5, 5).

The scalars say how much of each vector goes into the mix. Change them and you reach different points. The words "so much of this, plus so much of that" describe every linear combination.

A System of Equations as a Question About Mixing

Here is a classic grain problem. Three bundles of top grade, two of middle, and one of low yield 39 units of grain. Two of top, three of middle, and one of low yield 34. One of top, two of middle, and three of low yield 26. Call the yield of one bundle of each grade x, y, and z.

Now read the problem by columns instead of rows. The top-grade bundles appear in the amounts (3, 2, 1) across the three facts. The middle grade appears as (2, 3, 2), and the low grade as (1, 1, 3). The totals form the target vector (39, 34, 26). The whole system becomes one equation between vectors:

x\begin{pmatrix} 3 \\ 2 \\ 1 \end{pmatrix} + y\begin{pmatrix} 2 \\ 3 \\ 2 \end{pmatrix} + z\begin{pmatrix} 1 \\ 1 \\ 3 \end{pmatrix} = \begin{pmatrix} 39 \\ 34 \\ 26 \end{pmatrix}

Compare the top entries on each side and you get back the first equation, 3x + 2y + z = 39. The other entries give the other two equations. So solving the system means answering one question: which linear combination of the column vectors gives the target vector (Hefferon n.d., chap. 1)?

That reading changes what you can ask. In the plane, two arrows that don't lie along the same line can be mixed to reach any point at all. Two arrows that lie along the same line can reach only points on that line. Whether a system has an answer depends on which targets the columns can reach.

Conclusion

A vector is an ordered list of entries that can be added and scaled, and a linear combination mixes vectors in chosen amounts. Read by columns, a system of linear equations asks which combination of column vectors produces the target vector. That question is the starting point for most of linear algebra.

Key Terms

  • Vector: An ordered list of numbers, which in two or three entries can be pictured as an arrow from the origin.
  • Entry: One of the numbers in a vector, whose position in the list gives its meaning.
  • Scalar: A single number used to multiply every entry of a vector.
  • Linear combination: A sum of vectors, each first multiplied by a scalar.

References

  • Hefferon, Jim. n.d. Linear Algebra. 4th ed. Colchester, VT: Saint Michael's College. GNU Free Documentation License or CC BY-SA 2.5.

Reading 4 min Done

Matrices as Transformations of the Plane

Introduction

When you rotate a photo on your phone, every point of the image moves at once, by one rule. Linear algebra describes rules like that with a small table of numbers. This reading shows how a 2 \times 2 matrix acts on a point, walks through four example matrices and where they send a square, and explains what "linear" means here and what happens when you combine two moves.

Multiplying a Matrix by a Vector

A matrix is a rectangular array of numbers arranged in rows and columns and treated as a single object. A 2 \times 2 matrix has two rows and two columns. It can act on a point (x, y), written as a column vector, and produce a new point.

The rule is the matrix–vector product: each entry of the result is one row of the matrix multiplied entry by entry with the vector, then added up. Here is one example, worked in full:

\begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix}\begin{pmatrix} 1 \\ 2 \end{pmatrix} = \begin{pmatrix} 2 \cdot 1 + 1 \cdot 2 \\ 1 \cdot 1 + 3 \cdot 2 \end{pmatrix} = \begin{pmatrix} 4 \\ 7 \end{pmatrix}

The top row (2, 1) meets the vector (1, 2) to give 2 + 2 = 4. The bottom row (1, 3) gives 1 + 6 = 7. The same answer comes from mixing the matrix's columns: 1 of the first column (2, 1) plus 2 of the second column (1, 3) is (4, 7) (Hefferon n.d., chap. 3).

Four Matrices, Four Motions

Apply one matrix to every point of the plane and you get a transformation: a rule that moves every point of a plane or of space to a new position. Four matrices show the range of what a 2 \times 2 matrix can do.

The first doubles everything. The second is a rotation, a turn about the origin that changes neither size nor shape; this one turns a quarter-turn counterclockwise. The third flips the plane across the diagonal line where y = x. The fourth is a shear, a move that slides each point sideways by an amount equal to its height, so squares become slanted parallelograms.

The table shows where the four corners of the unit square land. The unit square has corners at (0, 0), (1, 0), (1, 1), and (0, 1).

MotionMatrixImage of (0, 0)Image of (1, 0)Image of (1, 1)Image of (0, 1)
Double everything\begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}(0, 0)(2, 0)(2, 2)(0, 2)
Quarter-turn counterclockwise\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}(0, 0)(0, 1)(−1, 1)(−1, 0)
Flip across the line y = x\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}(0, 0)(0, 1)(1, 1)(1, 0)
Shear\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}(0, 0)(1, 0)(2, 1)(1, 1)

Figure: A grid showing the unit square (corners (0, 0), (1, 0), (1, 1), (0, 1)) in one color, its image under the shear (corners (0, 0), (1, 0), (2, 1), (1, 1)) as a slanted parallelogram in a second color, and its image under the quarter-turn rotation (corners (0, 0), (0, 1), (−1, 1), (−1, 0)) in a third color, with the grid lines also distorted under the shear. Alt text: A unit square on a grid beside its sheared image, a parallelogram leaning right, and its rotated image, the same square turned a quarter-turn to the left of the vertical axis.

Notice where the first column of each matrix shows up. It is always the image of (1, 0), and the second column is always the image of (0, 1). To read what a matrix does, look at its columns.

What "Linear" Means Here

Every transformation in the table keeps the origin where it is. Each sends straight lines to straight lines, and keeps evenly spaced points evenly spaced. A transformation with these properties is linear: it respects addition and scaling, so transforming a sum gives the sum of the transformed vectors, and transforming a scaled vector gives the same multiple of its image (Hefferon n.d., chap. 3).

This sense of "linear" is stricter than "has a graph that is a line." Sliding every point two units to the right keeps lines straight, but it moves the origin, so it isn't linear in this sense. No 2 \times 2 matrix can produce it, because any matrix times (0, 0) gives (0, 0).

Doing One Move After Another

Suppose you apply the quarter-turn, then apply it again. The combined move is a single matrix, the product of the two:

\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}

The result sends (x, y) to (-x, -y), a half-turn, as two quarter-turns should. Each entry of the product comes from a row of the left matrix meeting a column of the right one. In general, doing one transformation after another corresponds to multiplying their matrices, with the first move written on the right (Hefferon n.d., chap. 3).

Order matters. Shearing and then rotating gives a different matrix from rotating and then shearing. With matrices, AB and BA are often different.

Conclusion

A 2 \times 2 matrix moves every point of the plane by one rule, and its columns show where (1, 0) and (0, 1) land. Such moves keep the origin fixed and lines straight, which is what "linear" means here. Combining moves corresponds to multiplying matrices, in an order that matters.

Key Terms

  • Matrix: A rectangular array of numbers arranged in rows and columns and treated as a single object.
  • Matrix–vector product: The vector you get when each row of a matrix is multiplied entry by entry with a vector and the results are added.
  • Transformation: A rule that moves every point of a plane or of space to a new position.
  • Rotation: A turn about the origin that changes neither size nor shape.
  • Shear: A move that slides each point sideways by an amount equal to its height, so squares become slanted parallelograms.
  • Linear: Describes a transformation that respects addition and scaling, so it keeps the origin fixed and never bends a straight line into a curve.

References

  • Hefferon, Jim. n.d. Linear Algebra. 4th ed. Colchester, VT: Saint Michael's College. GNU Free Documentation License or CC BY-SA 2.5.

Reading 4 min Done

No Solution, One Solution, or Infinitely Many

Introduction

Can two linear equations in two unknowns have exactly two solutions? The answer is no, and the reason holds for systems of any size. This reading explains the three possible outcomes of a system of linear equations, how elimination tells you which one you have, and why no other outcome is possible.

Two Equations as Two Lines

A linear equation in two unknowns, such as x + y = 3, describes a straight line. Every point (x, y) on the line makes the equation true. A system of two such equations asks for the points that lie on both lines at once.

Two lines in a plane can meet in only three ways. They can cross at one point. They can run parallel and never meet. Or they can be the same line, drawn twice. Each picture matches one outcome for the system.

What Elimination Reports

Elimination removes one unknown by adding or subtracting a multiple of one equation from another. Watch what it produces in each case.

Lines that cross. Take x + y = 3 and x - y = 1. Adding the equations gives 2x = 4, so x = 2, and then y = 1. The system has a unique solution: exactly one set of values for the unknowns makes every equation true.

Parallel lines. Take x + y = 3 and 2x + 2y = 11. Subtracting twice the first equation from the second gives 0 = 5. That statement is false whatever x and y are. A system is inconsistent when no values make every equation true, and elimination shows it by producing a contradiction like 0 = 5.

The same line. Take x + y = 3 and 2x + 2y = 6. Subtracting twice the first equation from the second gives 0 = 0. That is always true, so the second equation adds nothing new. Every point on the line x + y = 3 works: (0, 3), (1, 2), (2.5, 0.5), and endlessly more. The system has infinitely many solutions: an unlimited supply of value sets, all making every equation true.

A system is consistent when it has at least one solution, whether one or infinitely many (Hefferon n.d., chap. 1).

PictureWhat elimination producesOutcome
Lines cross onceA value for each unknownUnique solution (consistent)
Lines are parallelA false statement such as 0 = 5No solution (inconsistent)
Lines coincideA true but empty statement such as 0 = 0Infinitely many solutions (consistent)

The Same Three Outcomes at Any Size

With three unknowns, each equation describes a flat plane in space instead of a line. Three planes can meet at a single point, miss each other in some way, or share a whole line or plane. With more unknowns there are no pictures, but the algebra is the same. Every system of linear equations has no solution, exactly one, or infinitely many (Hefferon n.d., chap. 1).

Why can't a system have exactly two solutions? Suppose two different points both satisfy every equation. Take their average, the point halfway between them. In each equation, the left side at the average is the average of the two left sides. Both of those equal the same total, so their average does too, and the halfway point is also a solution. Repeat the argument with the new point and you get another, and another. Two solutions always bring infinitely many with them, all along the line through the first two.

Knowing Before You Solve

This result tells you what kind of answer to expect before you finish the work. If elimination ever produces a false statement like 0 = 5, stop: no answer exists. If it produces 0 = 0 and leaves fewer useful equations than unknowns, the answer is a whole family of values, not one.

That matters whenever a system models something real. A set of measurements that contradict each other gives an inconsistent system. A model with too little information gives infinitely many answers, and you need another fact to pin down one.

Conclusion

Every system of linear equations is either inconsistent, with no solution, or consistent, with exactly one solution or infinitely many. Elimination tells you which by producing a value for each unknown, a contradiction, or an equation that says nothing.

Key Terms

  • Unique solution: Exactly one set of values for the unknowns that makes every equation in a system true.
  • Inconsistent: Describes a system for which no values make every equation true.
  • Infinitely many solutions: An unlimited supply of value sets for the unknowns, all making every equation in a system true.
  • Consistent: Describes a system that has at least one solution, whether one or infinitely many.

References

  • Hefferon, Jim. n.d. Linear Algebra. 4th ed. Colchester, VT: Saint Michael's College. GNU Free Documentation License or CC BY-SA 2.5.

Guided Reading 7 min Done

Worked Example: Solving the Grain Problem by Elimination

Introduction

The first problem in the eighth chapter of the Nine Chapters on the Mathematical Art asks for the yield of three grades of grain from three mixed totals (Yuan 2012). The text is a Chinese collection of problems and methods whose date is uncertain, with estimates running from about 200 BCE to 50 CE (O'Connor and Robertson 2003). This reading solves the problem by elimination: removing one unknown at a time by multiplying an equation and subtracting another from it. It follows the procedure the text describes, then checks the answer in all three equations.

The Problem

Bundles of grain come in three grades: top, middle, and low. Their yields are measured in dou, a traditional unit of volume for grain. You know three facts:

  • Three bundles of top grade, two of middle grade, and one of low grade yield 39 dou.
  • Two bundles of top grade, three of middle grade, and one of low grade yield 34 dou.
  • One bundle of top grade, two of middle grade, and three of low grade yield 26 dou.

Let x be the yield of one bundle of top grade, y of middle grade, and z of low grade, all in dou. The facts become a system of three linear equations, meaning equations in which each unknown is only multiplied by a number and added:

\begin{aligned} 3x + 2y + z &= 39 \\ 2x + 3y + z &= 34 \\ x + 2y + 3z &= 26 \end{aligned}

You're asked to find x, y, and z. The Nine Chapters worked problems like this on a counting board, a surface on which numbers were laid out with small rods (O'Connor and Robertson 2003; Yuan 2012).

Working It Through

Step 1: Lay out the coefficients as a table

The numbers multiplying the unknowns are called coefficients. On the counting board, each fact went into its own column, with the first fact on the right and the totals along the bottom (Yuan 2012):

Left columnMiddle columnRight column
Top grade123
Middle grade232
Low grade311
Total (dou)263439

Modern textbooks turn this a quarter-turn and put each equation in a row. The result is a matrix, a rectangular array of numbers treated as one object. A vertical bar separates the totals from the coefficients:

\left(\begin{array}{ccc|c} 3 & 2 & 1 & 39 \\ 2 & 3 & 1 & 34 \\ 1 & 2 & 3 & 26 \end{array}\right)

From here on, the work changes only these numbers. The letters x, y, and z wait until the end.

Step 2: Remove the top grade from the second and third rows

Start with the second row, (2, 3, 1 \mid 34). You want its first number to become 0. The text's approach is to multiply first, then subtract (Yuan 2012). Multiply the second row by 3, the first number of the first row:

3 \times (2, 3, 1 \mid 34) = (6, 9, 3 \mid 102)

Now subtract the first row twice. Twice the first row is (6, 4, 2 \mid 78), and

(6, 9, 3 \mid 102) - (6, 4, 2 \mid 78) = (0, 5, 1 \mid 24).

The new second row says 5y + z = 24. The top grade is gone.

Do the same for the third row, (1, 2, 3 \mid 26). Multiply it by 3 to get (3, 6, 9 \mid 78), then subtract the first row once:

(3, 6, 9 \mid 78) - (3, 2, 1 \mid 39) = (0, 4, 8 \mid 39).

The new third row says 4y + 8z = 39.

Multiplying an equation by a number, or subtracting one true equation from another, never changes which values satisfy the system. So the new system has the same solution as the original.

Step 3: Remove the middle grade from the third row

The second and third rows are now (0, 5, 1 \mid 24) and (0, 4, 8 \mid 39). To clear the 4, multiply the third row by 5 and subtract 4 times the second row:

5 \times (0, 4, 8 \mid 39) - 4 \times (0, 5, 1 \mid 24) = (0, 20, 40 \mid 195) - (0, 20, 4 \mid 96) = (0, 0, 36 \mid 99).

Why 5 and 4? They are the two middle-grade numbers you want to match. Multiplying the third row by 5 and the second row by 4 makes both middle-grade entries equal to 20, so the subtraction clears them. Any pair of multipliers that makes the entries equal would work; these keep the numbers smallest.

The reduced table is triangular, with zeros below the diagonal:

\left(\begin{array}{ccc|c} 3 & 2 & 1 & 39 \\ 0 & 5 & 1 & 24 \\ 0 & 0 & 36 & 99 \end{array}\right)

Each row now has one fewer unknown than the row above it.

Step 4: Solve the last equation, then work back up

The bottom row says 36z = 99. Divide both sides by 36:

z = \frac{99}{36} = \frac{11}{4} = 2\tfrac{3}{4}.

The middle row says 5y + z = 24. Put in z = \tfrac{11}{4}:

5y = 24 - \frac{11}{4} = \frac{96}{4} - \frac{11}{4} = \frac{85}{4}, \quad\text{so}\quad y = \frac{17}{4} = 4\tfrac{1}{4}.

The top row says 3x + 2y + z = 39. Put in both values:

3x = 39 - 2 \cdot \frac{17}{4} - \frac{11}{4} = \frac{156}{4} - \frac{34}{4} - \frac{11}{4} = \frac{111}{4}, \quad\text{so}\quad x = \frac{37}{4} = 9\tfrac{1}{4}.

Working from the bottom row up like this is called back substitution.

Step 5: Check all three equations

Substitute x = \tfrac{37}{4}, y = \tfrac{17}{4}, and z = \tfrac{11}{4} into each original equation. Writing everything in quarters keeps the arithmetic short:

\begin{aligned} 3x + 2y + z &= \tfrac{111 + 34 + 11}{4} = \tfrac{156}{4} = 39 \\ 2x + 3y + z &= \tfrac{74 + 51 + 11}{4} = \tfrac{136}{4} = 34 \\ x + 2y + 3z &= \tfrac{37 + 34 + 33}{4} = \tfrac{104}{4} = 26 \end{aligned}

All three totals match. These values also agree with the answer recorded in the text: 9\tfrac{1}{4}, 4\tfrac{1}{4}, and 2\tfrac{3}{4} dou (Yuan 2012).

Key Considerations

Fractions are part of the method. The answer isn't a whole number, and the text gives it in mixed numbers (Yuan 2012). Multiplying before subtracting keeps whole numbers through the elimination itself, so fractions appear only in the last divisions.

Columns or rows. The Nine Chapters arranges equations in columns and works on columns, where modern books use rows. The operations are the same; only the layout is turned (O'Connor and Robertson 2003). The result also depends on nothing special about grain. Any system of this shape gives way to the same steps, and the same steps scale up to more unknowns: clear the first unknown from every row below the first, then the second from every row below the second, and so on (Hefferon n.d., chap. 1).

Negative numbers. No negative numbers appeared in this problem, but they often do. Subtracting a larger amount from a smaller one leaves a negative entry on the board, and the eighth chapter gives rules for computing with such numbers (O'Connor and Robertson 2003). The modern method handles them the same way.

When the steps fail. Here every step produced a usable row. In some systems, elimination produces a row of zeros with a nonzero total, such as 0 = 5, which means the system has no solution. In others, it produces a row that is all zeros; if no row says something false, that means there are infinitely many solutions. This system had exactly one, because the last row kept a nonzero number, 36, in front of z.

The common mistake: subtracting without multiplying first. It's tempting to subtract the first row straight from the second:

(2, 3, 1 \mid 34) - (3, 2, 1 \mid 39) = (-1, 1, 0 \mid -5).

The first number is now -1, not 0, so the top grade is still in the equation. Nothing was eliminated. Subtraction clears an unknown only when its coefficients match, which is why you multiply the rows first to make them match.

Summary

Elimination turned three tangled equations into a triangular table, and back substitution read off the answers one at a time. Here is the reduced table and the checked solution:

RowTop gradeMiddle gradeLow gradeTotal (dou)
First32139
Second05124
Third003699

One bundle of top grade yields x = \tfrac{37}{4} = 9\tfrac{1}{4} dou, middle grade y = \tfrac{17}{4} = 4\tfrac{1}{4} dou, and low grade z = \tfrac{11}{4} = 2\tfrac{3}{4} dou. These values give 39, 34, and 26 in the three original equations.

  1. The second row came from 3 times the original second row minus twice the first row.
  2. The third row came from 3 times the original third row minus the first row, then 5 times that minus 4 times the new second row.
  3. The check uses the original equations, not the reduced ones, so it would catch an arithmetic slip anywhere in the work.

References

  • Hefferon, Jim. n.d. Linear Algebra. 4th ed. Colchester, VT: Saint Michael's College. GNU Free Documentation License or CC BY-SA 2.5.
  • O'Connor, J. J., and E. F. Robertson. 2003. "Nine Chapters on the Mathematical Art." MacTutor History of Mathematics Archive, University of St Andrews. Last updated December 2003.
  • Yuan, Ya-xiang. 2012. "Jiu Zhang Suan Shu and the Gauss Algorithm for Linear Equations." Documenta Mathematica, Extra Volume: Optimization Stories, 9–14.

Guided Conversation 12 min Done

Turn a Two-Unknown Problem into a Matrix

In this conversation you'll make up an everyday problem with two unknowns, write it as a small table of numbers, and solve it yourself with coaching. You'll also see what happens when a system has no answer or too many, and you'll leave able to say in words what one matrix does to the plane.

You'll have this conversation with an AI assistant, using your own account. Choose a button to open a new chat with the prompt already filled in, then press send to start. If the chat opens empty, copy the prompt and paste it in.

Run this conversation in whichever assistant you already use:

Claude desktop app

To use another LLM, simply copy and paste the prompt into its chat window.

Show the full prompt (it lists misreadings to watch for, so skip it if you would rather come to the conversation fresh)
Guided Conversation: Turn a Two-Unknown Problem into a Matrix (about 12 minutes)

Note to the learner: press send to start. Everything below is facilitator guidance for the AI. It lists misconceptions to watch for, so skip it if you'd rather come to the conversation fresh.

Please facilitate a coached problem session with me. I'm an adult who is comfortable with basic high-school algebra but may be rusty or uneasy with math, exploring what linear algebra is and whether to study it further. I'm studying systems of equations, vectors, and matrices. Follow this guidance for the whole conversation.

GOAL
Help me represent a system of linear equations with vectors and matrices and describe what a matrix does to space, starting from a problem I write myself.

HOW TO RUN THE CONVERSATION
- Ask one question at a time, then wait for my reply. Keep each of your turns under about 120 words.
- Don't lecture. Explain a point only when I need it to continue, then return to my problem.
- Be curious, collegial, and patient. Ask how I'd approach each step before any hint, give one hint at a time, and never state an answer before I've tried. Define terms briefly on first use (coefficient, vector, matrix, elimination). Welcome disagreement when I give a reason.
- Write math in plain text, such as 2x + 3y = 12 or 1/2. Write a matrix by its rows, such as "the matrix with rows (2, 0) and (0, 2)".
- Plain conversation only: don't search the web or create files or documents.
- Aim for about 12 minutes, mostly on topics 1 and 2. If my replies are brief, offer one concrete prompt, such as "A play sold 50 tickets for 520 dollars; adult tickets cost 12 dollars and child tickets 8 dollars. How many of each?", and move on. If I seem uncertain, shorten the conversation to 5-7 minutes. Always reach the final topic.
- Start now. Open with one or two warm sentences: this is a conversation, not a quiz; trying a step matters more than getting it right first time; I can ask you to clarify anything. Then ask me to describe an everyday situation with two unknown amounts, such as tickets at two prices or a mix of two ingredients.

TOPICS, IN ORDER
1. My problem. Help me name the two unknowns with letters and write two equations. Ask what each number means. Follow-up: must both equations hold at the same time?
2. Table, vector, and elimination. Ask me to write the four coefficients as a 2 by 2 table (a matrix) and the two totals as a list (a vector). Ask how I could remove one unknown, coach me through elimination, and have me check my answer in both equations.
3. When it goes wrong. Ask what happens if my second equation is exactly twice my first, or has the same left side with a different total. Let me try elimination on each, and draw out what 0 = 0 and a false statement like 0 = 5 each mean.
4. Closing. After I try it on one or two points, ask me to describe in words what the matrix with rows (2, 0) and (0, 2) does to every point of the plane. Help me phrase one sentence I can take into practice problems.

CORRECT METHOD AND ANSWER
- My own problem: multiply one equation by a number and add it to or subtract it from the other so one unknown disappears; solve for the other unknown and substitute back. A correct answer makes both original equations true.
- Ticket fallback: a + c = 50 and 12a + 8c = 520. Subtract 8 times the first from the second: 4a = 120, so a = 30 adult and c = 20 child tickets. Check: 30 + 20 = 50 and 360 + 160 = 520.
- If the second equation is twice the first, elimination gives 0 = 0: the same line, infinitely many solutions.
- If the left sides match after multiplying but the totals don't, elimination gives a false statement such as 0 = 5: parallel lines, no solution.
- Every system of linear equations has no solution, exactly one, or infinitely many.
- The matrix with rows (2, 0) and (0, 2) sends (x, y) to (2x, 2y): every point moves to twice its distance from the origin in the same direction, the origin stays put, and a shape doubles in width and height.
- A 2 by 2 matrix moves every point of the plane by one linear rule: it keeps the origin fixed and never bends a straight line into a curve.

MISCONCEPTIONS TO CORRECT GENTLY
When one appears, name the accurate version briefly, then return to my problem.
- "A matrix is just a table": it also acts as a transformation that moves every point by one rule.
- "If I can't find a solution, I made an error": the system may have none; a false statement like 0 = 5 is a correct result.
- "Subtracting the equations always removes an unknown": it removes one only when that unknown's coefficients match, so multiply first.
- "Linear means the graph is a line through any point": here a linear transformation must also keep the origin fixed, so sliding the plane sideways isn't linear.

LIMITS
- Don't solve my system for me or give the next step before I try it.
- Don't introduce determinants beyond naming them if I ask. Don't introduce eigenvectors.
- Keep to 2 by 2 systems unless I ask for more.

TO FINISH
After my closing sentence, close in one short turn:
- Affirm one specific thing I worked out, in my own words where possible.
- Suggest one or two next steps that fit how the conversation went. Possible steps: try three equations in three unknowns; apply a rotating or shearing matrix to the corners of a square; solve a new two-unknown problem alone; review why multiplying before subtracting matters.
- Restate my sentence about the matrix on its own line, labeled "My result", so I can copy it.

Problem Set 15 minOptional Done

Systems, Vectors, and Transformations

Overview

This optional problem set gives you practice with two moves at the heart of linear algebra: solving a system of equations by elimination, and applying a matrix to points in the plane. The first problem is a warm-up. Work on paper, and keep graph paper or a sketch handy for the last three problems.

A few reminders. Elimination means removing one unknown by adding or subtracting a multiple of one equation from another. To apply a 2 \times 2 matrix to a point (x, y), multiply each row of the matrix entry by entry with the point and add: the first row gives the new first coordinate, and the second row gives the new second coordinate.

Problems

Problem 1

Solve the system x + y = 10 and x - y = 4 by elimination. Check your answer in both equations.

Once you've tried the problem, check your work against the solution.Show the solution to Problem 1Hide the solution

Answer: x = 7, y = 3.

Method:

  1. Add the two equations. The y terms cancel: (x + y) + (x - y) = 10 + 4, so 2x = 14.
  2. Divide by 2: x = 7.
  3. Put x = 7 into the first equation: 7 + y = 10, so y = 3.
  4. Check: 7 + 3 = 10 and 7 - 3 = 4. Both equations hold.

Most common error: stopping once you have x = 7. A solution needs a value for every unknown, and the check in both equations is what confirms it.

Problem 2

Solve the system x + 2y = 4 and 2x + 4y = 9 by elimination. State whether the system has no solution, exactly one, or infinitely many.

Once you've tried the problem, check your work against the solution.Show the solution to Problem 2Hide the solution

Answer: no solution. The system is inconsistent.

Method:

  1. To remove x, multiply the first equation by 2: 2x + 4y = 8.
  2. Subtract this from the second equation: (2x + 4y) - (2x + 4y) = 9 - 8, which gives 0 = 1.
  3. That statement is false for every x and y, so no values satisfy both equations.
  4. In pictures, the two equations describe parallel lines. The left sides match after doubling, but the totals 8 and 9 don't.

Most common error: deciding you made an arithmetic mistake and starting over. A false statement like 0 = 1 is the correct result of elimination here. It tells you the system has no solution.

Problem 3

Apply the matrix

\begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}

to the point (1, 1). Where does the point land?

Once you've tried the problem, check your work against the solution.Show the solution to Problem 3Hide the solution

Answer: (2, 3).

Method:

  1. First row (2, 0) times the point (1, 1): 2 \times 1 + 0 \times 1 = 2.
  2. Second row (0, 3) times the point (1, 1): 0 \times 1 + 3 \times 1 = 3.
  3. The point lands at (2, 3). This matrix stretches across by 2 and up by 3.

Most common error: multiplying down the columns instead of across the rows. For this matrix the answer happens to come out the same, so check your habit on the next two problems, where it doesn't.

Problem 4

The matrix

\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}

turns the plane a quarter-turn. Apply it to the point (1, 0) and to the point (0, 1).

Once you've tried the problem, check your work against the solution.Show the solution to Problem 4Hide the solution

Answer: (1, 0) goes to (0, 1), and (0, 1) goes to (-1, 0).

Method:

  1. For (1, 0): first row (0, -1) gives 0 \times 1 + (-1) \times 0 = 0. Second row (1, 0) gives 1 \times 1 + 0 \times 0 = 1. The point lands at (0, 1).
  2. For (0, 1): first row gives 0 \times 0 + (-1) \times 1 = -1. Second row gives 1 \times 0 + 0 \times 1 = 0. The point lands at (-1, 0).
  3. On graph paper, each point has turned 90 degrees counterclockwise around the origin, and each is still one unit from the origin.

Most common error: dropping the minus sign and getting (1, 0) for the second point. That would be a flip, not a turn. Notice that each answer is one column of the matrix.

Problem 5

The matrix

\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}

is a shear. Apply it to the point (0, 1) and to the point (1, 1).

Once you've tried the problem, check your work against the solution.Show the solution to Problem 5Hide the solution

Answer: (0, 1) goes to (1, 1), and (1, 1) goes to (2, 1).

Method:

  1. For (0, 1): first row (1, 1) gives 1 \times 0 + 1 \times 1 = 1. Second row (0, 1) gives 0 \times 0 + 1 \times 1 = 1. The point lands at (1, 1).
  2. For (1, 1): first row gives 1 \times 1 + 1 \times 1 = 2. Second row gives 0 \times 1 + 1 \times 1 = 1. The point lands at (2, 1).
  3. In words, the first coordinate gains the second coordinate, and the second coordinate is unchanged. Points slide sideways by an amount equal to their height.

Most common error: changing the height as well. In a shear, every point stays at the same height; only its first coordinate changes.

Self-Check

When you're done, check that:

  • Each solution to Problem 1 satisfies both equations when you substitute it back in.
  • You stated the outcome type for Problem 2 (no solution) and can say why.
  • Your transformed points for Problems 3 to 5 match a sketch on graph paper: a stretch, a quarter-turn, and a sideways slide.

Knowledge Check 10 min Done

Systems of equations, vectors, and matrices from the Nine Chapters to Gauss

This ungraded knowledge check assesses your understanding of how systems of equations are represented and solved with vectors and matrices. You'll be asked about the history of elimination from the Nine Chapters to Gauss, vectors and linear combinations, matrices as transformations, and the three possible outcomes of a linear system.

Note: Use this to test yourself, review the feedback on any questions you miss, and retry until you feel confident before moving forward.

5 questions · ungraded · retry as often as you like