Recitation 2 · Week 2· 29:38
Problem Sheet 2, worked through
The marked problems of Sheet 2, 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 5 to 8.
Saved in this browser only. No account needed.
TranscriptThe full text of the recitation. Click any sentence to play the video from there.
Recitation 2
Welcome to the second recitation of Linear Algebra. This week we met lines and planes in space, the cross product, fields, and our first systems of linear equations. Today we put all of it to work. Problem Sheet two covers lectures five to eight. We will solve the six problems marked with the play symbol: problems five, six, seven, nine, eleven and thirteen. The other nine are for practice on your own, with full solutions in the solutions booklet. As always, pause the video and try each problem first, then watch how we do it. First, a quick recap of the week. A line through a point p, with direction d, is the set of points p plus t d, where t runs through all real numbers.
A plane in space has a normal vector n, which sticks straight out of it. A point x is on the plane exactly when n dot x equals n dot p, where p is any point of the plane. The cross product of two vectors in R three is orthogonal to both of them, and its length is the area of the parallelogram they span. So two directions inside a plane give us its normal vector. A field is a number system where we can add, subtract, multiply, and divide by anything that is not zero. The real numbers form a field, and so does Z p, the integers modulo a prime p.
A system of linear equations can be read in two pictures. In the row picture, each equation is a line or a plane, and we look for the points they share. In the column picture, we look for weights that combine the columns into the right hand side. And Gaussian elimination solves any system. Row operations bring the augmented matrix to row echelon form without changing the solutions, and back substitution then reads off the answer from the bottom up. Here is a strategy for today. Name the objects you are given. Translate the question into equations. Solve them, and check the answer. Then say what it means in the picture.
Problem 5: a line in space
Problem five. We are given two points, P equals (two, minus one, one), and Q equals (four, zero, minus two). Part a asks for the line through them, in parametric form. A line needs a point and a direction. For the point we take P. For the direction, we take the step from P to Q, which is Q minus P. We subtract one coordinate at a time. In the first coordinate, four minus two is two. In the second, zero minus minus one is one. In the third, minus two minus one is minus three. So the direction d is (two, one, minus three).
So the line is x equals P plus t d. Written out, its points are two plus two t, minus one plus t, and one minus three t, for every real number t. A line has many parametric forms. We could start at Q instead of P, or use any nonzero multiple of d as the direction, such as (minus two, minus one, three). They all describe the same set of points, so two answers that look different can both be right. At t equals zero we are at P, and at t equals one we are at Q. As t runs through all real numbers, the point runs along the whole line, in both directions.
Part b. Is the point R, (eight, two, minus eight), on the line? To find out, we look for one single value of t that produces all three coordinates. If there is one, R is on the line. The second coordinate is the simplest. Minus one plus t equals two gives t equals three. Now we check the other two coordinates with t equals three. Two plus six is eight, which matches. And one minus nine is minus eight, which matches too. So R is on the line.
Now the point S, (six, one, minus four). The second coordinate gives minus one plus t equals one, so t must be two. With t equals two, the first coordinate is two plus four, which is six. It matches. But the third coordinate is one minus six, which is minus five, not minus four. So S is not on the line. It misses by one unit in the third coordinate. A tip for these tests: solve for t from the easiest coordinate, then check all the others. One coordinate always gives some value of t. The question is whether the same t works in every coordinate.
Part c. Where does the line meet the plane x minus y plus z equals ten? A point of the line is on the plane when its coordinates satisfy the plane's equation. So we substitute the coordinates of the line into the equation. Substituting gives two plus two t, minus, minus one plus t, plus one minus three t, equals ten. Let's collect the terms. The numbers give two plus one plus one, which is four. The t terms give two t, minus t, minus three t, which is minus two t. So the equation becomes four minus two t equals ten, and t equals minus three.
We put t equals minus three back into the line. Two minus six is minus four. Minus one minus three is minus four. And one plus nine is ten. So the line meets the plane at (minus four, minus four, ten). Let's check. Minus four, minus minus four, plus ten, is ten. The point is on the plane. Part d. Now the plane x plus y plus z equals six. We substitute the line in the same way.
The numbers give two minus one plus one, which is two. And the t terms give two t, plus t, minus three t, which is zero. So the left side is two, for every value of t. The equation would say two equals six, which is false for every t. So no point of the line is on this plane. The line never meets it. Why? Look at the normal vector of the plane, (one, one, one). Its dot product with the direction d is two plus one minus three, which is zero. The direction of the line is orthogonal to the normal, so the line runs parallel to the plane.
Since the line is parallel to the plane, all its points are at the same distance from it. The distance formula from lecture five uses any point of the line, say P. It gives the absolute value of n dot P minus six, divided by the length of n. n dot P is two minus one plus one, which is two. So the distance is the absolute value of two minus six, which is four, divided by the square root of three. That is about two point three. So one substitution answers three different questions. If it gives one value of t, the line crosses the plane at one point. If it gives a false statement for every t, the line is parallel to the plane and misses it. And if it gives a true statement for every t, the whole line lies inside the plane.
For example, the plane x plus y plus z equals two contains our whole line, because the coordinates of every point of the line add up to two.
Problem 6: a plane through three points
Problem six. Three points, A equals (one, zero, one), B equals (two, two, one), and C equals (one, two, two). We want the plane through them, in normal form. For a normal form, we need a normal vector, one that is orthogonal to every direction in the plane. The cross product makes one from two directions in the plane. So first we find two directions. For the first direction, u is B minus A. Two minus one is one. Two minus zero is two. And one minus one is zero. So u is (one, two, zero).
For the second direction, v is C minus A. One minus one is zero. Two minus zero is two. And two minus one is one. So v is (zero, two, one). Now the cross product, one entry at a time. As in lecture five, we cover one row, and cross multiply the two rows that remain. For the first entry, cover the first row. Two times one, minus zero times two, is two.
For the second entry, cover the second row. One times one, minus zero times zero, is one. Flip the sign, and we get minus one. For the third entry, cover the third row. One times two, minus two times zero, is two. So n equals (two, minus one, two). Which way does n point? The cross product follows the right hand rule. Curl the fingers of your right hand from u towards v, and your thumb points along n. Any nonzero multiple of n, such as (minus two, one, minus two), is also a normal vector, and it gives the same plane.
Let's check that n is orthogonal to both directions. n dot u is two, minus two, plus zero, which is zero. n dot v is zero, minus two, plus two, which is zero. It is. The plane is n dot x equals n dot A. And n dot A is two plus zero plus two, which is four. So the plane is two x minus y plus two z equals four. We check the other two points. For B, four minus two plus two is four. For C, two minus two plus four is four. Both are on the plane.
Part b. The area of the triangle A B C. The length of the cross product is the area of the parallelogram with sides u and v. The length of n is the square root of four plus one plus four, the square root of nine, which is three. The triangle is half of the parallelogram, so its area is three halves. Part c. Is D, (zero, zero, two), in the same plane? With the equation, this takes one line. Zero minus zero plus four is four, so yes, D is in the plane.
And E, (one, one, one)? Two minus one plus two is three, not four. So E is not in the plane. Compare this with the parametric form, A plus s u plus t v. To test D that way, we would have to find s and t from three equations in two unknowns. The normal form needs only one substitution. That is its strength: it turns the question into a single test. Part d asks for the point of the plane closest to the origin. The shortest path from the origin to the plane runs straight along the normal vector. So we follow the line through the origin with direction n.
Its points are t times n: two t, minus t, and two t. We substitute them into the plane's equation. Two times two t, minus minus t, plus two times two t, is four t plus t plus four t, which is nine t. So nine t equals four, and t equals four ninths. The closest point is four ninths times n, which is (eight ninths, minus four ninths, eight ninths). Its distance from the origin is four ninths times the length of n, which is four ninths times three, or four thirds.
This matches the distance formula from lecture five: the absolute value of zero minus four, divided by three, is four thirds.
Problem 7: Gaussian elimination
Problem seven. We solve a system of three equations in three unknowns. x plus y plus z equals two. Two x plus three y plus z equals minus one. And x minus y plus two z equals nine. First we write the augmented matrix: one row for each equation, with its coefficients, and then, after the bar, its constant term. The first pivot is the one in the top left corner. We clear the entries below it, using replacements with row one.
The entry below the pivot, in row two, is two. So we replace row two by row two minus two times row one. Why two times row one? We want the two below the leading one to become zero, and two minus two times one is zero. We subtract from the whole row, not only from that entry, because each row stands for an equation, and an equation stays true only when all of it changes the same way. In the first column, two minus two is zero. In the second column, three minus two is one. In the third column, one minus two is minus one. And after the bar, minus one minus four is minus five.
In row three, the entry below the pivot is one, so we replace row three by row three minus row one. In the first column, one minus one is zero. In the second, minus one minus one is minus two. In the third, two minus one is one. And after the bar, nine minus two is seven. The first column is clear. The next pivot is the one in row two, column two. Below it is a minus two, so we replace row three by row three plus two times row two.
The first column stays zero. In the second column, minus two plus two is zero. In the third column, one plus two times minus one is minus one. And after the bar, seven plus two times minus five is minus three. A common slip is to forget the entries after the bar. A row operation acts on the whole row, because each row is a whole equation, with both of its sides. The matrix is now in row echelon form: a staircase, with zeros below the pivots. Now back substitution, from the bottom up.
The last row says minus z equals minus three, so z equals three. The second row says y minus z equals minus five. With z equal to three, y minus three is minus five, so y equals minus two. The first row says x plus y plus z equals two. So x minus two plus three equals two, which is x plus one equals two, and x equals one.
So the solution is (one, minus two, three). Let's check it in the original equations, not in the echelon form, so that a slip in the elimination would show up. In the first equation, one minus two plus three is two. In the second, two minus six plus three is minus one. In the third, one plus two plus six is nine. All three hold. Now the two pictures. In the row picture, each equation is a plane in space. The three planes meet in exactly one point, (one, minus two, three).
In the column picture, the solution gives the weights. One times the first column, minus two times the second, plus three times the third, should give the right hand side. First coordinate: one, minus two, plus three, is two. Second: two, minus six, plus three, is minus one. Third: one, plus two, plus six, is nine. That is (two, minus one, nine), exactly the right hand side. Notice that this column check is the same arithmetic as the row check, read in a different order. The two pictures describe one and the same system.
One more word on pivots. A pivot must be nonzero, because we divide by it to choose the multiple. If a pivot position holds a zero, swap in a row from below that has a nonzero entry there, as Problem ten on the sheet asks you to do. And if the whole column below is zero, we move on to the next column. That case is the start of next week.
Problem 9: one system, three fields
Problem nine. The system is two x plus y equals one, and x plus three y equals two. We solve it three times: over the real numbers, over Z seven, and over Z five. The first steps are the same in every field. To get a pivot of one, we swap the two rows. Then we replace row two by row two minus two times row one.
In the first column, two minus two is zero. In the second column, one minus six is minus five. And after the bar, one minus four is minus three. So the last row says minus five y equals minus three. So far we have only added, subtracted and multiplied whole numbers, and these steps are valid in every field. The three fields part ways at the last step, where we need to divide by minus five. Notice that the swap and the replacement are allowed in every field. A swap only reorders the equations. And a replacement adds a multiple of one equation to another, which uses nothing but addition and multiplication.
Over the real numbers, minus five y equals minus three gives y equals three fifths. Then the first row gives x equals two minus three y, which is two minus nine fifths, or one fifth. Let's check. Two times one fifth, plus three fifths, is five fifths, which is one. And one fifth plus nine fifths is ten fifths, which is two. So over the reals, x is one fifth and y is three fifths. Now Z seven, where we work modulo seven. Minus five is two, since five plus two is seven. And minus three is four. So the last row says two y equals four.
To divide by two, we multiply by its inverse. Two times four is eight, which is one modulo seven. So the inverse of two is four. If you do not remember an inverse, simply try the candidates. Two times one is two. Two times two is four. Two times three is six. And two times four is eight, which is one. So the inverse of two is four. In a small field, this search always works. Multiplying both sides by four gives y equals sixteen, which is two modulo seven. Then x equals two minus three times two, which is minus four. And minus four is three, modulo seven.
Let's check, modulo seven. Two times three, plus two, is eight, which is one. And three plus three times two is nine, which is two. So over Z seven, x is three and y is two. Finally, Z five. Modulo five, minus five is zero, and minus three is two. So the last row says zero times y equals two. That is, zero equals two. No value of y makes this true. So over Z five, the system has no solution at all.
We can see the contradiction directly in Z five. Multiply the second equation, x plus three y equals two, by two. That gives two x plus six y equals four, and six is one, modulo five. So it says two x plus y equals four. But the first equation says two x plus y equals one. The same left side cannot equal both one and four. In the row picture over Z five, the two lines are parallel, and they never meet. Why do the answers differ? Elimination does the same steps in every field. What changes is whether the second pivot, minus five, is zero. In the real numbers and in Z seven it is not zero, so we can divide by it. In Z five, minus five is zero, and the two equations contradict each other.
The lesson: a system of equations is not fully stated until we say which field its numbers come from.
Problem 11: proofs in a field
Problem eleven is about proofs. F is any field, and we may use the three facts proved in lecture six. Zero times a is zero. Minus one times a is minus a. And if a product is zero, one of its factors is zero. Part a. Prove that minus a, times minus b, equals a b. In other words, minus times minus is plus, in every field. Like the proofs in lecture six, this one leans on one axiom or fact in every step. It is short, but take it slowly, and feel free to pause or rewatch it, naming the reason for each line.
By the second fact, minus a is minus one times a, and minus b is minus one times b. Multiplication is associative and commutative, so we can regroup the four factors. The product becomes minus one times minus one, times a b. What is minus one times minus one? By the second fact again, with c equal to minus one, it is the negative of minus one.
And the negative of minus one is one, because one plus minus one is zero, and an element has only one negative. So minus a times minus b is one times a b, which is a b. That completes the proof. Let's test the result with numbers, in Z seven. Minus two is five, and minus three is four. Five times four is twenty, which is six modulo seven. And two times three is also six. So minus two times minus three equals two times three, even on a clock.
Part b. Prove that the only solutions of x squared equals one are one and minus one. First, both really are solutions. One times one is one. And minus one times minus one is one, by part a. Now suppose x squared equals one. Subtracting one from both sides gives x squared minus one equals zero.
The left side factors. Expanding x minus one, times x plus one, gives x squared, plus x, minus x, minus one, which is x squared minus one. So x minus one, times x plus one, equals zero. A field has no zero divisors, so one of the factors is zero. Either x minus one is zero, and x is one. Or x plus one is zero, and x is minus one. That completes the proof. Notice where the field did the work. Without the rule that a product is zero only when a factor is zero, the step from the factored form to the two solutions would fail. Part c shows that this really happens.
Part c. Let's look for the solutions of x squared equals one in Z eight, the integers modulo eight. We square each of the eight elements. Zero squared is zero, and one squared is one. Two squared is four. Three squared is nine, which is one. Four squared is sixteen, which is zero. Five squared is twenty five, which is one. Six squared is thirty six, which is four. And seven squared is forty nine, which is one.
So x squared equals one has four solutions: one, three, five and seven. In Z eight, minus one is seven. So three and five are neither one nor minus one. By part b, that cannot happen in a field. So Z eight is not a field. And we can see exactly where the proof of part b breaks. For x equal to three, x minus one is two, and x plus one is four. Two times four is eight, which is zero in Z eight. Two nonzero factors have the product zero, which is what a field forbids.
This matches the theorem from lecture six: Z n is a field exactly when n is prime. Eight is two times four, so it is not prime, and the factors two and four are exactly the zero divisors we just met.
Problem 13: true or false
Problem thirteen has three statements. For each one, we decide whether it is true. A true statement needs a proof, and a false one needs a counterexample. Statement a. Two replacements done at the same time: row one becomes row one plus row two, and row two becomes row two plus row one, both computed from the old rows. Does this keep the solution set? Let's test it on a very simple system: x equals one, and y equals two. Its only solution is (one, two).
Row one plus row two is the equation x plus y equals three. And row two plus row one is the same equation, x plus y equals three. So the new system is x plus y equals three, twice. It has many solutions, such as (zero, three), which does not solve the old system. Solutions were gained, so statement a is false. Compare this with doing the two operations one at a time. First, row one becomes row one plus row two: x plus y equals three. Then row two becomes row two plus the new row one: x plus two y equals five. That system, x plus y equals three and x plus two y equals five, still has only the solution (one, two).
What went wrong? Both old rows were replaced, so the information in them was lost, and the step cannot be undone. Every legal row operation can be undone by another one. In a replacement, the row we add stays as it is, so subtracting the same multiple undoes it. Statement b. A system over the real numbers, in three unknowns, has the solutions (one, one, one) and (two, two, two). Must (five, five, five) be a solution too? In lecture seven we proved that when a system has two different solutions, every point on the line through them is a solution. Is our point on that line?
Call the two solutions s and t. The difference t minus s is (one, one, one). So s plus four times the difference is (five, five, five). The point is on the line, with c equal to four. Let's redo the proof for this point. Write equation i as r i dot x equals b i, where r i is the row of coefficients of equation i. Then r i dot, s plus four times t minus s, equals r i dot s, plus four times, r i dot t minus r i dot s. Both s and t solve the equation, so this is b i, plus four times, b i minus b i, which is b i. So (five, five, five) solves every equation, and statement b is true.
The same argument works with any number c in place of four. So two solutions bring a whole line of solutions with them, as long as there are infinitely many numbers to choose c from. Statement c. Can a system over Z three have exactly three solutions? Over the real numbers, the answer would be no: zero, one, or infinitely many. But that proof used infinitely many values of c, and Z three has only three numbers.
Try the single equation x plus y equals one, over Z three. For each of the three values of x, there is exactly one y, namely one minus x. x equals zero gives y equals one. x equals one gives y equals zero. And x equals two gives y equals minus one, which is two. Check: two plus two is four, which is one modulo three. So this equation has exactly three solutions, and statement c is true. Over a finite field, the line through two solutions has only finitely many points.
So statement a is false, and statements b and c are true. Notice that b and c do not contradict each other. Statement b is about the real numbers, where there are infinitely many choices of c, and statement c is about Z three, where there are only three.
Wrapping up
That's all six problems. Let's collect the methods we used today. Before the summary, three slips to watch for. Changing two rows at once, as in Problem thirteen. Forgetting the number after the bar when you replace a row. And dividing by a number that has no inverse, such as zero, or two in Z eight. For a line, take a point and a direction. For a plane, find a normal vector with the cross product. To test a point, substitute it.
To solve a system, eliminate to row echelon form, then substitute back, and always check the answer in the original equations. In a field, divide by multiplying with an inverse. And in a proof, name the axiom or fact behind every step. The other nine problems on the sheet are for practice, and every one has a full solution in the solutions booklet. Try them before you look.
Next week, we push elimination further, to the reduced row echelon form, describe every solution of a system, and meet linear independence. See you in the lectures.
In this recitation
- Problem 5: a line in space
- Problem 6: a plane through three points
- Problem 7: Gaussian elimination
- Problem 9: one system, three fields
- Problem 11: proofs in a field
- Problem 13: true or false
- Wrapping up