Scientia sine finibus

Linear Algebra / Unit 2, Systems of Linear Equations / Topic 2.3

Units and Topics

Unit 2. Systems of Linear Equations

2.3 The Solutions of a System

This topic shows how to read the number of solutions of a system from its row echelon form, and how to write all of the solutions when there are infinitely many.

You need Topics 1.3, 2.1, and 2.2 for this topic.

1. The Three Outcomes

In Topic 2.1, a system of two equations in two unknowns had exactly one solution, no solution, or infinitely many solutions. The same three outcomes are the only ones for any linear system, with any number of equations and unknowns. A linear system never has exactly two solutions, or exactly five.

The reason comes from Topic 1.3. Each linear equation can be written as n · r = c, where n holds the coefficients and r holds the unknowns. Suppose that p and q are two different solutions, so that n · p = c and n · q = c. Take any point on the line through them, r = p + t(q − p). Then

n · r = n · p + t(n · q − n · p)the dot product, term by termn · r = c + t(c − c)both p and q are solutionsn · r = cthe point r is also a solution

The point r satisfies the equation for each value of t. This is true for each equation of the system. So if a system has two solutions, all of the points on the line through them are solutions as well, and the system has infinitely many solutions.

2. A System with No Solution

Row reduction shows which outcome a system has. Consider this system and its augmented matrix.

x + 2y + z = 4 2x + 4y + 3z = 9 3x + 6y + 4z = 14 1214243936414

The operations R₂ → R₂ − 2R₁ and R₃ → R₃ − 3R₁ make zeros in column 1. Then R₃ → R₃ − R₂ gives the row echelon form.

121400110012 then 121400110001

The last row states 0x + 0y + 0z = 1, which is 0 = 1. No values of x, y, and z make this true, so the system has no solution. A system with no solution is called inconsistent.

A system has no solution exactly when its row echelon form has a row with zeros on the left of the line and a number that is not 0 on the right of the line.

3. A System with Infinitely Many Solutions

Change the last right side of the system from 14 to 13. The same three operations now give

1214243936413 then 121400110000

The last row states 0 = 0, which is true and gives no information. Two equations remain for three unknowns.

The pivots are in column 1 and column 3. Column 2 has no pivot. An unknown whose column has a pivot is called a pivot variable, and an unknown whose column has no pivot is called a free variable. Here x and z are pivot variables, and y is a free variable.

A free variable can take any value. Call that value t. The pivot variables are then found by back substitution.

  • Row 2 gives z = 1.
  • Row 1 gives x = 4 − 2y − z = 3 − 2t.

All of the solutions can be written in one expression, called the general solution.

xyz = 3 − 2tt1the three unknowns in terms of txyz = 301 + t −210separate the part without t from the part with t

This is the parametric form of a line from Topic 1.3, with the point (3, 0, 1) and the direction (−2, 1, 0). Each value of t gives one solution. For example, t = 1 gives (1, 1, 1). Check:

1 + 2 + 1 = 4the first equation2 + 4 + 3 = 9the second equation3 + 6 + 4 = 13the third equation

4. Reading the Row Echelon Form

The two examples lead to a rule for any system. Reduce the augmented matrix to row echelon form, and then read it.

Row echelon formSolutions
Has a row that states 0 = c, with c not 0None
Has no such row, and each column of unknowns has a pivotExactly one
Has no such row, and at least one column of unknowns has no pivotInfinitely many

The number of free variables is the number of unknowns minus the number of pivots. With one free variable, the solutions form a line. With two free variables, they form a plane.

The number of pivots of a matrix is called its rank. The matrix of coefficients in the examples above has the rank 2. Topic 4.4 studies the rank in detail.

Try it: three equations in two unknowns

Each equation is a line. Lines 1 and 2 do not change. Move the slider to change the right side c of the third equation. The system has a solution only when all three lines pass through one point.

The drawing shows why a system with more equations than unknowns usually has no solution. Two lines fix a point, and a third line passes through that point only for one value of c. Row reduction finds that value: the last row of the row echelon form states 0 = c − 4.

5. Homogeneous Systems

A system is called homogeneous when all of its right sides are 0.

x + 2y + z = 0 2x + 4y + 3z = 0 3x + 6y + 4z = 0

A homogeneous system always has at least one solution, because setting each unknown to 0 makes each equation true. This solution is called the zero solution, or the trivial solution. The question for a homogeneous system is whether it has other solutions.

The right sides stay 0 during row reduction, so the row echelon form has the same left side as in Part 3. Again y is free, and back substitution gives z = 0 and x = −2t.

xyz = t −210

A homogeneous system has solutions other than the zero solution exactly when it has a free variable.

Compare this with the general solution in Part 3, which was (3, 0, 1) + t(−2, 1, 0). The general solution of a system is one particular solution plus all of the solutions of the homogeneous system with the same coefficients. This structure appears again in differential equations and in quantum mechanics.

6. Counting Equations and Unknowns

Each row has at most one pivot, and each column has at most one pivot. So the number of pivots cannot be larger than the number of equations, and it cannot be larger than the number of unknowns. Two useful facts follow.

  • A system with more unknowns than equations has at least one free variable. It cannot have exactly one solution. If it is homogeneous, it has solutions other than the zero solution.
  • A system with n equations and n unknowns has exactly one solution when its matrix of coefficients has n pivots. This is true for any right sides.

When the matrix of coefficients of a system with n equations and n unknowns has fewer than n pivots, the matrix is called singular. Such a system has no solution or infinitely many solutions, depending on the right sides. This is the meaning of the error Singular matrix in the Python practice of Topic 2.1.

7. The Picture in Three Dimensions

Each equation in x, y, and z is a plane. Three planes can meet in several ways.

The three planesSolutions
Meet at one pointExactly one
Meet along one line, like three pages of an open bookInfinitely many, with one free variable
Are the same planeInfinitely many, with two free variables
Have no common point, because two of them are parallelNone
Have no common point, although each pair meets along a lineNone

In the last case the three lines where the pairs meet are parallel, and the planes form a shape like the three sides of a tent with no ends. The system in Part 2 is of this kind.

Common Mistakes

  • Reading the row 0 = 0 as “no solution”. The row 0 = 0 gives no information. A row such as 0 = 1 means no solution.
  • Concluding that 0 = 0 always means infinitely many solutions. The system has infinitely many solutions only if a column of unknowns has no pivot.
  • Giving a free variable one value. A free variable can take any value, and the general solution must show that with a parameter.
  • Choosing a pivot variable as the parameter. The parameters are the free variables.
  • Assuming that a system with the same number of equations and unknowns has exactly one solution. That is true only when each column has a pivot.
  • Forgetting the zero solution of a homogeneous system, or counting it as a solution other than zero.

Summary

TermMeaning
Inconsistent systemA system with no solution
Pivot variableAn unknown whose column has a pivot
Free variableAn unknown whose column has no pivot
General solutionOne expression, with parameters, that gives all of the solutions
Homogeneous systemA system in which all of the right sides are 0
RankThe number of pivots
Singular matrixA square matrix of coefficients with fewer pivots than columns

Practice

Work each problem on paper first. Then open the answer to check your work.

1. A system has the row echelon form 12−1301420005. How many solutions does it have?

None. The last row states 0 = 5, which is false.

2. A system has the reduced row echelon form 102101−140000. Write the general solution.

Column 3 has no pivot, so z is free. Let z = t.

x = 1 − 2trow 1y = 4 + trow 2(x, y, z) = (1, 4, 0) + t(−2, 1, 1)the general solution

3. Solve x + y + z = 3, 2x + 2y + 2z = 6, and x + y − z = 1.

R₂ → R₂ − 2R₁gives a row of zerosR₃ → R₃ − R₁gives the row (0, 0, −2, −2)z = 1the row states −2z = −2y = tcolumn 2 has no pivot, so y is freex = 3 − t − 1 = 2 − trow 1, with y = t and z = 1(x, y, z) = (2, 0, 1) + t(−1, 1, 0)the general solution

4. For which values of k does the system x + 2y = 3 and 2x + 4y = k have solutions?

R₂ → R₂ − 2R₁ gives the row (0, 0, k − 6).

If k = 6, the row states 0 = 0, and the system has infinitely many solutions. For any other value of k, the system has no solution.

5. Find all of the solutions of the homogeneous system x + y − z = 0 and 2x + y + z = 0.

R₂ → R₂ − 2R₁gives the row (0, −1, 3, 0)y = 3zthe second rowz = tz is freey = 3tsubstitute z = tx = z − y = −2tthe first row(x, y, z) = t(−2, 3, 1)the solutions−2 + 3 − 1 = 0the check in the first equation, with t = 1−4 + 3 + 1 = 0the check in the second equation, with t = 1

6. A system has 3 equations and 5 unknowns. Its row echelon form has 3 pivots. How many free variables does it have, and how many solutions?

The number of free variables is 5 − 3 = 2.

Each row has a pivot on the left of the line, so no row states 0 = c. The system has infinitely many solutions.

Python Practice

Step 1. Count the pivots of a matrix

Python reads the code one line at a time, from the top to the bottom. The equals sign stores the value on its right under the name on its left, and print shows a result. The name np stands for NumPy, the part of Python that works with vectors and matrices. A matrix is typed one row at a time, with each row inside its own square brackets.

The instruction np.linalg.matrix_rank gives the rank of a matrix, which is the number of pivots in its row echelon form. The code below finds the rank of the matrix of coefficients from Parts 2 and 3 of this topic.

Python

The result is 2. The system has 3 unknowns and 2 pivots, so one column has no pivot.

Step 2. Test whether a system has a solution

A system has no solution when its row echelon form has a pivot in the last column of the augmented matrix, on the right of the line. In that case the augmented matrix has one more pivot than the matrix of coefficients. So the test is to compare the two ranks.

The code below stores the augmented matrix from Part 3, with the right sides 4, 9, and 13 as a fourth column.

Python

Both ranks are 2, so the system has a solution. The rank is smaller than the number of unknowns, so the system has infinitely many solutions.

In the next box, change the augmented matrix to the one from Part 2, where the last right side is 14.

Python

The ranks are now 2 and 3. The augmented matrix has a pivot on the right of the line, so the system has no solution.

Step 3. Check a general solution

The general solution in Part 3 is (3, 0, 1) + t(−2, 1, 0). The code below builds the solution for one value of t. The last line uses the @ sign, which multiplies a matrix by a vector. The result holds the left side of each equation for the values in x. Topic 3.1 explains this product.

Python

The first result is the solution (1, 1, 1). The second result is [4 9 13], which are the right sides of the three equations. So (1, 1, 1) is a solution.

In the next box, change t to any other number and press Run. The second result should not change.

Python

Step 4. Check the solutions of a homogeneous system

From Part 5, the multiples of (−2, 1, 0) are solutions of the homogeneous system with the same coefficients. The code below tests one multiple.

Python

The result is [0 0 0], so 5 times (−2, 1, 0) makes each left side equal to 0.

In the next box, replace the zeros so that d is a solution of the homogeneous system in Practice Problem 5, other than the zero solution. The matrix has two rows, because that system has two equations.

Python

Quiz

This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.

Choose how your answers are checked

1. The row echelon form of an augmented matrix has the last row 0 0 0 | 4. How many solutions does the system have?

2. A system with three unknowns has at least one solution, and its row echelon form has two pivots. How many solutions does the system have?

3. A system has 6 unknowns, and its row echelon form has 4 pivots. How many free variables does the system have?

4. The reduced row echelon form of a system in x, y, and z is 103201−15. The free variable is z. Find x and y when z = 1.

5. For which value of k does the system x + 3y = 2, 2x + 6y = k have at least one solution?

Next: Topic 3.1, Matrices as Maps