Chapter 3: Linear systems and row reduction
3.4Solving linear systems
By Theorem 3.3.10, Gauss–Jordan elimination turns into with invertible, and by Proposition 3.2.14 the system has the same solutions as the system . In Example 3.1.13 we read the solutions of one reduced system off by eye. This section does it in general. A reduced system says two things. Its zero rows decide whether there is a solution at all, and its other rows split the unknowns into free ones, which can take any values, and pivot ones, which the free ones then determine. From this we get a criterion for uniqueness and a criterion for existence, both in terms of pivots, and a first substantial application: through points with distinct first coordinates there passes exactly one polynomial of degree at most .
3.4.1Reducing to RREF
As in Definition 3.3.9, we write .
Proposition 3.4.1 (Solving with the reduced matrix). Let , and let be invertible with (Theorem 3.3.10). Then for all and ,
Moreover, if is the product of the elementary matrices of the run of Gauss–Jordan elimination on (Theorem 3.3.10), then the run on the augmented matrix , with step 1 of Algorithm 3.3.1 restricted to the first columns, ends at .
Uses. Proposition 3.2.14 (Invertible matrices preserve solution sets), Theorem 3.3.10 (), Proposition 3.3.11 (Carrying extra columns along)
Techniques. Reduce to RREF (Technique 3.3.22)
() If , then
() Since , we have . So if , then
(This is Proposition 3.2.14 for our particular .) The last statement is Proposition 3.3.11(b), applied with ; it concerns the particular produced by the run. (When has fewer than pivots, other invertible matrices also satisfy , and the equivalence holds for each of them.) □
So the analysis of an arbitrary system reduces to that of a system whose coefficient matrix is in RREF. We never need separately: we row reduce , and rides along in the last column. To treat every right-hand side at once, we can let the last column hold the symbols , which amounts to carrying along and producing (Proposition 3.3.11).
These notions belong to alone. They do not involve , and they do not depend on how was reduced (Corollary 3.3.18). In fact Corollary 3.3.19 describes them without any reduction: column is free exactly when is a linear combination of . The pivots lie in rows and in distinct columns (Proposition 3.3.8), so . The number is the rank of , the subject of Section 3.5. For the matrix of Example 3.3.3,
the pivot columns are and , and the free columns are and . In the pivot variables are , and the free variables are .
3.4.2Reading off the solutions
Intuition (What a reduced system says). Let , with entries , and . Row of has its pivot, a , in column , and zeros in the other pivot columns, because the pivot columns of are (Lemma 3.3.16(b)). So the th equation of contains exactly one pivot variable, with coefficient , plus some free variables:
The rows below row are zero, so their equations read . These contain no unknowns at all: each one is either automatically true or impossible. For instance, a matrix in RREF with pivot columns gives a system of the shape
If , there is nothing to be done. If , we may give the free variables any values we like, and then each of the first three equations determines its own pivot variable.
Theorem 3.4.3 (Solving a system in reduced form). Let be in RREF, with entries , pivot columns , and free columns . Let .
- (a)If for some , then has no solution.
(b)If for every , then solves if and only if
(3.4.1)In particular, for every choice of there is exactly one solution with
.
Uses. Definition 2.3.8 (Matrix–vector product), Proposition 3.3.8 (Properties of the output), Theorem 3.3.12 (Matrices in RREF), Lemma 3.3.16 (Reading the columns of a matrix in RREF)
Since is in RREF, is an output of Gauss–Jordan elimination, and its pivots are its leading entries (Theorem 3.3.12). By Proposition 3.3.8, rows of are zero, and by Lemma 3.3.16(b), column of is for .
By Definition 2.3.8, the th entry of is . Each index is exactly one of
(a) If , row of is zero, so for every . If moreover , the th equation fails for every .
(b) For , both sides of the th equation are , so it holds for every . For , the entry is the th entry of , which is if and otherwise. So by (3.4.2),
and the th equation holds if and only if (3.4.1) holds for this . Hence if and only if (3.4.1) holds for .
For the last claim, let . Define by for each and
for each . Since each index is exactly one pivot or free column, this specifies every coordinate exactly once, and is a solution by what we just proved. Conversely, a solution with for all has its pivot coordinates given by (3.4.1), so it is this . □
The theorem is the lecture’s recipe, made precise: the free variables can be anything, and then the pivot variables are determined from the free variables and the corresponding . Applied to and , it settles consistency at once.
Corollary 3.4.4 (Consistency). Let have pivots, let be invertible with , and let . Then is consistent if and only if
Equivalently, is inconsistent exactly when the reduced augmented matrix has a row with . In particular,
Uses. Proposition 3.4.1 (Solving with the reduced matrix), Theorem 3.4.3 (Solving a system in reduced form), Proposition 3.3.8 (Properties of the output), Proposition 3.1.8 (Systems and the map )
Techniques. Reduce to RREF (Technique 3.3.22)
Let . By Proposition 3.4.1, and have the same solutions. If for some , the latter has no solution by Theorem 3.4.3(a). If for all , it has a solution by Theorem 3.4.3(b), for instance the one whose free variables are all .
By Proposition 3.3.8, rows of are nonzero (they contain the pivots) and rows are zero. So a row of of the form with is exactly a row with .
Finally, by Proposition 3.1.8(a), if and only if is consistent, which we have just characterized. □
The description of is worth a second look. The conditions for are homogeneous linear equations in , whose coefficients are the last rows of . So the image of , which is defined as a set of outputs, is also the solution set of a homogeneous system, that is, a kernel. For the running system, the last row of in Example 3.2.8 is , and the single condition is the plane that Section 3.1.5 found by inspecting the columns.
If we row reduce all the way, without restricting the scan, the test reads slightly differently, and it has a proof that never mentions .
Uses. Corollary 3.3.19 (Pivot columns, intrinsically), Proposition 3.1.8 (Systems and the map ), Definition 3.3.9 (Reduced row echelon form), Proposition 3.3.8 (Properties of the output)
The columns of are . By Corollary 3.3.19(a), applied to this matrix and its column , the last column is a pivot column if and only if is not a linear combination of . By Proposition 3.1.8(a), this happens if and only if is inconsistent.
By Definition 3.3.9 and Proposition 3.3.8(b), the pivots of are the leading entries of the nonzero rows of , and they are . So the last column is a pivot column if and only if some row has its leading entry, a , in the last column, that is, if and only if some row is . □
The two tests agree, as they must: by Exercise 3.3.44 the first columns of form , and the unrestricted run simply goes on to clear the last column once a row with appears.
Example 3.4.6 (A complete solution). We solve for the matrix of Example 3.3.3 and every . Carrying along in Section 3.3.3 produced
so by Proposition 3.4.1 the system is equivalent to
Here , so there is one consistency condition. By Corollary 3.4.4, the system is consistent if and only if , and is the plane in . (Each column of satisfies this, for example for .)
Take . Then , the condition holds, and by (3.4.1) the solutions are exactly the vectors with
For , instead, , and the last equation of the reduced system reads : there is no solution.
The row reducer below carries out the reduction of for , scanning only the columns of . At the end it reports the pivot and free columns and whether the system is consistent. Edit the last column to to see the row appear.
Exercise 3.4.7. Let
Find and the pivot and free variables. For which is consistent? Find all solutions for .
Uses. Proposition 3.4.1 (Solving with the reduced matrix), Corollary 3.4.4 (Consistency), Theorem 3.4.3 (Solving a system in reduced form)
We reduce . Column is zero, so pass uses the pivot in position : add times row to row and times row to row . In pass , column vanishes in rows and , so the pivot is in position ; add times row to row and row to row :
So has rows , , , the pivot variables are and , and the free variables are and . By Corollary 3.4.4 the system is consistent if and only if .
For the condition holds (), and the reduced system is , . By Theorem 3.4.3(b), the solutions are the vectors with arbitrary. The unknown multiplies the zero column, so it occurs in no equation, and it is free for the most obvious reason. As a check, is the second column .
3.4.3The shape of the solution set
Formula (3.4.1) expresses the pivot variables through the free ones. Collecting, for each free variable, the terms that involve it writes every solution as one fixed vector plus a combination of vectors that do not depend on , which is the form Proposition 3.1.19 predicts.
Definition 3.4.8 (Basic solutions). Let , with as above, entries of , pivot columns , and free columns .
(a)For , the th basic solution of is the vector with
- (b)If is consistent, its particular solution has
for , and for .
In words: is the solution of obtained by setting the free variable to and the other free variables to , and is the solution of obtained by setting every free variable to . (Both are solutions by Theorem 3.4.3(b) and Proposition 3.4.1.) The depend only on , which depends only on . The vector is the only solution whose free variables all vanish, by Theorem 3.4.3(b), so it does not depend on which we used either. Realize also that can be copied from column of : negate its first entries and put them in the pivot positions , put a in position , and zeros elsewhere.
Theorem 3.4.9 (All solutions). Let , and suppose is consistent. Let be its particular solution and the basic solutions of (Definition 3.4.8).
(a)The solutions of are exactly the vectors
and each solution arises from exactly one choice of , namely .
- (b)
, and each vector of is a linear combination of in exactly one way.
So the solution set of is
Uses. Theorem 3.4.3 (Solving a system in reduced form), Proposition 3.4.1 (Solving with the reduced matrix), Corollary 3.4.4 (Consistency), Proposition 3.1.8 (Systems and the map ), Definition 1.3.10 (Span)
Techniques. Particular plus homogeneous (Technique 3.1.18), Reduce to RREF (Technique 3.3.22)
Let . Since the system is consistent, for (Corollary 3.4.4), and by Proposition 3.4.1 its solutions are those of .
(a) For , let
In position , has and has , so
This is (3.4.1) for , so solves by Theorem 3.4.3(b), and hence .
Conversely, let be a solution, and let be the vector above with for each . Then and are solutions with the same free coordinates, so by the uniqueness in Theorem 3.4.3(b) they are equal. Finally, if
(b) By Proposition 3.1.8(b), is the solution set of , which is consistent. Its particular solution is , since . By (a), its solutions are exactly the vectors , each for exactly one choice of the . By Definition 1.3.10, the set of these vectors is .
The last sentence of the theorem combines (a) and (b). □
This is Proposition 3.1.19 made explicit. That proposition said that once we know one solution, the others are obtained by adding elements of ; the theorem produces the one solution, , and describes by vectors, one for each free variable. It is the canonical instance of Technique 3.1.18. There is also a quick way to see that without the theorem. By Corollary 3.3.19(b), column of is (the terms with are zero by Lemma 3.3.16(a)). Moving everything to one side gives a relation among the columns of whose coefficient vector is exactly .
Example 3.4.10 (The complete solution, in vector form). In Example 3.4.6, with , we have and
The particular solution has and in the pivot positions , and in the free positions . The basic solutions come from columns and of :
By Theorem 3.4.9, the solution set is
a plane in , and
The whole procedure fits in a few lines.
Algorithm 3.4.13 (Solving a linear system)
- Input
- A matrix and a vector .
- Output
- The solution set of , in the form
, or the conclusion that the system is inconsistent.
It is correct by Proposition 3.4.1, Corollary 3.4.4, and Theorem 3.4.9. The bijection
Corollary 3.4.14 (Counting solutions). Suppose is consistent, where has free columns.
- (a)The system has exactly one solution if and only if , that is, if and only if every column of is a pivot column.
- (b)If is finite with elements, the system has exactly solutions.
- (c)If is infinite and , the system has infinitely many solutions.
Uses. Theorem 3.4.9 (All solutions)
By Theorem 3.4.9(a), each solution is for exactly one list , and every such vector is a solution. So the solution set is in bijection with . If , there are no parameters and the only solution is .
(a) If , the only solution is . If , then and are solutions, and they differ, since their -coordinates are and .
(b) has elements (and covers ).
(c) If and is infinite, the vectors , , are infinitely many distinct solutions. □
Part (b) is the formula promised after Example 3.1.26, where the equation over has one free variable and solutions. We did not need dimension: the number of free variables does the counting. Part (c) recovers Corollary 3.1.24, and adds that the number of solutions of a consistent system is decided by alone.
3.4.4Pivots in every column, pivots in every row
- (I) has a pivot in every column.
- (II)The equation has only the trivial solution .
The homogeneous system is consistent, so this is the case of Corollary 3.4.14(a). The lecture proves it directly, and the direct argument is worth having: it constructs a nonzero solution whenever one exists.
Proof (set one free variable to ).
Uses. Proposition 3.4.1 (Solving with the reduced matrix), Theorem 3.4.3 (Solving a system in reduced form), Lemma 3.3.16 (Reading the columns of a matrix in RREF), Definition 2.3.8 (Matrix–vector product)
Techniques. Reduce to RREF (Technique 3.3.22), Contrapositive (Technique 1.5.4)
By Proposition 3.4.1 with , and since , the equations and have the same solutions.
(I) (II). Suppose every column of is a pivot column. Then , and are increasing numbers in , so for every . By Lemma 3.3.16(b), column of is , so by Definition 2.3.8
the vector of whose first entries are and whose remaining entries are . It is only if .
(II) (I). We prove the contrapositive. Suppose some column of has no pivot, so it is a free column . The right-hand side certainly has for , so by Theorem 3.4.3(b) the system has a solution with and every other free variable . This is nonzero, as its -coordinate is , and . So (II) fails. □
Proof (via relations among the columns).
Uses. Definition 2.3.8 (Matrix–vector product), Theorem 1.5.5 (Independence is decided at zero), Corollary 3.3.19 (Pivot columns, intrinsically), Lemma 1.5.10 (Linear dependence lemma)
Techniques. Contrapositive (Technique 1.5.4)
By Definition 2.3.8,
If (I) fails, then
is a linear relation with a nonzero coefficient, so (II) fails. If (II) fails, the columns are linearly dependent, and the linear dependence lemma (Lemma 1.5.10) gives an index with
The first proof is constructive: when (I) fails, it hands us a nonzero solution, namely a basic solution. The second explains what a missing pivot means: a column that depends on the columns before it. It also shows that a pivot in every column is the same as linear independence of the columns. By Theorem 2.6.11, (II) says that is injective, so a pivot in every column is a mechanical test for the equivalent conditions of Theorem 2.7.2. Section 3.5 adds it to that theorem.
- (I) has a pivot in every row.
- (II)For every , the equation has a solution .
Uses. Theorem 3.3.10 (), Proposition 3.3.8 (Properties of the output), Corollary 3.4.4 (Consistency), Theorem 3.4.3 (Solving a system in reduced form), Definition 2.5.12 (Invertible)
Techniques. Reduce to RREF (Technique 3.3.22), Contrapositive (Technique 1.5.4)
Let be invertible with (Theorem 3.3.10), and let be the number of pivots. By Proposition 3.3.8 the pivots lie in rows , one in each, so (I) says exactly that .
(I) (II). Suppose , and let . There is no index with , so the condition in Corollary 3.4.4 holds trivially, and is consistent. Explicitly, by Theorem 3.4.3(b) and Proposition 3.4.1, the vector with for and all free variables is a solution.
(II) (I). We prove the contrapositive. Suppose , so that row of is zero (Proposition 3.3.8(a)). Let . Then has th entry , and , so is inconsistent by Corollary 3.4.4. (Directly: if and only if , and the th entry of is for every .) So (II) fails. □
Remark 3.4.17 (Why ). It is tempting to take itself in the last proof, but row operations move the image of (Non-example 3.2.19), and may well be consistent. For instance,
and has the solution . With , the bad right-hand side is : the equation says .
By Proposition 3.1.8(a), (II) says that is surjective, equivalently that the columns of span , so a pivot in every row is a mechanical test for the conditions of Theorem 2.7.4. For a matrix both failures can be watched at once. The component below starts with
The columns and lie on one line, and has one pivot: its second column is free and its second row is zero. For , off the line , the two lines of the row picture are parallel and there is no solution. Drag onto the line spanned by the columns and the two lines of the row picture coincide: now there are infinitely many solutions, one for each value of the free variable . Drag off that line and both defects disappear at once, as they must for a square matrix (Corollary 3.4.20).
Exercise 3.4.18. Each matrix below is for some . For each one, decide whether has only the trivial solution, and whether is consistent for every .
Uses. Proposition 3.4.15 (A pivot in every column), Proposition 3.4.16 (A pivot in every row)
By Proposition 3.4.15, has only the trivial solution exactly when every column of has a pivot, and by Proposition 3.4.16, is consistent for every exactly when every row has a pivot.
- has pivots in columns and in both rows. Column is free, so has a nontrivial solution (for instance the basic solution ), and is consistent for every .
- has pivots in both columns but not in row . So has only the trivial solution, but is inconsistent for some .
- has pivots in columns and rows . Column and row have none, so both properties fail.
- has a pivot in every row and every column, so both properties hold.
Since there are at most pivots, the shape of alone can rule out one of the two properties.
Corollary 3.4.19 (More unknowns than equations). Let .
- (a)If , then has a nontrivial solution.
- (b)If , then is inconsistent for some .
Uses. Proposition 3.3.8 (Properties of the output), Proposition 3.4.15 (A pivot in every column), Proposition 3.4.16 (A pivot in every row)
Part (a) has a geometric reading over : two planes through the origin in always share a line, since two homogeneous equations in three unknowns have a nontrivial solution. In terms of the Fundamental Theorems, (a) and (b) say that can be injective only if , and surjective only if . Section 3.5 draws the consequences, among them that every invertible matrix is square.
For square matrices the two properties cannot be separated.
- (i) has a pivot in every column.
- (ii) has a pivot in every row.
- (iii).
- (iv) has only the trivial solution.
- (v) has a solution for every .
- (vi) has exactly one solution for every .
- (vii) is invertible.
Uses. Proposition 3.3.8 (Properties of the output), Proposition 3.4.15 (A pivot in every column), Proposition 3.4.16 (A pivot in every row), Corollary 3.1.22 (Uniqueness depends only on ), Proposition 3.1.8 (Systems and the map ), Theorem 3.3.23 (Invertibility and RREF)
Techniques. Proving TFAE (Technique 2.7.1), Reduce to RREF (Technique 3.3.22)
Let be the number of pivots of . By Proposition 3.3.8 they lie in rows and in distinct columns . So (i) says , and since has rows, (ii) also says . Hence (i) (ii).
(i) (iii). If , then for every (as in the first proof of Proposition 3.4.15), and column of is by Proposition 3.3.8(c), so . Conversely, the pivots of are its diagonal entries (Example 3.3.13), one in each column.
(i) (iv) and (ii) (v) are Proposition 3.4.15 and Proposition 3.4.16.
(iv), (v) (vi). If (vi) holds, then (v) holds, and the unique solution of is the trivial one, which is (iv). Conversely, suppose (iv) and (v) hold. By (iv) and Proposition 3.1.8(b), . Let . By (v), is consistent, and by Corollary 3.1.22(a) it has exactly one solution. Since (iv) (i) (ii) (v), each of (iv) and (v) implies the other, so each is equivalent to (vi).
(iii) (vii) is Theorem 3.3.23. □
The equivalence of (iv) and (v) is the remarkable one. For a square system, knowing that the homogeneous system has only the trivial solution, a statement about uniqueness, gives a solution of for every , a statement about existence, and conversely. For non-square matrices both implications fail: has a pivot in every row but not in every column, and the matrix with column the reverse. The corollary also completes Exercise 3.1.47. That exercise showed that the equilibrium temperatures of a plate are unique, and its system has as many equations as unknowns, so they also exist, for every choice of boundary temperatures.
This is a proof strategy in its own right.
Technique 3.4.21 (Uniqueness gives existence). To show that a linear problem has a solution for every choice of data, it can be much easier to show that it has at most one. This works whenever the problem is a square linear system, with as many conditions as unknowns: by Corollary 3.4.20, if the homogeneous problem has only the zero solution, then every instance of the problem has exactly one solution. Uniqueness is usually the easier half because it is a statement about the homogeneous problem, where all data vanish, and it amounts to showing that some object is zero, often by a structural argument (a polynomial with too many roots, a maximum principle) rather than by computation. Existence then comes for free, without ever constructing a solution.
The setup has two requirements: the conditions are linear in the unknowns, and the number of conditions equals the number of unknowns. With those in place, the one thing left to prove is uniqueness itself, namely that the homogeneous problem has only the zero solution. Counting conditions and unknowns alone proves nothing (Exercise 3.6.14). Reach for it when existence looks hard and uniqueness looks easy, typically for interpolation-type problems (find an object of a given size with prescribed values) and for discrete boundary value problems such as Exercise 3.1.47. The canonical example is polynomial interpolation (Theorem 3.4.24). Section 4.2 extends it from square matrices to linear maps with .
3.4.5Polynomial interpolation
Two points in the plane with different first coordinates lie on exactly one line, the graph of a polynomial of degree at most . Three points with distinct first coordinates lie on exactly one graph of a polynomial of degree at most , as Exercise 3.1.37 found in one example. In general, through points with distinct first coordinates there passes exactly one graph of a polynomial of degree at most , and this holds over every field. The proof is an application of everything in this section.
Throughout, are distinct (the nodes) and are arbitrary (the values). We look for with
By Technique 3.1.9, write
a linear equation in . So (3.4.3) is a linear system of equations in unknowns, with the following coefficient matrix.
Definition 3.4.22 (Vandermonde matrix). For , the Vandermonde matrix
With and in , the conditions (3.4.3) say exactly that , where . The system is square, so by Technique 3.4.21 it is enough to show that forces , that is, that a polynomial of degree at most that vanishes at distinct points is the zero polynomial.
Intuition (Splitting off a root). The familiar reason is that each root of contributes a factor , and a polynomial of degree at most has room for at most such factors. We cannot multiply polynomials until Section 7.1, but we can split off the factor by hand, because of an identity in the field:
Summing these over the terms of shows that equals times the value at of an explicit polynomial of degree at most . If vanishes at , then vanishes at , and induction on takes over.
Uses. Definition 1.2.16 (Degree), Definition 1.2.17 (Evaluation), Proposition 1.1.17 (No zero divisors), induction on
We induct on . If , then is constant, and .
Let , and assume the lemma for . Write
Multiplying by , summing over , and collecting the terms with the same power (for a fixed , the index runs over ), we get
Let
We have shown that
For , since
Now , and for , splitting off the term ,
Hence , and
The recursion
Uses. Definition 3.4.22 (Vandermonde matrix), Definition 1.2.17 (Evaluation), Definition 1.2.16 (Degree), Definition 2.3.8 (Matrix–vector product), Lemma 3.4.23 (Too many roots), Corollary 3.4.20 (Square systems)
Techniques. Undetermined coefficients (Technique 3.1.9), Uniqueness gives existence (Technique 3.4.21)
Let and . For
So satisfies for all if and only if . Through , the polynomials we want correspond exactly to the solutions of .
Suppose . Then has degree at most and vanishes at the distinct points , so by Lemma 3.4.23, that is, . So the homogeneous system has only the trivial solution. Since is square, Corollary 3.4.20 ((iv) (vi) and (vii)) shows that has exactly one solution, and that is invertible. Hence there is exactly one polynomial with for all . □
The proof never solved anything. Existence came from uniqueness: conditions on unknown coefficients form a square system, and the homogeneous version asks for a polynomial with too many roots. Both hypotheses are needed. If two nodes coincide, say , then has two equal rows, and for there is no solution at all. And the degree bound is exactly right. With degree at most there are only unknowns for conditions, so by Corollary 3.4.19(b) some values cannot be interpolated. With degree at most there are unknowns, so by Corollary 3.4.19(a) the homogeneous system has a nontrivial solution and uniqueness fails (Figure 3.4.1; see also Exercise 3.4.39).
Example 3.4.25 (A cubic through four points). Find the polynomial with
With
The second equation gives , and the others become , , and . Adding the first two gives . Then and , so and . Hence
Check: , , , and .
Lagrange’s formula
The theorem gives the interpolating polynomial for each list of values separately. Linearity lets us do all of them at once: it is enough to interpolate the simplest values, a single and zeros elsewhere.
Definition 3.4.26 (Lagrange polynomials). Let be distinct. For , the th Lagrange polynomial is the unique polynomial of degree at most with
It exists and is unique by Theorem 3.4.24.
Proposition 3.4.27 (Lagrange’s formula). Let be distinct, and let . The unique with for all is
Uses. Definition 3.4.26 (Lagrange polynomials), Proposition 1.2.18 (Degree and evaluation versus the operations), Theorem 3.4.24 (Polynomial interpolation)
Techniques. Uniqueness via two candidates (Technique 1.1.8)
Let
So satisfies the same conditions as , and by the uniqueness in Theorem 3.4.24. □
Example 3.4.28 (Lagrange polynomials for the nodes ). For the nodes of Example 3.4.25, the Lagrange polynomials are
Each claim is checked by evaluating at the four nodes; for instance and . By Proposition 3.4.27, the cubic of Example 3.4.25 is
as before. Once polynomials can be multiplied (Section 7.1), each has the closed form
because the product has degree and takes the right values, so it is by uniqueness. For instance
Section 7.1 revisits interpolation from this side.
The Lagrange polynomials also describe . The coefficient vector of solves , since takes the value at and at the other nodes. So the columns of are the coefficient vectors of , and Lagrange’s formula is the equation
Finally, is a square matrix, so its invertibility can also be decided by a determinant. Section 5.5 computes
(Theorem 5.5.21), which is nonzero exactly when the nodes are distinct; by Theorem 5.4.7 this gives a second proof that is invertible.
- (a)Over , find the Lagrange polynomials for the nodes , and use them to find the with , , and .
- (b)Find the with the same three values, read in .
Uses. Definition 3.4.26 (Lagrange polynomials), Proposition 3.4.27 (Lagrange’s formula), Theorem 3.4.24 (Polynomial interpolation)
(a) Expanding the closed form of Example 3.4.28 suggests the candidates
We check the values directly. , , ; , , ; , , . Each has degree at most , so by the uniqueness in Theorem 3.4.24 these are the Lagrange polynomials. By Proposition 3.4.27,
Check: , , .
(b) In the nodes are still distinct, so there is exactly one such by Theorem 3.4.24. The polynomial has coefficients in , and its values are , , and in . So . (Reducing the answer over worked because the computation only divided by , , and , which are invertible in .)
Exercises
Exercise 3.4.30. Let
(a) Find all for which is consistent.
(b) For , write the solution set in the form
Uses. Algorithm 3.4.13 (Solving a linear system), Corollary 3.4.4 (Consistency), Theorem 3.4.9 (All solutions)
(a) Add times row to row and row to row . Then column vanishes below row , so the next pivot is in position ; add times row to row . Row already has a in column . The result is
So , and by Corollary 3.4.4 the system is consistent if and only if , that is, .
(b) For the last entry is , and the last column becomes . The pivot columns are and the free columns . Following Algorithm 3.4.13: has in positions , and the basic solutions come from columns , , of , which are , , . So
and the solution set is
Exercise 3.4.31. Let be the matrix of Exercise 3.3.40,
Solve over and over . Over , list all solutions, and compare their number with Corollary 3.4.14.
Uses. Algorithm 3.4.13 (Solving a linear system), Theorem 3.4.9 (All solutions), Corollary 3.4.14 (Counting solutions)
Pass adds times row to row , and pass adds times row to row and row to row :
Over . Pass scales row by , then adds row to row and times row to row , giving
The pivot columns are and is free. So , , and the solutions are for : infinitely many.
Over . Here and , so the last matrix above is
which is in RREF. The last entry of the right side is , so the system is consistent. The pivot variables are and the free variables , with and (again since ). The four choices of give the solutions
That is solutions, as Corollary 3.4.14(b) predicts with and .
Exercise 3.4.32. Over , consider
(a) Find all solutions in .
(b) For which is the system with these left sides and right side consistent?
(c) Which of the solutions in (a) lie in ?
Uses. Algorithm 3.4.13 (Solving a linear system), Corollary 3.4.4 (Consistency), Theorem 3.4.9 (All solutions)
Pass adds times row to row : the new row is
with right side . Then column vanishes below row , so pass uses the pivot in position and adds times row to row :
(a) For the right side is
Check: the left sides at are , , and .
(b) By Corollary 3.4.4, exactly when .
(c) The solution with parameter is . If it is real, then is real, and then is real only if . So is the only real solution. The complex solution set is a line in , and it meets in a single point.
Exercise 3.4.33. For in a field , consider the system
(a) For , find all for which the system has no solution, exactly one solution, and infinitely many solutions.
(b) Answer the same question for , and count the solutions in each case.
Uses. Algorithm 3.4.13 (Solving a linear system), Corollary 3.4.4 (Consistency), Corollary 3.4.14 (Counting solutions)
Adding times row to row and times row to row gives
Case . Rows and become and , and the left block is in RREF with one pivot. If , the system is inconsistent. If , it is consistent with free variables .
Case . Scale row by to get , and add times it to row , which becomes
If , this entry is a third pivot, and there are pivots in every column and every row; by Corollary 3.4.20 the system has exactly one solution. If , then since we have , and the last row is : the system is inconsistent if , and consistent with one free variable if .
(a) Over , means . So the system has exactly one solution if and ; no solution if or ; and infinitely many (by Corollary 3.4.14(c)) if or .
(b) Over , , so the case with never occurs. For : if there are solutions by Corollary 3.4.14(b), and if there are none. For and , equals and , both nonzero, so there is exactly one solution for every . The two exceptional values and of the real case collide in .
Exercise 3.4.34. Let be the matrix of Example 3.4.6, and . Two students describe the solution set of .
Student 1. “The solution set is
Student 2. The solution set is
- (a)Find the error in Student 1′s argument, and a solution that Student 1 has missed.
- (b)Decide whether Student 2 is right.
Uses. Theorem 3.4.9 (All solutions), Remark 3.4.12 (Checking a description of the solutions), Proposition 3.1.19 (Solution sets are translates of the kernel)
By Example 3.4.10, the solution set is with , , and .
(a) Student 1 showed that every vector of the line
(b) Student 2 is right. First,
so
lies in
Exercise 3.4.35. Let . Prove or disprove each statement.
- (a)If has exactly one solution for some , then has a pivot in every column.
- (b)If has only the trivial solution, then is consistent for every .
- (c)If has a pivot in every column, and is obtained from by deleting some of its columns, then has a pivot in every column.
- (d)If has a pivot in every row, and is obtained from by deleting some of its columns, then has a pivot in every row.
Uses. Corollary 3.1.22 (Uniqueness depends only on ), Proposition 3.4.15 (A pivot in every column), Proposition 3.4.16 (A pivot in every row), Definition 2.3.8 (Matrix–vector product)
(a) True. By Corollary 3.1.22(a), applied to the consistent system with exactly one solution, ; that is, has only the trivial solution. By Proposition 3.4.15, has a pivot in every column.
(b) False. Let be the matrix with the single column . Then is only for , but has no solution.
(c) True. By Proposition 3.4.15, we must show: if has a nontrivial solution, so does . Let consist of the columns of , and let with . Define by for and for the deleted columns . By Definition 2.3.8,
and . (In terms of columns: a sublist of a linearly independent list is linearly independent.)
(d) False. Let , which is in RREF with a pivot in its only row. Deleting the second column leaves , which has no pivot.
Exercise 3.4.36. Let be a finite field with elements, and let have pivots.
- (a)Show that is consistent for exactly vectors .
- (b)Each consistent system has solutions. Explain why is no coincidence.
Uses. Corollary 3.4.4 (Consistency), Corollary 3.4.14 (Counting solutions), Definition 2.5.12 (Invertible)
(a) Let be invertible with , and let
(b) By Corollary 3.4.14(b), each consistent system has solutions. Now count the pairs with . Each belongs to exactly one pair, namely , so there are pairs. On the other hand, grouping the pairs by , only the consistent occur, each in pairs. So , and the identity just says that the solution sets of the consistent systems partition .
Uses. Definition 3.4.8 (Basic solutions), Lemma 3.3.16 (Reading the columns of a matrix in RREF), Corollary 3.3.19 (Pivot columns, intrinsically), Definition 2.3.8 (Matrix–vector product)
Suppose is free, say , and consider the basic solution , which solves (Theorem 3.4.9). It has a in position , and in every other free position. In a pivot position it has the entry of , where is the entry in row of column ; this is by Lemma 3.3.16(a), since column lies to the left of the th pivot. So for all .
Conversely, suppose with and for . By Definition 2.3.8,
so
So the basic solutions are the “staircase” solutions: ends with a in position , followed only by zeros.
Exercise 3.4.38. Let be a subfield of a field (for example or ). Let and .
- (a)Show that if has a solution , then it has a solution in .
- (b)Show that if has exactly one solution in , then that solution lies in .
- (c)Show that if has a nontrivial solution in , then it has one in .
Uses. Exercise 3.3.54, Corollary 3.4.4 (Consistency), Theorem 3.4.9 (All solutions), Proposition 3.4.15 (A pivot in every column)
Run Gauss–Jordan elimination on , scanning only the first columns. Every step uses only additions, multiplications, and inverses of nonzero entries, all of which stay in , and whether an entry is does not depend on whether we regard it in or in . So the run is the same over and over (this is the argument of Exercise 3.3.54), and it produces the same matrix , with entries in , and the same pivot and free columns. Hence the particular solution (when the system is consistent) and the basic solutions are the same over both fields, and lie in .
(a) By Corollary 3.4.4, consistency over either field means for , the same condition. If the system has a solution in , this condition holds, so is a solution.
(b) If the solution in is unique, it is (which is a solution over ), and .
(c) If has a nontrivial solution in , then by Proposition 3.4.15 (over ) some column of is free, so , and is a nonzero solution.
Exercise 3.4.39. Let , let be distinct, let , and let be the matrix with rows , . Show that:
- (a) has a pivot in every column if and only if ;
- (b) has a pivot in every row if and only if .
Interpret both statements as statements about polynomials of degree at most with prescribed values at .
Uses. Lemma 3.4.23 (Too many roots), Theorem 3.4.24 (Polynomial interpolation), Proposition 3.4.15 (A pivot in every column), Proposition 3.4.16 (A pivot in every row), Corollary 3.4.19 (More unknowns than equations)
For let
(a) Suppose , and . Then has degree at most and vanishes at the distinct points , so by Lemma 3.4.23, and . By Proposition 3.4.15, has a pivot in every column. If , then has more columns than rows, and by Corollary 3.4.19(a) has a nontrivial solution, so some column of has no pivot.
(b) Suppose , and let . By Theorem 3.4.24 (with and the nodes ) there is a polynomial of degree at most with for all . Its coefficients, padded with zeros up to , form a solution of . So is consistent for every , and by Proposition 3.4.16 has a pivot in every row. If , then has more rows than columns, and by Corollary 3.4.19(b) some system is inconsistent, so some row of has no pivot.
In terms of polynomials: prescribing values at distinct points, a polynomial of degree at most with those values is unique (if it exists) exactly when , and exists for all choices of values exactly when . Both hold exactly when , which is Theorem 3.4.24.
Exercise 3.4.40. Let be a prime.
- (a)Show that every function is the polynomial function of exactly one polynomial . Check this by counting both sides.
- (b)Find that polynomial for the function with and for .
Uses. Theorem 3.4.24 (Polynomial interpolation), Exercise 1.1.51, Definition 1.2.17 (Evaluation)
(a) The elements of are distinct nodes. By Theorem 3.4.24 with and , there is exactly one with for all , that is, whose polynomial function is . Counting: there are functions (a value for each of inputs), and polynomials
(b) Let , which has degree at most . Then , and for Fermat’s little theorem (Exercise 1.1.51) gives , so . By the uniqueness in (a), is the polynomial.
Polynomials of degree at least are not needed to describe functions, and indeed has the zero function (Exercise 1.2.51); this does not contradict Lemma 3.4.23, since has degree and only roots are available.
Exercise 3.4.41. For each prime , find the number of
Uses. Theorem 3.4.24 (Polynomial interpolation), Definition 3.4.22 (Vandermonde matrix), Corollary 3.4.4 (Consistency)
The coefficient matrix has rows for , so it is , and the system asks for
If , the differences , , and are nonzero in , so the nodes are distinct, and by Theorem 3.4.24 there is exactly one solution. (Over it is , and the same computation works in for , where is invertible.)
If , then and in , so the third equation reads , while the first reads . Subtracting gives , so there is no solution. (In the language of Corollary 3.4.4: the reduced augmented matrix has a row .)
So the number of solutions is for every odd prime, and for .
Exercise 3.4.42. For
(a)Show that for all there is exactly one with
- (b)Find the four polynomials obtained when one of is and the others are , and write the general in terms of them.
Uses. Corollary 3.4.20 (Square systems), Definition 1.2.17 (Evaluation), Proposition 1.2.18 (Degree and evaluation versus the operations)
Techniques. Uniqueness gives existence (Technique 3.4.21)
(a) By Definition 1.2.17, the four conditions are
a square linear system in . By Corollary 3.4.20 it suffices to show that the homogeneous system has only the trivial solution. If all data are , then , so and ; subtracting twice the first from the second gives , and then . So for all data there is exactly one solution.
(b) Solving the four systems:
- : , , , , so , : .
- : , , , , so , : .
- : , , , so , : .
- : , , , so , : .
The four conditions depend linearly on : values by Proposition 1.2.18(c), and because its coefficients are linear in those of . So
(a)Find all such that
for every .
- (b)Show that the resulting rule is exact for every as well, but not for .
Uses. Proposition 1.2.18 (Degree and evaluation versus the operations), Corollary 3.4.20 (Square systems), Definition 1.2.16 (Degree)
Techniques. Undetermined coefficients (Technique 3.1.9)
(a) The integral and the right side both depend linearly on : the right side by Proposition 1.2.18(c), and the integral because and . So if the equation holds for , , and , it holds for every ; conversely it must hold for these three. Since , , and , the conditions are
The last two give , and the first gives . So the only rule is
Simpson’s rule. (The coefficient matrix of the system is the transpose of , which is invertible because is (Theorem 3.4.24, Proposition 2.4.23). This is why the weights exist and are unique for any three distinct nodes.)
(b) By linearity it is enough to check : the integral is , and the rule gives . For the integral is , while the rule gives .
Exercise 3.4.44. Let and .
- (a)Show that if the systems and have the same solution set, and it is nonempty, then the augmented matrices and are row equivalent.
- (b)Show by an example that (a) fails without the word “nonempty”.
Uses. Proposition 3.1.19 (Solution sets are translates of the kernel), Corollary 3.3.20 (The kernel is a complete invariant), Definition 3.2.21 (Row equivalence), Definition 2.5.12 (Invertible)
(a) Let be the common solution set and . By Proposition 3.1.19, and . So if and only if if and only if ; that is, . By Corollary 3.3.20, , so for a product of elementary matrices (Definition 3.2.21). Then
and therefore
(b) Take , , and the systems
Both are inconsistent, so they have the same (empty) solution set. Their augmented matrices are and . The first is in RREF, and the second reduces to , so their reduced row echelon forms differ and they are not row equivalent (Corollary 3.3.18(b)).
Exercise 3.4.45. Let
- (a)Describe a procedure that produces a linear system whose solution set is exactly
, and prove that it works. - (b)Carry it out over for , , and .
Uses. Corollary 3.4.4 (Consistency), Proposition 3.1.8 (Systems and the map ), Proposition 3.1.19 (Solution sets are translates of the kernel), Proposition 3.3.11 (Carrying extra columns along), Definition 2.4.1 (Matrix product)
Techniques. Reduce to RREF (Technique 3.3.22)
(a) Let have columns , so that
- Row reduce , scanning only the first columns, to (Proposition 3.3.11). Let be the number of pivots.
- If , output the empty system (or ): its solution set is .
- Otherwise, let consist of the last rows of , and output the system .
Correctness. The th entry of is the th entry of (Definition 2.4.1), so if and only if for all . By Corollary 3.4.4, applied to , this holds if and only if . So
(b) Here has rows , , , . Pass adds times row to row , which becomes . In pass , column has a in row , so rows and are swapped, and then times the new row , which is , is added to row :
So , and has rows and . Since , the system is
Check: satisfies both equations, and and satisfy the homogeneous ones. Its solution set has two free variables, and , matching the two parameters of . Part (a) of Exercise 3.1.41 found such a system by inspection; the procedure always works.
Exercise 3.4.46. Secret sharing. A secret is to be shared among people, where , so that any of them together can recover it, but any of them together learn nothing about it (). The dealer chooses at random, forms
- (a)Show that any people can compute from their shares.
- (b)Let be of the people, with shares . Show that for every there is exactly one choice of
for which a dealer with secret would have produced exactly these shares. Explain why this means that the people learn nothing about .
Uses. Theorem 3.4.24 (Polynomial interpolation)
Since , the elements of are distinct and nonzero.
(a) Suppose people pool their shares
(b) Fix . A dealer with secret who chose uses
The nodes are distinct, so by Theorem 3.4.24 there is exactly one such , and hence exactly one choice of .
If the dealer chooses uniformly at random, each of the choices has probability . By what we just proved, for each candidate secret exactly one of these choices produces the observed shares, so the observed shares are equally likely under every candidate secret. Seeing them gives no reason to prefer one value of over another. (This is Shamir’s secret sharing scheme.)
Uses. Theorem 3.4.24 (Polynomial interpolation), Definition 1.2.17 (Evaluation), Definition 1.2.16 (Degree), induction on
The polynomials exist and are unique by Theorem 3.4.24, since are distinct in . We induct on . For , and .
Let and write
where
we have
By the uniqueness in Theorem 3.4.24 (with the nodes ), . Therefore, using the induction hypothesis ,
as desired. (For instance takes the values at , and
More practice
The practice bank has 34 exercises on this section’s topics.