3.1  Three Views of a Linear System

Chapter 1 kept running into the same kind of question. Is this vector in the span of those? Is this list independent? Every time, the question turned into a handful of equations in unknown coefficients, and we solved them by hand. This chapter gives those equations a name, looks at them from three sides, and turns solving them into an algorithm with a proof behind it. This first section sets up the language and answers a structural question before any computing: what can the set of all solutions look like?

3.1.1. One system, three pictures

Here is a system of two equations in two unknowns, over R: 2x−y=1,x+y=5. Adding the equations gives 3x=6, so x=2, and then y=5−x=3. We can read this one small system in three different ways, and each will be useful.

The row picture. Each equation describes a line in the plane: y=2x−1 and y=5−x. A solution is a point on both lines, so solving the system means intersecting them. The lines meet at (2,3).

Diagram. Labels: x, y, 2x - y = 1, x + y = 5, (2, 3)

The column picture. Stack the coefficients of x into one column and those of y into another. The system says x(21)+y(−11)=(15). Now the unknowns are weights. We are asked how much of the vector a1=(2,1) and how much of a2=(−1,1) to combine to reach b=(1,5). The answer x=2, y=3 says: walk twice along a1, then three times along a2.

Diagram. Labels: mathbf a_1, mathbf a_2, 2mathbf a_1, 3mathbf a_2, mathbf b = 2mathbf a_1 + 3mathbf a_2

The matrix picture. Collect the coefficients into a matrix and the unknowns into a column. By the definition of matrix multiplication (Definition 0.9.9), the system is the single equation (2−111)(xy)=(15),that is,Ax=b.

The three pictures say the same thing, and they are tied together by one fact from Chapter 0: Ax=x1a1+⋯+xnan, a combination of the columns of A weighted by the entries of x (Theorem 0.9.3). The row picture is the one we draw. The column picture connects to Chapter 1, since it asks whether b lies in a span. The matrix picture is the one we compute and prove things with.

Remark. With more unknowns the pictures can no longer be drawn, but they do not change. An equation in three unknowns whose coefficients are not all zero describes a plane in R3, and a system asks where several planes meet. In the column picture, three unknowns mean three columns, and we ask whether a combination of them hits b.

3.1.2. Linear systems

The example had two equations and two unknowns over R. The general notion allows any numbers of each, and any field. Allowing any field is not generality for its own sake. Systems over F2 describe parity checks and switching puzzles, and systems over Q are what a computer can solve exactly.

A linear system is a finite list of equations, each saying that a fixed combination of the unknowns equals a fixed scalar.

Definition 3.1.1 (Linear system)

Let F be a field and let m,n≥1. A system of m linear equations in n unknowns x1,…,xn over F is a list of equations a11x1+a12x2+⋯+a1nxn=b1,a21x1+a22x2+⋯+a2nxn=b2,  ⋮am1x1+am2x2+⋯+amnxn=bm, where all aij and bi lie in F.

  • The coefficient matrix is A=(aij)∈Mm×n(F), the right-hand side is b=(b1,…,bm)∈Fm, and the system is written Ax=b.
  • The augmented matrix is the m×(n+1) matrix [A∣b] obtained by appending b to A as a last column.
  • A solution is a vector s=(s1,…,sn)∈Fn such that every equation holds when xj=sj for all j; equivalently, As=b. The solution set is the set of all solutions, a subset of Fn.
  • The system is consistent if it has at least one solution, and inconsistent if its solution set is empty.

In words: the coefficient matrix records the left-hand sides, row i for equation i and column j for unknown xj. The augmented matrix records the whole system, and it is the object we will manipulate in the next section. A solution is a single vector of Fn, and it must satisfy all m equations at once, not just some of them. “Equivalently, As=b” holds because the i-th entry of As is ai1s1+⋯+ainsn by Definition 0.9.9, and two columns are equal exactly when all their entries agree.

Two small words deserve attention. A solution lives in Fn, with entries in the field F: the equation 2x=1 has the solution 12 over Q, but over F2 it reads 0=1 and has none. And “consistent” means at least one solution, not exactly one.

Example (None, one, or a whole line)

Find the solution set of each system over R, and describe it in the row picture.

  • (a) x+2y=1, 2x+4y=5.
  • (b) 2x−y=1, x+y=5.
  • (c) x+2y=1, 2x+4y=2.

Solution.

  • (a) Suppose (x,y) is a solution. Doubling the first equation gives 2x+4y=2, while the second says 2x+4y=5. Then 2=5, which is false. So there is no solution, and the system is inconsistent. In the row picture, the lines y=12−12x and y=54−12x have the same slope and different intercepts: they are parallel and never meet.
  • (b) As computed at the start of the section, any solution has x=2 and y=3; conversely 2⋅2−3=1 and 2+3=5. The solution set is {(2,3)}, the single point where two non-parallel lines cross.
  • (c) The second equation is twice the first, so a pair (x,y) satisfies both exactly when it satisfies x+2y=1, that is, when x=1−2y. Writing t for y, the solution set is {(1−2t,t):t∈R}. Both equations describe the same line, and every point on it is a solution.

The three answers are the three things two lines can do: miss, cross, or coincide. Over R, and over any infinite field, no other sizes are possible: once we know the shape of the solution set (Theorem 3.1.3 below), this is a short argument, which you will give in Exercise (C1: How many solutions?). For instance, no system over R has exactly two solutions. Over a finite field the picture is different.

Example (Exactly two solutions over F2)

Find all solutions of the system x+y+z=1, y+z=0 over F2. Then compare with the same system over R.

Solution. In F2 we have −1=1, so the second equation says y=−z=z. Substituting into the first gives x+2z=1, and 2z=0 in F2, so x=1. Conversely, every (1,z,z) satisfies both equations: 1+z+z=1+2z=1 and z+z=0. Since z can only be 0 or 1, the solution set is {(1,0,0), (1,1,1)}, with exactly two elements.

Over R the second equation gives y=−z, and then the first gives x=1. The solution set is {(1,−t,t):t∈R}, a line in R3 with infinitely many points. The equations are the same, but the field decides how many values the free unknown can take.

Now a non-example, by a minimal change. The equation x+y2=1 looks like one of the equations above, and it still has a left side built from the unknowns and a constant on the right. But the unknown y appears squared, so the left side is not of the form a1x1+a2x2 with fixed scalars a1,a2. The clause that fails is “a fixed combination of the unknowns”. Its solution set in R2 is a parabola, not a line, and nothing in this chapter applies to it.

Warning. “Consistent” does not mean “has exactly one solution”. The system x+2y=1, 2x+4y=2 of Example (None, one, or a whole line) (c) is consistent, and it has infinitely many solutions. Consistency only rules out the empty solution set. Whether the solution is unique is a separate question, answered by Corollary 3.1.4 below.

Why record the augmented matrix at all, when Ax=b is shorter? Because solving a system never touches the names of the unknowns. Adding two equations adds their coefficients and their right-hand sides, and nothing else. The augmented matrix keeps exactly this data and throws away the symbols x1,…,xn and the plus signs. In the next section every manipulation is performed on it.

One kind of system is always consistent, because it has an obvious solution.

Definition 3.1.2 (Homogeneous system)

A linear system Ax=b over F is homogeneous if b=0. The vector 0∈Fn is a solution of every homogeneous system Ax=0, called the trivial solution. For any system Ax=b, the system Ax=0, with the same coefficient matrix, is its associated homogeneous system.

The trivial solution exists by the zero rule of Theorem 0.9.4: A0=0. So for a homogeneous system the interesting question is never “is there a solution?” but “is there a non-trivial one?”. For example, x+2y=0, 2x+4y=0 has the non-trivial solution (−2,1), while 2x−y=0, x+y=0 has only the trivial one: adding the equations gives 3x=0, so x=0, and then y=−x=0.

Quick check. Over R, write the system x1−x2+3x3=4, 2x2+x3=0 in the matrix picture and the column picture, and give its augmented matrix. Is (4,0,0) a solution? Is (1,0,1)?

Solution. With A=(1−13021) and b=(4,0), the system is Ax=b. In the column picture it reads x1(1,0)+x2(−1,2)+x3(3,1)=(4,0). The augmented matrix is [A∣b]=[1−1340210]. For (4,0,0): 4−0+0=4 and 0+0=0, so it is a solution. For (1,0,1): the first equation gives 1−0+3=4, but the second gives 0+1=1≠0. One failing equation is enough, so it is not a solution.

3.1.3. Consistency is a question about span

The column picture turns “does this system have a solution?” into a question from Chapter 1.

Theorem 3.1.1 (Consistency and the span of the columns)

Let A∈Mm×n(F) have columns a1,…,an∈Fm, and let b∈Fm. Then the system Ax=b is consistent if and only if b∈span(a1,…,an). More precisely, s=(s1,…,sn) is a solution exactly when b=s1a1+⋯+snan.

Proof. By Theorem 0.9.3, As=s1a1+⋯+snan for every s∈Fn. Hence s is a solution, that is As=b, exactly when b=s1a1+⋯+snan. This proves the second statement.

(⇒) If the system is consistent, it has a solution s, and then b=s1a1+⋯+snan is a linear combination of the columns. By Definition 1.3.2, b∈span(a1,…,an).

(⇐) If b∈span(a1,…,an), then b=s1a1+⋯+snan for some s1,…,sn∈F, and s=(s1,…,sn) is a solution by the first paragraph. Hence the system is consistent.

Read backwards, the theorem is a recipe for Chapter 1 questions: to decide whether b lies in the span of some vectors of Fm, put the vectors as the columns of a matrix and ask whether the system is consistent.

Example (Span membership as a system)

In R3, let v1=(1,2,3) and v2=(0,1,2). Decide whether (1,4,7) and (1,4,8) lie in span(v1,v2).

Solution. Let A be the 3×2 matrix with columns v1,v2. By Theorem 3.1.1, (1,4,7)∈span(v1,v2) if and only if the system a=1,2a+b=4,3a+2b=7 in the unknowns a,b is consistent. The first equation gives a=1, and then the second gives b=2. The third equation must also hold, and it does: 3+4=7. Hence (1,4,7)=v1+2v2 lies in the span.

For (1,4,8), the first two equations are the same, so any solution has a=1 and b=2. The third equation now demands 3+4=8, which is false. The system is inconsistent, so (1,4,8)∉span(v1,v2).

Geometrically, span(v1,v2) is a plane through 0 in R3. The first right-hand side lies on that plane and the second does not.

3.1.4. The shape of the solution set

We now describe the solution set of an arbitrary system, starting with the homogeneous case. Chapter 1 already did the work there: in Example (Solutions of a Homogeneous System) we checked, with the three conditions of the subspace test, that the solutions of Ax=0 form a subspace.

Theorem 3.1.2 (Homogeneous solutions form a subspace)

Let A∈Mm×n(F). The solution set N={x∈Fn:Ax=0} of the homogeneous system Ax=0 is a subspace of Fn.

Proof. This is Example (Solutions of a Homogeneous System): A0=0, and for x,y∈N and c∈F, the rules of Theorem 0.9.4 give A(x+y)=Ax+Ay=0 and A(cx)=c(Ax)=0. By the subspace test (Theorem 1.2.1), N is a subspace of Fn.

The solutions of Ax=b with b≠0 behave differently.

Warning. The solution set of Ax=b with b≠0 is never a subspace. A subspace must contain 0, but A0=0≠b, so 0 is not a solution. For example, the solutions of x−y=1 in R2 form a line that misses the origin. The sum of the solutions (1,0) and (2,1) is (3,1), and 3−1=2≠1: adding two solutions does not give a solution.

What does survive is this: the difference of two solutions of Ax=b solves the homogeneous system, since A(s−s′)=b−b=0. So once one solution is known, every other one differs from it by a homogeneous solution. That is the whole structure.

Theorem 3.1.3 (Structure of the solution set)

Let A∈Mm×n(F) and b∈Fm, let N be the solution set of Ax=0, and suppose p∈Fn is one solution of Ax=b. Then the solution set of Ax=b is p+N={p+h:h∈N}.

Idea. The theorem is “particular plus homogeneous”. To prove equality of two sets, prove both inclusions. Going from a solution s to p+N uses the difference s−p, as observed above; going back uses the sum A(p+h)=Ap+Ah.

Proof. Let S be the solution set of Ax=b. We use Theorem 0.3.1.

(⊆) Let s∈S, and put h=s−p. By distributivity (Theorem 0.9.4), Ah=As−Ap=b−b=0, so h∈N. Hence s=p+h∈p+N.

(⊇) Let h∈N. Then A(p+h)=Ap+Ah=b+0=b, again by distributivity, so p+h∈S.

Therefore S=p+N, as claimed.

The theorem splits solving Ax=b into two independent jobs: find one solution, and find all solutions of the homogeneous system. The set p+N is a translate of the subspace N by the vector p, the kind of set that the picture in Example (A Line Missing the Origin) showed. For x−y=1 in R2, the homogeneous solutions form the line N=span((1,1)) through 0, one solution is p=(1,0), and the solution set is the parallel line through p.

Diagram. Labels: x, y, N: x - y = 0, mathbf p + N: x - y = 1, mathbf 0, mathbf p, mathbf h, mathbf p + mathbf h

A system solved by substitution fits the same pattern once we collect the free parameter.

Example (Particular plus homogeneous)

Solve x1+2x2−x3=4, x2+x3=1 over R, and write the solution set in the form p+span(h).

Solution. The second equation gives x2=1−x3. Substituting into the first, x1=4−2(1−x3)+x3=2+3x3. The value of x3 is not constrained, so write x3=t. Conversely, for every t∈R the vector (2+3t,1−t,t) satisfies both equations, since (2+3t)+2(1−t)−t=4 and (1−t)+t=1. Hence the solution set is {(2+3t,1−t,t):t∈R}={(2,1,0)+t(3,−1,1):t∈R}=p+span(h), with p=(2,1,0) and h=(3,−1,1). As Theorem 3.1.3 predicts, p is a solution (take t=0), and h solves the homogeneous system: 3−2−1=0 and −1+1=0. In the row picture, two planes in R3 meet in a line, and this line does not pass through 0.

3.1.5. When is the solution unique?

A consistent system has a unique solution exactly when there is nothing to add to the particular solution. The theorem just proved turns this into a statement about the homogeneous system, and the column picture turns that into independence.

Corollary 3.1.4 (Uniqueness of solutions)

Let A∈Mm×n(F) have columns a1,…,an, and let b∈Fm be such that Ax=b is consistent. The following are equivalent:

  • (a) Ax=b has exactly one solution;
  • (b) Ax=0 has only the trivial solution;
  • (c) the list (a1,…,an) is linearly independent.

Proof. Let N be the solution set of Ax=0. Since the system is consistent, it has a solution p, and by Theorem 3.1.3 its solution set is p+N.

(a ⇔ b) The function N→p+N, h↦p+h, is surjective by definition of p+N, and injective because p+h=p+h′ implies h=h′ by adding −p to both sides. So it is a bijection, and p+N has exactly one element if and only if N does. Since 0∈N always, N has exactly one element if and only if N={0}, which is (b).

(b ⇔ c) By Theorem 0.9.3, Ax=x1a1+⋯+xnan for every x∈Fn. So (b) says: for all x1,…,xn∈F, x1a1+⋯+xnan=0 implies x1=⋯=xn=0. This is word for word Definition 1.4.1 for the list (a1,…,an).

Two remarks on the hypotheses. The equivalence of (b) and (c) does not need consistency; only (a) does. And consistency cannot be dropped from (a ⇔ b): the system x=0, x=1 in one unknown has only the trivial solution in its homogeneous version (x=0, x=0), but it has no solution at all, so it certainly does not have exactly one.

So the three pictures answer the two basic questions about Ax=b in the language of Chapter 1: a solution exists when b is in the span of the columns, and it is unique when the columns are independent. What we still lack is a reliable way to decide either question for a given matrix. That is the job of Gaussian elimination, in the next section.

3.1.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define what it means for a linear system Ax=b over F to be consistent, and what its augmented matrix is. What is the size of the augmented matrix of a system of m equations in n unknowns?
  • (b) Determine whether the following statement is true: “the solution set of Ax=b is a subspace of Fn.” Justify your answer.
  • (c) Determine whether the following statement is true: “if Ax=b has two different solutions, then Ax=0 has a non-trivial solution.” Justify your answer.
  • (d) Let A∈M3×5(R). In which spaces do the unknown vector x and the right-hand side b of Ax=b live?
  • (e) Name the theorem that turns “is b in the span of a1,…,an?” into a question about a linear system, and state which system.

Solution.

  • (a) It is consistent if it has at least one solution s∈Fn, that is, some s with As=b. The augmented matrix is [A∣b], the matrix A with b appended as an extra last column. It has size m×(n+1).
  • (b) False in general. If b≠0, then A0=0≠b, so 0 is not a solution and the solution set is not a subspace. (If b=0, it is a subspace, by Theorem 3.1.2.)
  • (c) True. If s≠s′ are solutions, then A(s−s′)=b−b=0 by distributivity, and s−s′≠0.
  • (d) x∈R5, one entry per column of A, and b∈R3, one entry per row.
  • (e) Theorem 3.1.1: b∈span(a1,…,an) if and only if Ax=b is consistent, where A is the matrix with columns a1,…,an.

B. Practice

Exercise (B1: Three views)
  • (a) Write the system x1−x2+2x3=3, 2x1+x3=1 over R in the matrix picture and in the column picture, and give its augmented matrix.
  • (b) Write out, as a list of equations, the system with augmented matrix [1400123−15] over R. How many equations and unknowns does it have? Hence decide whether it is consistent.

Solution.

  • (a) The matrix picture is (1−12201)(x1x2x3)=(31). The column picture is x1(1,2)+x2(−1,0)+x3(2,1)=(3,1). The augmented matrix is [1−1232011].
  • (b) The system is x1+4x2=0, x2=2, 3x1−x2=5: three equations in two unknowns. The second equation gives x2=2, and then the first gives x1=−8. The third equation would require −24−2=5, which is false. Hence no vector satisfies all three equations, and the system is inconsistent.
Exercise (B2: In the span or not?)

Determine whether the vector b lies in the span of the given vectors. Justify your answer, and when it does, write b as a linear combination of them.

  • (a) b=(2,1,4) and (1,0,1),(0,1,2) in R3.
  • (b) b=(1,1,1) and (1,2,0),(2,4,1) in R3.
  • (c) b=(1,1,0) and (1,0,1),(0,1,1) in F23. Is the answer the same in R3?

Solution. By Theorem 3.1.1, in each case we decide whether the system av1+bv2=b in the unknowns a,b is consistent.

  • (a) The system is a=2, b=1, a+2b=4. The first two equations force a=2, b=1, and then a+2b=4 holds. Hence (2,1,4)=2(1,0,1)+(0,1,2) is in the span.
  • (b) The system is a+2b=1, 2a+4b=1, b=1. Doubling the first equation gives 2a+4b=2, contradicting the second, since 2≠1. Hence the system is inconsistent and (1,1,1) is not in the span.
  • (c) The system is a=1, b=1, a+b=0. The first two force a=b=1, and then a+b=1+1=0 in F2. Hence (1,1,0)=(1,0,1)+(0,1,1) is in the span over F2. In R3 the same first two equations force a=b=1, but 1+1=2≠0, so the system is inconsistent and b is not in the span. The answer depends on the field.
Exercise (B3: Solve and describe)

Solve each system over R by substitution, and write its solution set in the form p+span(…). Check that your p is a solution and that your spanning vectors solve the associated homogeneous system.

  • (a) x1+x2+x3=2, x2−x3=1.
  • (b) x1−2x2+x3−x4=1, x3+2x4=3.

Solution.

  • (a) The second equation gives x2=1+x3, and then the first gives x1=2−(1+x3)−x3=1−2x3. With x3=t free, every solution is (1−2t,1+t,t), and conversely each such vector satisfies both equations. So the solution set is (1,1,0)+span((−2,1,1)). Check: 1+1+0=2 and 1−0=1; and −2+1+1=0, 1−1=0.
  • (b) The second equation gives x3=3−2x4. The first then gives x1=1+2x2−(3−2x4)+x4=−2+2x2+3x4. The unknowns x2=s and x4=t are free, and every solution is (−2+2s+3t, s, 3−2t, t)=(−2,0,3,0)+s(2,1,0,0)+t(3,0,−2,1), and conversely each such vector is a solution. So the solution set is (−2,0,3,0)+span((2,1,0,0),(3,0,−2,1)). Check: −2−0+3−0=1 and 3+0=3; for (2,1,0,0): 2−2+0−0=0 and 0+0=0; for (3,0,−2,1): 3−0−2−1=0 and −2+2=0.

C. Going deeper

Exercise (C1: How many solutions?)

Let A∈Mm×n(F) and b∈Fm, and let N be the solution set of Ax=0.

  • (a) Suppose F is infinite. Prove that Ax=b has either no solution, exactly one solution, or infinitely many solutions.
  • (b) Suppose F is finite. Prove that Ax=b has either no solution or exactly |N| solutions.
  • (c) Give a system over F3 with exactly three solutions.

Hint: for (a), if N contains a non-zero vector h, look at its multiples.

Solution.

  • (a) Suppose the system is consistent, with a solution p. By Theorem 3.1.3 its solution set is p+N, and as in the proof of Corollary 3.1.4 the map h↦p+h is a bijection N→p+N. If N={0}, there is exactly one solution. Otherwise, let h∈N with h≠0. Since N is a subspace (Theorem 3.1.2), ch∈N for every c∈F. If ch=c′h, then (c−c′)h=0, and since h≠0, Theorem 1.1.9 gives c=c′. So c↦ch is injective, and N contains infinitely many vectors because F is infinite. Hence p+N is infinite.
  • (b) If the system is consistent with solution p, the bijection N→p+N from (a) shows that the solution set has exactly |N| elements. Otherwise it has none.
  • (c) The single equation x+y=1 over F3 (a system with m=1, n=2). For each of the three values of y∈F3 there is exactly one x=1−y, so the solutions are (1,0),(0,1),(2,2). Consistently with (b), the homogeneous equation x+y=0 has the three solutions (0,0),(2,1),(1,2).
Exercise (C2: The right-hand sides that work)

Let A∈Mm×n(F) have columns a1,…,an.

  • (a) Prove that the set C={b∈Fm:Ax=b is consistent} is a subspace of Fm.
  • (b) Deduce that if n<m, then there is some b∈Fm for which Ax=b is inconsistent.
  • (c) For A=(122401) over R, find one such b.

Solution.

  • (a) By Theorem 3.1.1, b∈C if and only if b∈span(a1,…,an). So C=span(a1,…,an), which is a subspace of Fm by Theorem 1.3.1.
  • (b) By (a), C is spanned by the n vectors a1,…,an. Since dim⁡Fm=m (Example (Dimensions of the Running Examples)), Theorem 1.6.3 says no list of fewer than m vectors spans Fm. As n<m, C≠Fm, so some b∈Fm is not in C, and for that b the system is inconsistent.
  • (c) Take b=(1,0,0). A solution would satisfy x+2y=1 and 2x+4y=0. Doubling the first gives 2x+4y=2≠0, a contradiction. So Ax=(1,0,0) is inconsistent.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.