1 00:00:05,564 --> 00:00:06,480 MARTINA BALAGOVIC: Hi. 2 00:00:06,480 --> 00:00:08,010 Welcome to recitation. 3 00:00:08,010 --> 00:00:10,590 Today's problem is about change of basis. 4 00:00:10,590 --> 00:00:13,030 It says the vector space of polynomials 5 00:00:13,030 --> 00:00:18,725 in x of degree up to 2 has a basis 1, x, and x squared. 6 00:00:18,725 --> 00:00:20,350 That's the obvious basis that you would 7 00:00:20,350 --> 00:00:22,260 write for that vector space. 8 00:00:22,260 --> 00:00:25,150 But today we're going to consider another basis, w_1, 9 00:00:25,150 --> 00:00:26,910 w_2, and w_3. 10 00:00:26,910 --> 00:00:30,310 And we don't know what w_1, w_2, and w_3 are explicitly. 11 00:00:30,310 --> 00:00:33,860 What we know is that their values at x 12 00:00:33,860 --> 00:00:38,270 equals minus 1, 0, and 1 are given by this table here. 13 00:00:38,270 --> 00:00:43,920 So they are 1, 0, 0; 0, 1, 0; and 0, 0, 1. 14 00:00:43,920 --> 00:00:45,740 We're asked to do the following. 15 00:00:45,740 --> 00:00:48,800 We're asked to express this polynomial-- so y 16 00:00:48,800 --> 00:00:54,160 of x is minus x plus 5-- in this basis, w_1, w_2, w_3. 17 00:00:54,160 --> 00:00:56,100 We're asked to find the change of basis 18 00:00:56,100 --> 00:01:00,180 matrices between these two bases, 1, x, x squared, 19 00:01:00,180 --> 00:01:02,850 and w_1, w_2, w_3. 20 00:01:02,850 --> 00:01:05,440 And finally, we're asked to find the matrix of taking 21 00:01:05,440 --> 00:01:08,200 derivatives, which is a linear map on this space, 22 00:01:08,200 --> 00:01:10,500 in both of these basis. 23 00:01:10,500 --> 00:01:15,200 And let me give you an extra level of challenge, which 24 00:01:15,200 --> 00:01:18,800 is to try to do as much of this as possible without explicitly 25 00:01:18,800 --> 00:01:21,910 finding w_1, w_2, and w_3. 26 00:01:21,910 --> 00:01:23,410 I'll let you think about the problem 27 00:01:23,410 --> 00:01:25,650 and then you can come back and compare your solution 28 00:01:25,650 --> 00:01:26,150 with mine. 29 00:01:33,710 --> 00:01:34,230 Hi. 30 00:01:34,230 --> 00:01:35,370 Welcome back. 31 00:01:35,370 --> 00:01:40,990 So to start with the problem a, we 32 00:01:40,990 --> 00:02:02,550 need to find coefficients alpha, beta, and gamma so that y of x 33 00:02:02,550 --> 00:02:05,740 is expressed through, with this coefficient, 34 00:02:05,740 --> 00:02:08,940 in this new basis, w_1, w_2, and w_3. 35 00:02:08,940 --> 00:02:11,610 now, one way to do that would be to look 36 00:02:11,610 --> 00:02:15,230 at this table of values, explicitly 37 00:02:15,230 --> 00:02:21,320 find w_1, w_2, and w_3, so a quadratic polynomial is-- 38 00:02:21,320 --> 00:02:22,820 all the information we need about it 39 00:02:22,820 --> 00:02:26,740 is in values at three points. 40 00:02:26,740 --> 00:02:34,110 So say w_1 is a*1 plus b times x plus c times x squared. 41 00:02:34,110 --> 00:02:35,560 Find a, b, and c. 42 00:02:35,560 --> 00:02:40,230 Find w_1, w_2, w_3 explicitly, and then go back to this system 43 00:02:40,230 --> 00:02:43,220 and try to find alpha, beta and gamma. 44 00:02:43,220 --> 00:02:45,420 However, there's a trick. 45 00:02:45,420 --> 00:02:48,480 Let's try to see if we can do it without finding 46 00:02:48,480 --> 00:02:50,830 w_1, w_2, and w_3 explicitly. 47 00:02:50,830 --> 00:02:55,010 So let me try to see what are the values of y 48 00:02:55,010 --> 00:02:56,060 at these points. 49 00:02:56,060 --> 00:02:58,870 So y is minus x plus 5. 50 00:02:58,870 --> 00:03:05,300 So the values are 6, 5, and 4. 51 00:03:05,300 --> 00:03:09,300 And let me, instead of considering this equation, 52 00:03:09,300 --> 00:03:18,840 let me evaluate it at x is minus 1, x is 0, and x is 1. 53 00:03:18,840 --> 00:03:26,660 What I get through this is that w at minus 1-- actually, 54 00:03:26,660 --> 00:03:27,480 let me write this. 55 00:03:30,420 --> 00:03:35,120 I get w at minus 1, which is a number, 56 00:03:35,120 --> 00:03:40,970 equals alpha times w_1 at minus 1, 57 00:03:40,970 --> 00:03:45,870 which is a number, plus beta times w_2 at minus 1, 58 00:03:45,870 --> 00:03:51,100 plus gamma times w_3 at minus 1. 59 00:03:51,100 --> 00:03:58,110 And similarly at 0, and similarly at 1. 60 00:03:58,110 --> 00:04:02,090 And now, let me think of this as a linear system that 61 00:04:02,090 --> 00:04:05,850 has unknowns alpha, beta, and gamma 62 00:04:05,850 --> 00:04:11,120 coefficients, these values here at minus 1, 0, and 1. 63 00:04:11,120 --> 00:04:12,840 And the right-hand side, well, what's 64 00:04:12,840 --> 00:04:16,500 written here on the left-hand side. y at minus 1, y at 0, 65 00:04:16,500 --> 00:04:18,640 and y at 1. 66 00:04:18,640 --> 00:04:24,350 If you write this in a matrix and read off coefficients 67 00:04:24,350 --> 00:04:26,740 from there, you get the following system. 68 00:04:33,210 --> 00:04:38,380 So this is the matrix of the system read off from here. 69 00:04:38,380 --> 00:04:39,350 These are the unknowns. 70 00:04:42,480 --> 00:04:48,699 And these are the values of the right-hand side. 71 00:04:48,699 --> 00:04:50,990 And I hope you'll agree that this is a very easy system 72 00:04:50,990 --> 00:04:51,490 to solve. 73 00:04:51,490 --> 00:04:55,900 We just get alpha is 6, beta is 5, and gamma is 4. 74 00:04:55,900 --> 00:05:02,670 So the solution to the first part is y equals 6*w_1 plus 75 00:05:02,670 --> 00:05:08,420 5*w_2 plus 4*w_3. 76 00:05:08,420 --> 00:05:10,510 And let's notice another thing. 77 00:05:10,510 --> 00:05:14,180 No matter what values we put here, 78 00:05:14,180 --> 00:05:16,080 this matrix is always going to stay the same. 79 00:05:16,080 --> 00:05:18,570 It's only the right-hand side that's going to change. 80 00:05:18,570 --> 00:05:22,110 So if we're given any other polynomial 81 00:05:22,110 --> 00:05:25,245 now to express in a basis w_1, w_2, and w_3, 82 00:05:25,245 --> 00:05:26,620 we don't have to do any thinking. 83 00:05:26,620 --> 00:05:28,410 We don't have to do any computations. 84 00:05:28,410 --> 00:05:30,890 What we do is go back to our table at the beginning 85 00:05:30,890 --> 00:05:33,170 and just read off-- let's go back to the table, 86 00:05:33,170 --> 00:05:35,640 and just read these values. 87 00:05:35,640 --> 00:05:39,940 So in this case, y is 6 times w_1, 5 times w_2, 88 00:05:39,940 --> 00:05:40,960 and 3 times w_3. 89 00:05:43,530 --> 00:05:45,660 And that's already a hint to solving 90 00:05:45,660 --> 00:05:48,170 the b part, which is find the change of basis 91 00:05:48,170 --> 00:05:53,930 matrices between 1, x, x squared and w_1, w_2, w_3. 92 00:05:53,930 --> 00:05:56,060 Change of basis matrices means expressing 93 00:05:56,060 --> 00:05:58,180 one basis in terms of another. 94 00:05:58,180 --> 00:06:00,620 So as a part of the problem, we will 95 00:06:00,620 --> 00:06:04,110 have to express 1, x, and x squared 96 00:06:04,110 --> 00:06:06,930 in terms of w_1, w_2, w_3. 97 00:06:06,930 --> 00:06:10,360 So let's just find their values at these three points. 98 00:06:10,360 --> 00:06:14,110 One is a constant, it just takes value 1 everywhere. 99 00:06:14,110 --> 00:06:19,310 x takes value minus 1 at minus 1, 0 at 0, and 1 at 1. 100 00:06:19,310 --> 00:06:26,140 And x squared takes values 1, 0, and 1 at minus 1, 0, and 1. 101 00:06:26,140 --> 00:06:30,630 And from this we can already conclude the part b here, 102 00:06:30,630 --> 00:06:39,206 we can conclude that 1 equals w_1 plus w_2 plus w_3. 103 00:06:39,206 --> 00:06:46,680 That x equals minus w_1 plus w_3. 104 00:06:46,680 --> 00:06:53,800 And that x squared equals w_1 plus w_3. 105 00:06:53,800 --> 00:06:56,390 And from this, we can immediately 106 00:06:56,390 --> 00:06:59,790 write one change of basis matrix. 107 00:06:59,790 --> 00:07:06,520 Namely, since we know how to express 1, x, 108 00:07:06,520 --> 00:07:12,820 and x squared in terms of w_1, w_2, and w_3, 109 00:07:12,820 --> 00:07:15,200 we can just copy this information over 110 00:07:15,200 --> 00:07:24,750 to this matrix, getting 1, 1, 1; minus 1, 0, 1; and 1, 0, 1. 111 00:07:24,750 --> 00:07:26,480 So which matrix is this? 112 00:07:26,480 --> 00:07:29,130 This is a matrix-- so we have 1, x, 113 00:07:29,130 --> 00:07:34,030 and x squared expressed in terms of w_1, w_2, and w_3. 114 00:07:34,030 --> 00:07:37,750 So if we feed this matrix something expressed 115 00:07:37,750 --> 00:07:41,360 in the basis 1, x, and x squared, say a, b, 116 00:07:41,360 --> 00:07:44,600 and c, what it's going to throw out 117 00:07:44,600 --> 00:07:49,460 is the same polynomial expressed in this basis here, w_1, w_2, 118 00:07:49,460 --> 00:07:50,680 and w_3. 119 00:07:50,680 --> 00:07:57,137 So I'm going to just write that this is a matrix of this basis 120 00:07:57,137 --> 00:07:57,637 change. 121 00:08:02,570 --> 00:08:04,170 How do we get the other one? 122 00:08:04,170 --> 00:08:08,210 Well, very easy. 123 00:08:08,210 --> 00:08:11,910 We know it's just the inverse of A. 124 00:08:11,910 --> 00:08:18,220 So this is going to be the matrix that 125 00:08:18,220 --> 00:08:24,240 takes something written in this basis 126 00:08:24,240 --> 00:08:27,050 and transfers it to this basis. 127 00:08:27,050 --> 00:08:28,770 I'm not going to calculate the inverse 128 00:08:28,770 --> 00:08:30,070 of a matrix in front of you. 129 00:08:30,070 --> 00:08:32,760 Instead I'm going to consult my oracle. 130 00:08:32,760 --> 00:08:34,900 Sorry about that. 131 00:08:34,900 --> 00:08:38,650 And my oracle says that the inverse 132 00:08:38,650 --> 00:08:52,336 should be 0, 1, 0; minus 1/2, 0, 1/2; and 1/2, minus 1, 1/2. 133 00:08:52,336 --> 00:08:53,460 And that solves the b part. 134 00:08:56,240 --> 00:08:57,420 Let's go into the c part. 135 00:08:57,420 --> 00:09:01,170 The c part required us to find a matrix of taking derivatives, 136 00:09:01,170 --> 00:09:04,030 which is a linear map in the space of polynomials, 137 00:09:04,030 --> 00:09:06,520 in both of these basis. 138 00:09:06,520 --> 00:09:10,570 So let's first do the 1, x, x squared basis 139 00:09:10,570 --> 00:09:12,860 because that one's easier. 140 00:09:12,860 --> 00:09:14,830 I'm going to call it D_x. 141 00:09:18,430 --> 00:09:22,760 So I'm going to work in basis 1, x, x squared. 142 00:09:22,760 --> 00:09:26,370 And what I want to express is the transformation 143 00:09:26,370 --> 00:09:27,400 of taking derivatives. 144 00:09:27,400 --> 00:09:31,250 So here I'm going to write the vector 145 00:09:31,250 --> 00:09:35,425 to which taking derivatives maps the polynomial 1, which is 0. 146 00:09:38,150 --> 00:09:41,930 And that's this expressed in the basis 1, x, x squared. 147 00:09:41,930 --> 00:09:48,190 In the second column I'm going to write x prime, 148 00:09:48,190 --> 00:09:51,240 the vector to which D_x sends to vector 149 00:09:51,240 --> 00:09:56,120 x, and that's equal to 1, which expressed in this basis 150 00:09:56,120 --> 00:09:58,070 is 1, 0, 0. 151 00:09:58,070 --> 00:10:02,050 And here I'm going to write x squared 152 00:10:02,050 --> 00:10:07,700 prime, which is 2x, which, expressed in this basis, 153 00:10:07,700 --> 00:10:10,750 is just this. 154 00:10:10,750 --> 00:10:12,060 That one was easy. 155 00:10:12,060 --> 00:10:15,270 For the other one, well we could calculate 156 00:10:15,270 --> 00:10:19,430 w_1, w_2, w_3 explicitly, take the derivatives, 157 00:10:19,430 --> 00:10:23,180 go back to the table and repeat the procedure 158 00:10:23,180 --> 00:10:24,050 that we did already. 159 00:10:24,050 --> 00:10:27,769 So expressing these derivatives in terms of w_1, w_2, w_3, 160 00:10:27,769 --> 00:10:28,810 and that's a lot of work. 161 00:10:28,810 --> 00:10:32,020 But we pretty much already did most of this work. 162 00:10:32,020 --> 00:10:35,230 So we know how to take derivatives in this basis, 163 00:10:35,230 --> 00:10:38,059 and we know how to go between these two basis. 164 00:10:38,059 --> 00:10:40,350 So if we want to take a derivative of something written 165 00:10:40,350 --> 00:10:48,780 in the basis w_1, w_2, w_3, well, let's first 166 00:10:48,780 --> 00:10:53,872 write this something in basis 1, x, x squared. 167 00:10:53,872 --> 00:10:55,330 Then let's take a derivative of it. 168 00:10:57,880 --> 00:11:00,380 And then let's write it back in the original basis 169 00:11:00,380 --> 00:11:02,050 that we want. 170 00:11:02,050 --> 00:11:05,060 So it's multiplication of three matrices. 171 00:11:05,060 --> 00:11:07,990 We have all three-- matrix multiplication is easy. 172 00:11:07,990 --> 00:11:11,350 And my oracle, again, says that this should be minus 3 173 00:11:11,350 --> 00:11:21,470 over 2, 2, minus 1 over 2; minus 1 over 2, 0, 1 over 2; 174 00:11:21,470 --> 00:11:28,080 and 1 over 2, minus 2, 3 over 2. 175 00:11:28,080 --> 00:11:29,681 And that solves the problem. 176 00:11:29,681 --> 00:11:31,930 Now, one thing that I would want to discuss in the end 177 00:11:31,930 --> 00:11:34,470 is how did you do with respect to my challenge, which 178 00:11:34,470 --> 00:11:36,580 was let's try to do as much of it as possible 179 00:11:36,580 --> 00:11:39,650 without finding w_1, w_2, and w_3 explicitly. 180 00:11:39,650 --> 00:11:41,250 And it seems like we did really well. 181 00:11:41,250 --> 00:11:43,930 There's nowhere on the board written w_1 equals, 182 00:11:43,930 --> 00:11:46,100 w_2 equals, w_3 equals. 183 00:11:46,100 --> 00:11:47,780 But is it really so? 184 00:11:47,780 --> 00:11:48,740 It's not. 185 00:11:48,740 --> 00:11:51,550 We calculated the matrix of A inverse here. 186 00:11:51,550 --> 00:11:59,360 And what this really means is that w_1, w_2, and w_3, written 187 00:11:59,360 --> 00:12:03,760 in the basis 1, x, and x squared, are as follows. 188 00:12:03,760 --> 00:12:08,640 w_1 is minus 1/2 x plus 1/2 x squared. 189 00:12:08,640 --> 00:12:12,150 w_2 is 1 minus x squared. 190 00:12:12,150 --> 00:12:16,300 And w_3 is 1/2 x plus 1/2 x squared. 191 00:12:16,300 --> 00:12:19,270 So you can check your work with the help of this matrix 192 00:12:19,270 --> 00:12:22,500 in case you did find w_1, w_2, and w_3 explicitly. 193 00:12:22,500 --> 00:12:24,928 And that's all I wanted to say today.