Linear Algebra › Section A · Linear equations in linear algebra › Topic A.1
Systems of linear equations
Engineers, economists and data scientists constantly face many unknowns tied together by many conditions at once. Linear algebra starts here, with systems of linear equations and a reliable way to solve them.
What makes an equation linear
A linear equation in the variables \(x_1, x_2, \dots, x_n\) can be written as
where the coefficients \(a_1, \dots, a_n\) and the constant \(b\) are numbers. Each variable appears only to the first power, multiplied by a constant, and no two variables are multiplied together. So \(4x_1 - x_2 + 7x_3 = 2\) is linear, and so is \(x_2 = 3x_1 - 5\) once it is rearranged. Equations such as \(x_1x_2 = 6\), \(x_1^2 + x_2 = 1\) or \(\sqrt{x_1} = x_2\) are not linear. A system of linear equations, or linear system, is a finite collection of linear equations in the same variables.
Solutions and solution sets
A solution of a system is a list of numbers \((s_1, \dots, s_n)\) that makes every equation true when substituted for \(x_1, \dots, x_n\). The set of all solutions is the solution set. Two systems are equivalent when they have exactly the same solution set. For the pair \(x + y = 4\) and \(x - y = 2\), adding the equations gives \(2x = 6\), so \(x = 3\) and \(y = 1\). The solution set is the single pair \((3, 1)\). Geometrically, each equation is a line in the plane, and \((3, 1)\) is the point where the two lines cross.
None, one or infinitely many
Two lines in the plane can cross at one point, be parallel and never meet, or be the same line. The same three outcomes hold for every linear system, whatever its size: it has exactly one solution, infinitely many solutions, or no solution at all. It can never have exactly two, because if two different solutions exist, every point on the line through them is also a solution. A system with at least one solution is called consistent; a system with no solution is inconsistent. With three variables each equation describes a plane in space, and the planes may meet in a point, along a line, in a whole plane, or not at all.
Matrix notation
A matrix is a rectangular array of numbers. Its size is written \(m \times n\): \(m\) rows by \(n\) columns, always rows first. Writing a system as a matrix keeps the numbers and drops the variable names. The coefficient matrix holds only the coefficients, one row per equation and one column per variable. The augmented matrix adds a final column holding the constants on the right-hand sides. A system of 3 equations in 3 unknowns has a \(3 \times 3\) coefficient matrix and a \(3 \times 4\) augmented matrix. A missing variable is recorded as a 0, so the columns always line up variable by variable.
Elementary row operations
Three operations simplify a system without changing its solutions. Replacement adds a multiple of one row to another row. Interchange swaps two rows. Scaling multiplies every entry of a row by a non-zero constant. Each operation can be undone by another of the same kind: subtract the multiple back, swap again, or scale by the reciprocal. That is why no solution is ever gained or lost. Two matrices are row equivalent when a sequence of these operations turns one into the other, and the linear systems behind row equivalent augmented matrices have the same solution set. Scaling by 0 is not allowed, because it wipes out an equation and cannot be reversed.
Worked example: a system with one solution
Solve \(x + 2y - z = 3\), \(2x + 5y + z = 10\), \(-x + y + 4z = 3\). The augmented matrix is
1. Replace row 2 by row 2 minus 2 times row 1: \(y + 3z = 4\). 2. Replace row 3 by row 3 plus row 1: \(3y + 3z = 6\). 3. Replace row 3 by row 3 minus 3 times the new row 2: \(-6z = -6\), so \(z = 1\). 4. Back in row 2, \(y = 4 - 3 = 1\). 5. In row 1, \(x = 3 - 2(1) + 1 = 2\). 6. Check in the third original equation: \(-2 + 1 + 4 = 3\). The unique solution is \((2, 1, 1)\).
Worked example: a system with no solution
Solve \(x - 2y + z = 1\), \(2x - 3y + 4z = 5\), \(3x - 5y + 5z = 4\). 1. Row 2 minus 2 times row 1 gives \(y + 2z = 3\). 2. Row 3 minus 3 times row 1 gives \(y + 2z = 1\). 3. Subtracting the new row 2 from the new row 3 leaves \(0x + 0y + 0z = -2\), the row \((0, 0, 0, -2)\) in the augmented matrix. 4. That equation says \(0 = -2\), which no choice of \(x\), \(y\) and \(z\) can satisfy. The system is inconsistent. Geometrically, no point lies on all three planes at once, even though each pair of planes meets along a line.
The two fundamental questions
Every linear system raises two questions. Existence: is the system consistent, so that at least one solution exists? Uniqueness: if a solution exists, is it the only one? Row operations answer both. Once the matrix has a staircase shape with zeros below the leading entries, a row reading 0 = c with c non-zero settles existence (no solution), and back substitution shows whether the solution is unique. The next topic, Row reduction and echelon forms, turns this into a precise algorithm and a rule for reading the answers off directly.
An ancient method
Elimination is far older than its usual name suggests. The Chinese text known as the Nine Chapters on the Mathematical Art, compiled about 2,000 years ago, solves systems by arranging the coefficients in a table on a counting board and combining columns, which is essentially the same procedure. Carl Friedrich Gauss used elimination systematically in astronomical calculations in the early 1800s, and the method now carries his name. Today computers apply it to systems with millions of unknowns in weather forecasting, structural design and machine learning.
Common mistakes to avoid
First, calling an equation linear when two variables are multiplied, as in \(3xy = 2\). Second, scaling a row by 0, which destroys an equation. Third, applying an operation to only part of a row: every entry, including the constant in the last column, must change. Fourth, misreading a zero row: a row of all zeros, ending in 0, says \(0 = 0\) and is harmless, while a row of zero coefficients ending in a non-zero number means no solution. Fifth, writing the size of a matrix as columns by rows; it is always rows first.
Key takeaways
A linear equation has each variable to the first power with constant coefficients. A linear system has no solution, exactly one, or infinitely many; consistent systems have at least one. The augmented matrix records coefficients and constants; size is rows by columns. Replacement, interchange and scaling by a non-zero constant are reversible, so row equivalent augmented matrices give the same solution set. A row reading 0 = c with c non-zero signals an inconsistent system. Elimination appears in the Nine Chapters, about 2,000 years old.
Flashcards
Flashcard
a₁x₁ + a₂x₂ + … + aₙxₙ = b with constant coefficients
Test your understanding
Question 1 of 5
Which of these equations is linear in x₁, x₂ and x₃?
Question 2 of 5
Row operations on an augmented matrix produce the row (0, 0, 0, −3). What does this tell you?
Question 3 of 5
Which of these is NOT an elementary row operation?
Question 4 of 5
A linear system has 4 equations in 3 unknowns. What is the size of its augmented matrix?
Question 5 of 5
After elimination a system reads x + y − z = 2, y + 2z = 7, z = 3. What is x?
