If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:12:18

Video transcript

in the last video we defined a transformation that took that rotated any vector in r2 and just gave us another rotated version of that vector in r2 in this video I'm essentially going to extend this but I'm going to do it in r3 so I'm going to define a rotation transformation maybe I'll call it rotation well I'll also call it theta so it's going to be a mapping this time from R 3 to R 3 as you can imagine the idea of a rotation at an angle becomes a little bit more complicated when we're dealing in three dimensions so in in this case we're going to rotate around the x-axis so let me call it so this is going to rotate rotate around the x-axis and what do you see what we do in this video you can then just generalize that to other axes and if you want to rotate around the x-axis and then the y-axis and then the z-axis by different amounts different angles you can just apply the transformations one after another and we're going to cover that in a lot more detail in a future video but this should kind of give you the tools to show you that this this idea that we learned in the previous video is actually generalizable to multiple dimensions and especially three dimensions so let's just let me just be clear what we're going to be doing here so let me draw some axes so that's my x-axis that is my y-axis and this is my z-axis and what I'm saying is any of course have this is r3 that any vector here in r3 I will be rotating it counterclockwise around the x axis so we'll be rotating like that so if I had a vector and this is I'm just drawing it in the zy plane because it's a little bit easier to visualize but if I have a vector sitting here in the zy plane it will still stay in the zy plane but it'll be rotated counterclockwise by an angle of theta just like that now a little harder to visualize is a vector that doesn't just sit in the zy plane maybe we have some vector that has some X component it comes out like that then some Y component and Z some Z component it looks like that then when you rotate it it's Z and it's Y components will change but it's X component we'll stay the same so then it might look something like it looks something like this let me see if I can give it justice so then the vector when I rotate it around might look something like that anyway I don't know if I'm giving it proper justice but this was rotated around the x-axis and I think you understand what that means but just based on the last video we want to build a transformation we want to make this let me call this rotation three theta or let me call it now let me call it three rotation theta to know that we're dealing in r3 and what we want to do is we want to find some matrix so I can write my three rotation sub theta transformation of X as being some matrix a times the vector X and since this is a transformation from R 3 to R 3 this is of course going to be a three by three matrix now in the last video we learned that to figure this out you just have to apply the transformation essentially to the identity matrix so what we do is we start off with the identity matrix in r3 which is just going to be three by three let me draw it like we're going to have one one one zero zero zero zero zero zero each of these columns are the basis vectors for r3 that's a 1 e 2 e 3 I'm writing that probably too small for you to see but each of these are the basis vectors for r3 and what we need to do is just apply the transformation to each of these basis vectors in r3 so our matrix a will look like this our matrix a is going to be a three by three matrix where the first column is going to be our transformation three rotations sub theta apply to that mate column vector right there 1 0 0 and then I'm going to apply it to this middle column vector right here so I'm going to apply it what you get the ID I don't want to write that whole thing again I'm going to apply three rotation sub theta 2 0 1 0 and then I'm going to apply it I'll do it here 3 rotation so theta I'm going to apply it to this last column vector so zero zero one we've seen this multiple times so let's apply it let's rotate each of these basis vectors the basis vectors for r3 let's rotate them around the x-axis so the first guy he is a his if I were to draw it in r3 what does he look like he only has directionality in the x-direction right if we call this the X dimension if this if this if the first entry is it corresponds to our X dimension the second entry corresponds to our Y dimension and the third entry corresponds to our Z dimension then this guy only if this vector would just be a unit vector that just comes out like that right so if I'm we're going to rotate this vector around around the x axis what's going to happen to it well nothing I'm just going to I mean it's it is the x axis so when you rotate it it's not changing its direction or its magnitude or anything so this vector right here is just going to be it's just going to be the vector 1 0 0 nothing happens when you rotate it now these are a little bit more interesting to do these let me just draw my Z Y axis let me just draw my Z so that's my z axis and this is my Y axis right here now this basis vector it just goes into the Y direction by 1 so this basis vector just looks like that and it just goes it has a length of 1 and then when you rotate it around the x axis when I draw it like this you could imagine the x axis is just popping out of your computer screen so I could draw it you know like this is like the tip of the arrow it's just popping out I stead of drawing it at an angle like this I'm throwing it straight out of the computer screen so if you were to rotate this vector right here this blue vector right here this vector right here by an angle of theta to look like this it'll look like that and we've done this in the previous video what are its new coordinates first of all well its x-coordinate have changed it all its x-coordinate was 0 before because it doesn't break out into the X dimension it just stays along the zy plane it was zero before when you rotated it's still on the zy plane so it's X direction or it's how its x-component won't change at all so the x-direction is still going to be zero and then what's its new y-direction well here we do exactly what we did in the last video we figure out this this is going to be its new I guess I don't want to draw a vector there necessarily but this length right here is this going to be its new its new Y component and this length right here it's going to be its new Z component so what's its new Y component so this is going to be and we did this and we did this in the last video so I won't go into it as much detail but what is cosine of theta the length of this vector is 1 right these are the these are the standard basis vectors and one of the things that makes them nice a nice standard basis vectors that their lengths are 1 so we know that the cosine of this angle the cosine of this angle is equal to the adjacent side over the hypotenuse the adjacent side is this right here and what is the hypotenuse it's equal to 1 so this adjacent side which we said is are going to be our new second component or our second entry is going to be equal to cosine of theta right that's a is you can just ignore the ones this is going to be equal to cosine of theta and what's going to be its new Z component well sine of theta sine sine of theta is equal to the opposite side this side over 1 so it just equals this opposite side and the length of that opposite side is this vectors once it's rotated is its new z component so that you get a sine theta right there now we just have to do everything in the Z direction so this Z basis vector right there what does it look like on this graph let me just actually redraw it just to make things a little bit cleaner so that's my z axis and this is my Y axis and my Z basis vector III it starts off looking something like that III looks like that it just goes only in the Z direction so first of all let's just rotate it by an angle of theta so I'm going to rotate it like that that's an angle of theta so what's its its former ex entry was zero it had no it did not break out in the x-direction at all and of course we're still just in the zy plane so it won't be moving out in the x-direction still so it's still going to be a 0 up here now what about its a new y component its new y-coordinate i guess we can call it is going to be this length there's going to be this coordinate right here and how can we figure that out well that length is the same thing as that length and if we call this the opposite side of the angle we know that the sine we know that the sine of theta is equal to this opposite side over the length of this vector which is just 1 so it's just equal to the opposite side so the opposite side is equal to sine of theta but our new coordinate is to the left of the z axis so it's going to be a negative version we did this in the last video so it's going to be a negative sine of theta so this is going to be negative sine of theta this point right here that coordinate so it's minus sine of theta minus sine of theta and then finally what's its new Z coordinate going to be that's going to be this length right here and we know that this length if we call that adjacent we know that the cosine of the cosine of our theta is equal to this divided by 1 so it's equal to the adjacent side so we can just put a cosine of theta right there and we get our transformation matrix we're done our transformation matrix a is this so we can now say our new our little our new transformation that this video is about my 3i and I call it a 3 because it's a rotation in r3 but it's around maybe I should call it you know 3 sub X because it's a rotation around the x-axis but I think you get the idea it is equal to this matrix right up here now maybe maybe I could rewrite it or well actually let me do it this way let me delete all of this so not to rewrite so my transformation that this video is about the three rotation theta of X that transformation is equal to this matrix times whatever vector X I have in r3 and you might say hey Sal that looks exactly like what you did in the second if you remember the last video when we did when we defined our rotation in r2 we had a transformation matrix that looked very similar to this and that makes sense because we're essentially just rotating things counterclockwise in the zy plane now you might say hey Sal why is this even useful you extended it to three dimensions or to r3 you know we I saw what you did in r2 why is this useful it's kind of a limited case where you're just rotating around the x-axis and I did for two reasons one to show you that that you can generalize to r3 but the other thing is if you think about it a lot of the rotations that you might want to do in r3 can be described by a rotation around the x-axis first which we did in this video then by rotation of the around the y-axis and then maybe some rotation around the z-axis so you can actually define this is just the special case this is just a special case where we're dealing with the x axis rotation around the x-axis but you could do the exact same process to define transformation matrices for rotations around the y axis or the z axis and then you can apply them one after another and we'll talk a lot about that in the future when we start applying one transformation after the other but anyway hopefully you found this slightly useful it's a slight extension of what we did in r2