Recitation 7 · Week 7· 34:15
Problem Sheet 7, worked through
The marked problems of Sheet 7, solved step by step on screen. Try them first; the rest of the sheet is for practice on your own, with full written solutions. Covers Lectures 25 to 28.
Saved in this browser only. No account needed.
TranscriptThe full text of the recitation. Click any sentence to play the video from there.
Recitation 7
Welcome to recitation seven. This week, lecture twenty five introduced coordinates: once we fix a basis, every vector becomes a column of numbers. Lecture twenty six defined the row space and the rank of a matrix, and proved that row rank equals column rank. Lecture twenty seven put the four fundamental subspaces together, and lecture twenty eight showed how coordinates change when we change the basis. Problem Sheet seven covers lectures twenty five to twenty eight. We will solve the eight problems marked with the play symbol: problems five to twelve. The other six are for practice on your own, with full solutions in the solutions booklet. As always, pause the video before each problem, and try it yourself first. Then watch how we do it, and compare.
First, a quick recap. If B is a basis of a vector space V, every vector v of V is a combination of the basis vectors in exactly one way. The weights, written as a column, form the coordinate vector of v in the basis B. The coordinate map sends each vector to its coordinate vector. It is linear, it is one to one, and every column in F n comes from some vector. So it matches V with F n, and any question about V can be answered with columns. For an m by n matrix A, the row space is the span of the rows. Row operations do not change it, so the nonzero rows of an echelon form are a basis of it. Its dimension equals the dimension of the column space, and this common number is the rank of A.
The four fundamental subspaces: the row space and the null space lie in F n, and their dimensions add up to n. The column space, and the null space of A transpose, also called the left null space, lie in F m, and their dimensions add up to m. Both facts are rank-nullity. And change of basis. The transition matrix from B to C has as its columns the C coordinates of the vectors of B. Multiplying by it turns B coordinates into C coordinates, and its inverse goes back. One habit carries us through today: translate, then compute. Turn the question into columns of numbers, and let row reduction do the work.
Problem 5: coordinates of symmetric matrices
Problem five. S is the space of symmetric two by two real matrices, and B is a list of three symmetric matrices: S one, S two and S three. Part a asks us to show that S has dimension three, and that B is a basis of S. Write E i j for the matrix with a one in row i, column j, and zeros everywhere else. A symmetric two by two matrix has the same entry in both positions off the diagonal. So it splits as a times E one one, plus b times, E one two plus E two one, plus d times E two two. These three matrices are independent, because each one has a nonzero entry where the other two have zeros. So they form a basis of S, and S has dimension three.
Now the list B. Each of the three matrices is symmetric, so it lies in S. Suppose a S one, plus b S two, plus c S three, is the zero matrix. We work out this combination entry by entry. The top left entry is a plus c. Both entries off the diagonal are a plus b. And the bottom right entry is b plus c. All three must be zero. Adding the three equations gives two times, a plus b plus c, equals zero. So a plus b plus c is zero. Take away a plus c, which is zero, and b is left: b is zero. In the same way, c is zero, and a is zero.
So the three matrices are independent. And three independent vectors in a space of dimension three form a basis. We never had to check that they span. Part b asks for the coordinates of A, the matrix with first row (five, three), and second row (three, zero). We look for weights a, b and c with a S one, plus b S two, plus c S three, equal to A. The same three equations appear, now with the entries of A on the right: a plus c equals five, a plus b equals three, and b plus c equals zero.
Adding them gives two times, a plus b plus c, equals eight, so a plus b plus c is four. Then c is four minus three, which is one. a is four minus zero, which is four. And b is four minus five, which is minus one. So the coordinate vector of A in the basis B is (four, minus one, one). Check: four S one, minus S two, plus S three. The top left entry is four minus zero plus one, which is five. Off the diagonal, four minus one plus zero is three. And the bottom right entry is zero minus one plus one, which is zero. That is A.
Part c gives three more symmetric matrices, T one, T two and T three, and asks whether they are independent. Instead of working with the matrices, we translate to coordinates. For each matrix, we solve the same three equations, with its entries on the right. For T one, the right sides are one, two and one. They add up to four, so a plus b plus c is two. Then c is two minus two, which is zero, a is two minus one, which is one, and b is two minus one, which is one. So T one has coordinates (one, one, zero). For T two, the right sides are one, one and two, and a plus b plus c is again two. So c is one, a is zero, and b is one: T two has coordinates (zero, one, one).
For T three, the right sides are minus one, zero and minus three, so a plus b plus c is minus two. Then c is minus two, a is one, and b is minus one: T three has coordinates (one, minus one, minus two). The coordinate map is linear and one to one. So a list in S is independent exactly when the list of its coordinate vectors is independent in R three. We put the three coordinate vectors into a matrix as its columns, and row reduce. First, row two minus row one. In the first column, one minus one is zero. In the second, one minus zero is one. In the third, minus one minus one is minus two.
Then row three minus row two. Zero minus zero is zero. One minus one is zero. And minus two minus minus two is zero. Column three has no pivot. So the coordinate vectors are dependent, and so are T one, T two and T three. The echelon form also shows the relation. Its third column, (one, minus two, zero), is its first column, minus two times its second. Row operations do not change which combinations of the columns give zero, so the same relation holds for the coordinate vectors. Translated back to matrices: T three equals T one, minus two T two.
Check it with the matrices themselves. T one minus two T two: top left, one minus two is minus one. Off the diagonal, two minus two is zero. Bottom right, one minus four is minus three. That is T three. Part d asks which matrix has coordinates (two, zero, minus one). Here there is nothing to solve. It is two S one, minus S three: the matrix with first row (one, two), and second row (two, minus one).
Problem 6: row space and rank
Problem six. A is the four by three matrix shown here. Part a asks us to row reduce A to an echelon form U, and to find the rank of A, a basis of its row space, and a basis of its column space. Row two minus two times row one: two minus two is zero, four minus four is zero, and three minus two is one. Row three minus three times row one: three minus three is zero, six minus six is zero, and four minus three is one.
And row four minus row one: one minus one is zero, two minus two is zero, and two minus one is one. Now rows three and four both equal row two, so subtracting row two from each of them leaves two zero rows. This is the echelon form U, with pivots in columns one and three. Two pivots, so the rank of A is two. The nonzero rows of U, u one equals (one, two, one), and u two equals (zero, zero, one), form a basis of the row space. For the column space, we take the pivot columns of A itself, not of U: the first column, (one, two, three, one), and the third column, (one, three, four, two).
Part b asks us to write each row of A as a combination of u one and u two. A combination a u one plus b u two is the vector (a, two a, a plus b). So a is the first entry of the row, and a plus b is its last entry. Row one is u one. Row two is two u one plus u two. Row three is three u one plus u two. And row four is u one plus u two. Part c asks us to show that U and A have the same row space, but different column spaces. Every row operation replaces a row by a combination of rows. So every row of U is a combination of rows of A, and the row space of U lies inside the row space of A.
Row operations can be undone by row operations. So in the same way, the row space of A lies inside the row space of U, and the two row spaces are equal. The column spaces are not equal. Every column of U has third entry zero. So every vector in the column space of U, as a combination of these columns, has third entry zero too. But the first column of A, (one, two, three, one), has third entry three. So it lies in the column space of A, but not in the column space of U. Row operations keep the row space, but they can change the column space.
They do keep its dimension, though: both column spaces have dimension two. Part d asks us to row reduce A transpose, and to compare its rank with the rank of A. A transpose has three rows and four columns. Row two minus two times row one is the zero row. Row three minus row one is (zero, one, one, one). Swap rows two and three, and we have an echelon form with two pivots. So A transpose has rank two, the same as A, just as row rank equals column rank promises.
Problem 7: the four fundamental subspaces
Problem seven. A is the three by four matrix shown here. Part a asks for the reduced row echelon form of A, and its rank. Row two minus two times row one: (zero, zero, one, two). Row three minus three times row one: (zero, zero, one, two), the same row. Subtracting row two from row three leaves a zero row. This matrix R is already in reduced row echelon form, with pivots in columns one and three. So the rank of A is two.
Part b asks for a basis of each of the four fundamental subspaces, and in which space each one lies. We start in R four. The row space has as its basis the two nonzero rows of R: (one, two, zero, one), and (zero, zero, one, two). For the null space, read the equations off R: x one equals minus two x two, minus x four, and x three equals minus two x four. With x two equal to s, and x four equal to t, both free, we get x equals s times (minus two, one, zero, zero), plus t times (minus one, zero, minus two, one). These two vectors are a basis of the null space: each one has a one in a free position, where the other has a zero.
Now in R three. The column space has as its basis the pivot columns of A: the first column, (one, two, three), and the third column, (zero, one, one). The columns of A transpose are the rows of A. So A transpose times y equals zero says that y one times row one, plus y two times row two, plus y three times row three, is zero. Look at the rows of A: row one plus row two is (three, six, one, five), which is row three. So y equals (one, one, minus one), is a solution. And the null space of A transpose has dimension three minus two, which is one. So this vector alone is a basis.
Part c asks us to check rank-nullity in both spaces. In R four, the row space and the null space have dimensions two and two, which add up to four, the number of columns. In R three, the column space and the left null space have dimensions two and one, which add up to three, the number of rows. Part c also asks for dot products, first with the rows of A. The vector (minus two, one, zero, zero), dotted with the first row is minus two plus two, which is zero. Dotted with the second row, it is minus four plus four, which is zero. The vector (minus one, zero, minus two, one), dotted with the first row is minus one plus one, which is zero. Dotted with the second row, it is minus two, minus two, plus four, which is zero. This is no accident. A x equals zero says exactly that x has dot product zero with every row of A. Row three is the sum of the first two rows, so it gives zero as well.
In the same way, the vector (one, one, minus one), has dot product zero with every column of A. With the first column, one plus two minus three is zero. With the second, two plus four minus six is zero. With the third, zero plus one minus one is zero. And with the fourth, one plus four minus five is zero. Part d asks us to use the left null space to find the b for which A x equals b can be solved. If A x equals b, then b is a combination of the columns of A. Every column has dot product zero with y, so b does too: b one plus b two minus b three must be zero. Conversely, the vectors with b one plus b two minus b three equal to zero form a plane in R three, of dimension two. This plane contains the column space, which also has dimension two. So the plane is the column space, and A x equals b can be solved exactly when b one plus b two minus b three is zero.
Here is that plane in R three. All four columns of A lie in it, and y stands straight out of it, because y has dot product zero with every vector of the plane. Part d also asks us to solve A x equals (one, three, four). One plus three minus four is zero, so the system can be solved. The same row operations on the augmented matrix turn b into (one, one, zero). Read off the rows: x one plus two x two plus x four is one, and x three plus two x four is one. So x one is one minus two s minus t, and x three is one minus two t. The solutions are (one, zero, one, zero), plus any vector of the null space.
Check: A times (one, zero, one, zero), is column one plus column three. In the first entry, one plus zero is one. In the second, two plus one is three. In the third, three plus one is four.
Problem 8: two grids in the plane
Problem eight. In R two we have two bases. B has b one equals (one, one), and b two equals (minus one, one). C has c one equals (one, zero), and c two equals (one, one). Part c asks us to draw the grid of each basis, so we start there. The grid of B is made of lines along b one and b two. And the grid of C is made of lines along c one and c two. Part a asks for the transition matrix from B to C. Its columns are the C coordinates of b one and b two. A combination a c one plus b c two is the vector (a plus b, b).
For b one, equal to (one, one): b is one, and a plus b is one, so a is zero. So b one has C coordinates (zero, one). Indeed, b one is c two. For b two, equal to (minus one, one): b is one, and a plus b is minus one, so a is minus two. So b two has C coordinates (minus two, one). On the grid of C: two steps back along c one, and one step along c two. These two columns form the transition matrix: its first row is (zero, minus two), and its second row is (one, one).
Part b says that v has B coordinates (two, one), and asks for v and its C coordinates. So v is two b one, plus b two. On the grid of B: two steps along b one, then one step along b two. That is the point (one, three). Its C coordinates come from the transition matrix. In the first entry, zero times two, plus minus two times one, is minus two. In the second, one times two, plus one times one, is three. So v has C coordinates (minus two, three). On the grid of C: two steps back along c one, then three steps along c two. We arrive at the same point, (one, three).
That finishes part c: the same point, with different coordinates in the two grids. Check: minus two times (one, zero), plus three times (one, one), gives the point (one, three). Part d asks for the transition matrix from C to B, and to use it to get back the B coordinates of v. It is the inverse of the matrix from B to C. The inverse formula for two by two matrices, from lecture sixteen, divides by a d minus b c, which here is zero times one, minus minus two times one: two. So the inverse is one half times the matrix with first row (one, two), and second row (minus one, zero). Its columns, with the factor one half, are the B coordinates of c one and c two: (one half, minus one half), and (one, zero).
Apply it to the C coordinates of v. In the first entry, one times minus two, plus two times three, is four. In the second, minus one times minus two, plus zero, is two. Taking half of (four, two), we get the vector (two, one): the B coordinates we started from.
Problem 9: Taylor coordinates for polynomials
Problem nine. In P two of R, E is the standard basis: one, x, x squared. C is a second basis: one, x minus two, and x minus two squared. Lecture twenty eight expanded around one. Here we use powers of x minus two instead. Part a asks for the transition matrix from C to E. Its columns are the E coordinates of the vectors of C, that is, their ordinary coefficients. The polynomial one has coefficients (one, zero, zero). x minus two is minus two plus x, with coefficients (minus two, one, zero). And x minus two squared is four minus four x plus x squared, with coefficients (four, minus four, one).
Part b asks for the transition matrix from E to C, by writing one, x and x squared in powers of x minus two, and for a check that the product of the two matrices is the identity. Use a trick: x is, x minus two, plus two. So one is just one. x is two plus, x minus two. And x squared is, x minus two plus two, squared, which is four, plus four times, x minus two, plus x minus two squared. So one, x and x squared are all combinations of the vectors of C. So C spans P two, and three vectors that span a space of dimension three form a basis. Their C coordinates are (one, zero, zero), and (two, one, zero), and (four, four, one). These are the columns of the transition matrix from E to C.
Check that the product of the two matrices is the identity. The first column is one, zero, zero. In the second column, minus two plus two is zero. In the third column, the first entry is four minus eight plus four, which is zero, and the second entry is minus four plus four, which is zero. And the last entry is one. So the two transition matrices are inverses of each other, as they must be. Part c asks for the C coordinates of p, two minus x plus three x squared, and for a check by expanding. Its E coordinates are (two, minus one, three).
Multiply by the transition matrix from E to C. The first entry is two, minus two, plus twelve, which is twelve. The second is minus one plus twelve, which is eleven. The third is three. So p is twelve, plus eleven times, x minus two, plus three times, x minus two squared. Check by expanding. Twelve, plus eleven x minus twenty two, plus three x squared minus twelve x plus twelve. The constants give twelve minus twenty two plus twelve, which is two. The x terms give eleven minus twelve, which is minus one. And three x squared stays. That is p.
The first coordinate, twelve, is the value of p at two. If you know some calculus: the second coordinate is the slope of p at two, and the third is half its second derivative there. These are Taylor coordinates.
Problem 10: rank by cases
Problem ten. The matrix A has a parameter h in two of its entries. Part a asks for the rank of A for every value of h. Row two minus two times row one: two minus two is zero, then h minus four, and three minus two is one. Row three minus row one: one minus one is zero, two minus two is zero, and h minus one, minus one, is h minus two.
Now the matrix is upper triangular, with diagonal entries one, h minus four, and h minus two. If neither h minus four nor h minus two is zero, there are three pivots, and the rank is three. In week nine, the determinant will find these two special values of h in a single formula. If h is four, then h minus four is zero, so the second row becomes (zero, zero, one), and the third row becomes (zero, zero, two). Subtracting twice row two from row three leaves a zero row: two pivots, so the rank is two. If h is two, then h minus two is zero, so the second row is (zero, minus two, one), and the third row is zero. Again two pivots, and the rank is two.
Part b asks, for each h where the rank drops, for the dimensions of the four fundamental subspaces, and a basis of each null space. When the rank is two, the row space and the column space have dimension two, and the null space and the left null space have dimension three minus two, which is one. For h equals four, the rows (one, two, one), and (zero, zero, one), give x three equals zero, and x one equals minus two x two. So the null space is the line through (minus two, one, zero). The left null space is the null space of A transpose, so we row reduce A transpose. Its rows are the columns of A: (one, two, one), and (two, four, two), and (one, three, three). Row two minus two times row one is zero, and row three minus row one is (zero, one, two).
So y two plus two y three is zero, and y one plus two y two plus y three is zero. Take y three equal to one. Then y two is minus two, and y one is four minus one, which is three. So y is (three, minus two, one): three times row one of A, minus two times row two, plus row three, is zero. Check, entry by entry. In the first entry, three minus four plus one is zero. In the second, six minus eight plus two is zero. In the third, three minus six plus three is zero. So the left null space is the line through (three, minus two, one). For h equals two, the rows (one, two, one), and (zero, minus two, one), give x two equals half of x three, and x one equals minus two x two, minus x three. Taking x three equal to two avoids fractions: the null space is the line through (minus four, one, two).
And for h equals two, rows one and three of A are equal: both are (one, two, one). So row one minus row three is zero, and the left null space is the line through (one, zero, minus one). Notice the pattern: when the rank drops by one, both null spaces grow by one, together. That is rank-nullity, on both sides of the matrix.
Problem 11: true or false
Problem eleven: five statements, true or false. A true statement needs a proof, and a false one needs a counterexample. Statement a says: if A is a five by three matrix, then the null space of A transpose contains a nonzero vector. A transpose is three by five. Its rank equals the rank of A, which is at most three, since A has only three columns. By rank-nullity for A transpose, which has five columns, its null space has dimension five minus the rank, which is at least two. So it is true.
Statement b says: row operations do not change the column space of a matrix. False. Take the matrix with the single column (one, one). Its column space is the line through (one, one). Subtract row one from row two, and the column becomes (one, zero). Now the column space is the line through (one, zero): a different line. What row operations do keep is the row space, the null space, and the rank.
Statement c says: a four by six matrix can have a null space of dimension one. False. A four by six matrix has at most one pivot in each row, so its rank is at most four. By rank-nullity, its null space has dimension six minus the rank, which is at least two. Statement d says: if A is m by n, B is n by p, and A B is the zero matrix, then the rank of A plus the rank of B is at most n.
True. Column j of A B is A times column j of B, and it is zero. So every column of B lies in the null space of A, and so does their span: the column space of B lies inside the null space of A. A subspace has at most the dimension of the space that contains it. So the rank of B is at most the dimension of the null space of A, which is n minus the rank of A, by rank-nullity. Move the rank of A to the other side, and we are done. Statement e says: if B and C are bases of V, and the transition matrix from B to C is the identity, then B equals C.
True. Column j of the transition matrix is the C coordinate vector of b j. Column j of the identity is e j. So b j is zero times c one, plus and so on, plus one times c j, plus zeros: b j equals c j, for every j.
Problem 12: rank of a product
Problem twelve. A is an m by n matrix, and B is an n by p matrix. The book's supplement to Section five point two proves that the rank of the product A B is at most the rank of each factor. We prove it again, with a different idea for the second inequality, and use it to see that row operations keep the rank. Part a asks us to prove that the column space of A B lies inside the column space of A, and to deduce that the rank of A B is at most the rank of A. Column j of A B is A times b j, where b j is column j of B. And A times b j is a combination of the columns of A, with the entries of b j as weights. So it lies in the column space of A. So every column of A B lies in the column space of A. The column space of A is a subspace, so it also contains every combination of these columns: the column space of A B lies inside the column space of A.
A subspace has at most the dimension of the space that contains it. So the rank of A B is at most the rank of A. Part b asks us to prove that the rank of A B is at most the rank of B, using part a, and the fact that a matrix and its transpose have the same rank. It is a short step, but a clever one, so take it slowly, and pause or rewatch it if you need to. Part a only compares a product with its first factor, so we turn the product around with the transpose. The rank of A B equals the rank of its transpose, because row rank equals column rank. The transpose of A B is B transpose times A transpose.
Now part a applies to this product, whose first factor is B transpose. So its rank is at most the rank of B transpose, which is the rank of B. Done. Part c lets P be an invertible m by m matrix, and asks us to prove that the rank of P A equals the rank of A, so that row operations keep the rank. By part b, the rank of P A is at most the rank of A. And A equals P inverse times P A. So by part b again, the rank of A is at most the rank of P A. The two inequalities together give equality.
A row operation turns A into E A, where E is the elementary matrix of that operation, and E is invertible. So each row operation keeps the rank, and so does any sequence of them.
Wrap-up
Let's collect what today's problems taught us. Coordinates translate a question about matrices or polynomials into a question about columns in F n. Independence, spanning and relations all carry over, both ways. For the row space, row reduce, and keep the nonzero rows. For the column space, keep the pivot columns of the original matrix.
The four fundamental subspaces come in two pairs. In F n, the row space and the null space. In F m, the column space and the left null space. In each pair, the dimensions add up to the size of the space. The left null space tells us which right-hand sides can be reached: A x equals b can be solved exactly when b has dot product zero with every vector of the null space of A transpose. And a transition matrix is built column by column: column j holds the new coordinates of the j-th old basis vector.
Before we finish, here are five mistakes that come up again and again with this week's material. Watch for them in your own work. First, taking the pivot columns of the echelon form as a basis of the column space. Row operations change the column space, so take the pivot columns of the original matrix. Second, getting the transition matrix backwards. The columns of the matrix from B to C are the C coordinates of the B vectors, not the other way round.
Third, mixing up where the subspaces live. For an m by n matrix, the null space lies in F n, but the column space lies in F m. Fourth, forgetting the order of the basis. A coordinate vector depends on the order of the basis vectors, so a basis is a list, not just a set. Fifth, thinking that a vector changes when its coordinates change. The vector stays put. Only its description changes, from one grid to another.
Keep these five in mind, and most of the sheet will go smoothly. The rest of sheet seven is yours to try. Problems one to four are warm ups. Problem thirteen splits a matrix into pieces of rank one, and problem fourteen builds a code over Z two that corrects one error. Full solutions are in the solutions booklet. This week closes the first half of the course, so before week eight comes the midterm practice exam. It covers weeks one to seven, and it comes with full solutions. Give yourself three hours, and try it as if it were the real exam.
Then, in lectures twenty nine to thirty two, we study linear maps between any two vector spaces, their kernels and images, and the matrix of a linear map in a pair of bases. See you there.
In this recitation
- Problem 5: coordinates of symmetric matrices
- Problem 6: row space and rank
- Problem 7: the four fundamental subspaces
- Problem 8: two grids in the plane
- Problem 9: Taylor coordinates for polynomials
- Problem 10: rank by cases
- Problem 11: true or false
- Problem 12: rank of a product
- Wrap-up and the midterm practice exam