Unit 2, lesson 6

Linear Systems as Equations and Geometry

What a linear system and its solutions are, how to write a system in matrix form or as an augmented matrix, and how the row and column pictures show whether it is consistent or inconsistent.

  • Video 6
  • Linear Systems and Elimination

Two unknown numbers add to 33, and the first exceeds the second by 11. Each condition alone allows infinitely many pairs, but together they allow only one. Replace the second condition by a different one and there may be no pair at all, or a whole line of them. This lesson sets up the language for such questions, reads every system in two ways, as crossing lines or planes and as a combination of matrix columns, and explains why a linear system always has no solution, exactly one, or infinitely many.

Key terms

Linear system

Definition A linear equation in the unknowns x1,…,xnx_1, \dots, x_n is an equation that can be written as

a1x1+a2x2+⋯+anxn=b,a_1 x_1 + a_2 x_2 + \cdots + a_n x_n = b,

where the coefficients a1,…,ana_1, \dots, a_n and the constant bb are fixed real numbers. A linear system is a finite collection of mm linear equations in the same unknowns x1,…,xnx_1, \dots, x_n. A solution of the system is a list of real numbers (s1,…,sn)(s_1, \dots, s_n) that makes every one of the mm equations true when each sjs_j is substituted for xjx_j. The set of all solutions is the solution set. On this page an inline tuple such as (s1,…,sn)(s_1, \dots, s_n) also stands for the column vector with the same entries.

In plain words Each equation is one requirement, and in it every unknown is only multiplied by a fixed number and added. A solution has to meet all of the requirements at the same time. Meeting some of them is not enough.

Example Consider the system

x+y=3x−y=1.\begin{aligned} x + y &= 3 \\ x - y &= 1. \end{aligned}

The pair (2,1)(2, 1) is a solution, because 2+1=32 + 1 = 3 and 2−1=12 - 1 = 1. The pair (1,2)(1, 2) is not, even though 1+2=31 + 2 = 3, since 1−2=−11 - 2 = -1 rather than 11. An equation such as xy=2xy = 2 or x2+y=1x^2 + y = 1 is not linear, because it multiplies an unknown by an unknown, xx by yy in the first and xx by itself in the second.

Matrix form of a system

Definition The system of mm linear equations in nn unknowns

a11x1+⋯+a1nxn=b1   ⋮am1x1+⋯+amnxn=bm\begin{aligned} a_{11} x_1 + \cdots + a_{1n} x_n &= b_1 \\ &\;\,\vdots \\ a_{m1} x_1 + \cdots + a_{mn} x_n &= b_m \end{aligned}

is the single matrix equation Ax=bA\mathbf{x} = \mathbf{b}. Here A=[aij]A = [a_{ij}] is the m×nm \times n coefficient matrix, x=(x1,…,xn)\mathbf{x} = (x_1, \dots, x_n) is the column of unknowns in Rn\mathbb{R}^n, and b=(b1,…,bm)\mathbf{b} = (b_1, \dots, b_m) is the right-hand side in Rm\mathbb{R}^m. Entry ii of AxA\mathbf{x} is the left side of equation ii, so a vector x\mathbf{x} solves the system exactly when Ax=bA\mathbf{x} = \mathbf{b}. The matrix AA is a map from Rn\mathbb{R}^n to Rm\mathbb{R}^m, and solving the system means finding every input that this map sends to b\mathbf{b}.

In plain words Collect the numbers that multiply the unknowns into one matrix, the unknowns into one column and the constants into another column. One matrix equation then carries all mm equations at once.

Example The system x+y=3x + y = 3, x−y=1x - y = 1 becomes

[111−1][xy]=[31].\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 3 \\ 1 \end{bmatrix}.

Multiplying out the left side gives the column with entries x+yx + y and x−yx - y, which recovers the two equations. The coefficient matrix is 2×22 \times 2 because there are two equations and two unknowns.

Augmented matrix

Definition The augmented matrix of the system Ax=bA\mathbf{x} = \mathbf{b} is the m×(n+1)m \times (n + 1) matrix [ A∣b ][\,A \mid \mathbf{b}\,] obtained by placing b\mathbf{b} after the last column of AA. Row ii lists the coefficients of equation ii in the fixed order x1,…,xnx_1, \dots, x_n, followed by its constant bib_i. An unknown that is missing from an equation gets the coefficient 00. The vertical bar only separates the coefficients from the constants, so the last column is not the column of any unknown.

In plain words The augmented matrix is the system with the variable names, plus signs and equal signs erased. Nothing is lost, as long as everyone agrees on the order of the unknowns.

Example The system x+y=3x + y = 3, x−y=1x - y = 1 has augmented matrix

[1131−11].\left[\begin{array}{cc|c} 1 & 1 & 3 \\ 1 & -1 & 1 \end{array}\right].

The system x+2z=5x + 2z = 5, 3y−z=23y - z = 2 in the unknowns x,y,zx, y, z has augmented matrix

[102503−12],\left[\begin{array}{ccc|c} 1 & 0 & 2 & 5 \\ 0 & 3 & -1 & 2 \end{array}\right],

with a zero wherever an unknown is missing. Reading the rows back gives 1x+0y+2z=51x + 0y + 2z = 5 and 0x+3y−1z=20x + 3y - 1z = 2, and the triple (3,1,1)(3, 1, 1) satisfies both.

Row picture

Definition In the row picture each of the mm equations is read as a set in Rn\mathbb{R}^n, the space of the unknowns, namely the set of all points that satisfy that one equation. If the coefficients of the equation are not all zero, this set is a line when n=2n = 2, a plane when n=3n = 3 and a hyperplane in general. The solution set of the system is the intersection of these mm sets. An equation whose coefficients are all zero reads 0=bi0 = b_i, which every point satisfies when bi=0b_i = 0 and no point satisfies when bi≠0b_i \ne 0.

In plain words Draw each requirement as the set of points that meet it. The solutions are the points that lie on every one of these sets.

Example For x+y=3x + y = 3 and x−y=1x - y = 1, the first line passes through (0,3)(0, 3) and (3,0)(3, 0), and the second passes through (1,0)(1, 0) and (0,−1)(0, -1). The lines cross at (2,1)(2, 1). A drawing suggests the point, and algebra confirms it. The second equation gives x=y+1x = y + 1, so the first becomes 2y+1=32y + 1 = 3. Then y=1y = 1 and x=2x = 2, and no other point is possible. With three unknowns the equation x+y+z=3x + y + z = 3 is a plane in R3\mathbb{R}^3, and a solution of several such equations is a point that lies on all of their planes.

Column picture

Definition Let AA have columns a1,…,an\mathbf{a}_1, \dots, \mathbf{a}_n in Rm\mathbb{R}^m. Since Ax=x1a1+⋯+xnanA\mathbf{x} = x_1\mathbf{a}_1 + \cdots + x_n\mathbf{a}_n, the system Ax=bA\mathbf{x} = \mathbf{b} is the vector equation

x1a1+x2a2+⋯+xnan=b.x_1\mathbf{a}_1 + x_2\mathbf{a}_2 + \cdots + x_n\mathbf{a}_n = \mathbf{b}.

In the column picture the unknowns are weights, and a solution is a choice of weights that combines the columns into the target b\mathbf{b}. This picture lives in the output space Rm\mathbb{R}^m, while the row picture lives in the input space Rn\mathbb{R}^n.

In plain words The row picture asks which points meet every constraint. The column picture asks how much of each column you need to reach the target.

Example For the system x+y=3x + y = 3, x−y=1x - y = 1, the columns of AA are (1,1)(1, 1) and (1,−1)(1, -1), and the target is (3,1)(3, 1). The weights x=2x = 2 and y=1y = 1 reach it,

2[11]+1[1−1]=[31].2\begin{bmatrix} 1 \\ 1 \end{bmatrix} + 1\begin{bmatrix} 1 \\ -1 \end{bmatrix} = \begin{bmatrix} 3 \\ 1 \end{bmatrix}.

In the row picture (2,1)(2, 1) was the point being searched for. In the column picture (3,1)(3, 1) is the given target, and the numbers 22 and 11 are the weights that reach it.

Consistent and inconsistent systems

Definition A linear system is consistent if it has at least one solution and inconsistent if it has none. In the column picture, Ax=bA\mathbf{x} = \mathbf{b} is consistent exactly when b\mathbf{b} lies in span⁡{a1,…,an}\operatorname{span}\{\mathbf{a}_1, \dots, \mathbf{a}_n\}, the span of the columns of AA. Every linear system has no solution, exactly one solution, or infinitely many solutions. Indeed, if p≠q\mathbf{p} \ne \mathbf{q} are two solutions, then for every real tt

A(p+t(q−p))=Ap+t(Aq−Ap)=b+t(b−b)=b,\begin{aligned} &A\big(\mathbf{p} + t(\mathbf{q} - \mathbf{p})\big) \\[0.4em] &\quad = A\mathbf{p} + t(A\mathbf{q} - A\mathbf{p}) \\[0.4em] &\quad = \mathbf{b} + t(\mathbf{b} - \mathbf{b}) = \mathbf{b}, \end{aligned}

so every point of the line through p\mathbf{p} and q\mathbf{q} is a solution. Since q−p≠0\mathbf{q} - \mathbf{p} \ne \mathbf{0}, different values of tt give different points, so two solutions already force infinitely many.

In plain words Consistent means the requirements can all be met, by one point or by many. Consistent does not mean unique. Inconsistent means the requirements contradict each other. Two lines in the plane can cross once, be parallel and never meet, or coincide, and the same three outcomes, none, one or infinitely many solutions, are the only ones possible for any linear system.

Example In the system x+y=3x + y = 3, 2x+2y=62x + 2y = 6 the second equation is twice the first, so the two lines coincide. Every pair (t,3−t)(t, 3 - t) with tt real is a solution, for instance (0,3)(0, 3), (2,1)(2, 1) and (−1,4)(-1, 4). Now change the second constant to 77. Any solution would have 2x+2y=2(x+y)=62x + 2y = 2(x + y) = 6, which cannot equal 77, so the lines are parallel and the system is inconsistent. In the column picture both columns equal (1,2)(1, 2), and their span is a line through the origin. The target (3,6)=3(1,2)(3, 6) = 3(1, 2) lies on that line, and the target (3,7)(3, 7) does not.

Check yourself

  1. Write the system 2x−y=42x - y = 4, x+3y=−5x + 3y = -5 as a matrix equation and as an augmented matrix. Is (1,−2)(1, -2) a solution?
Show the answer

The matrix form is

[2−113][xy]=[4−5],\begin{bmatrix} 2 & -1 \\ 1 & 3 \end{bmatrix}\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 4 \\ -5 \end{bmatrix},

and the augmented matrix is

[2−1413−5].\left[\begin{array}{cc|c} 2 & -1 & 4 \\ 1 & 3 & -5 \end{array}\right].

The pair (1,−2)(1, -2) is a solution, since 2(1)−(−2)=42(1) - (-2) = 4 and 1+3(−2)=−51 + 3(-2) = -5. In the column picture the same check reads 1⋅(2,1)+(−2)⋅(−1,3)=(4,−5)1 \cdot (2, 1) + (-2) \cdot (-1, 3) = (4, -5).

  1. Describe all solutions of x−2y=1x - 2y = 1, −3x+6y=−3-3x + 6y = -3. What happens if the second constant −3-3 is changed to 44?
Show the answer

The second equation is −3-3 times the first, constant included, so the two lines coincide. Let y=ty = t. The first equation gives x=1+2tx = 1 + 2t, so the solutions are the pairs (1+2t,t)(1 + 2t, t) for every real tt. Each of them also satisfies the second equation, since −3(1+2t)+6t=−3-3(1 + 2t) + 6t = -3. Conversely, every solution satisfies the first equation, so it has this form.

With the constant 44, any solution would satisfy −3x+6y=−3(x−2y)=−3-3x + 6y = -3(x - 2y) = -3, which is not 44. The lines are then parallel and the system is inconsistent.

  1. A student claims that three equations in three unknowns always have exactly one solution. Test the claim on the system x+y+z=2x + y + z = 2, 2x+2y+2z=42x + 2y + 2z = 4, x−y=0x - y = 0.
Show the answer

The claim is false. The second equation is twice the first, so it adds no new requirement, and the third gives y=xy = x. Let x=tx = t. Then y=ty = t, and the first equation gives z=2−2tz = 2 - 2t. Every triple (t,t,2−2t)(t, t, 2 - 2t) satisfies all three equations, because t+t+(2−2t)=2t + t + (2 - 2t) = 2, twice that sum is 44, and t−t=0t - t = 0. Conversely, every solution has y=xy = x and z=2−2xz = 2 - 2x, so it has this form.

The system is consistent with infinitely many solutions, a line in R3\mathbb{R}^3. Counting equations does not tell how many independent requirements they impose.

How this lesson connects

It also uses graphing a straight line from its equation.