Quaternions EXPLAINED Briefly

Channel: Mathoma Published: 2016-06-19 2,856 words Source: auto_caption
Advanced Mathematics & Geometric Physics

Transcript

one of my favorite topics in mathematics is the quaternions and what I'd like to do in this video is give you a brief introduction to the quaternions and show you how we do some calculations with the quaternions that is introduce you to their algebraic properties now oftentimes in math we have many different ways of viewing the same thing and let me tell you about how I view the quaternions by reviewing the vector concept now let's say we're working in two dimensions we have the x axis and the y axis and we have some force acting on an object now let's say the force acts two units in the X direction for example two Newton's of force in the X direction and one Newton in the Y direction now mathematically we oftentimes represent such a force by a vector if I call that force F and notationally we might say that F is equal to two in the first component because it x2 units in the X direction and one unit in the Y direction and here what we have is a simply put a two dimensional vector and more abstractly we might say that such mathematical objects live in the set are two just denoting that we have two components here that's what the two stands for and that each of these components is being drawn from the real numbers that's all those quite simply now for the quaternions as you may guess from the prefix quads or quite there we have four dimensional objects that we're going to be working with now such a four dimensional object may look like this one two three four and such an object one two three four is going to be an example of a quaternion so in terms of what these objects are but these mathematical objects are they're just four dimensional vectors up here we had two dimensional vectors living in r2 here we have four dimensional vectors living in the set called r4 often times in math we have different ways of notating the same idea that is if I go back up to this force F I wrote it as 2/1 as an ordered pair but in the physics setting one could easily notate the same force F in the following way two Newton's times the unit x-direction which is often written as X hat plus one Newton times the unit Y Direction Y hat and this is denying the same thing just writing it out as multiples of X hat and Y hat but is still representing the same arrow the same directed line segment now in the same vein quaternions can be thought of as this quadruple as I have written here and one two three four alternatively we could write such a quaternion one two three four in the following way one plus 2i plus 3j plus 4k and hopefully you can see the correspondence between these two ways of writing the quaternion what's important here is that you keep the order the same and that each component gets lined up with their correct position that is the one gets lined up here the two here gets multiplied by an eye when writing in this way the three gets multiplied by a J when writing it here and the four here and the final component is going to get multiplied by K when writing it like this you're going to see that such a flexibility in our notation is going to prove quite useful when we talk about quaternion multiplication now one may wonder if we have two quaternions how would we do some calculations with them that is if I have two quaternions how do i add them or how do i multiply them and to answer that question let's return to our two-dimensional vectors so I have F same as I talked about before two one and let's suppose I have another Force which I'll call G which is 0 in the X direction and one in the Y direction so on the graph I would draw it in like that and the question now is how do I add F and G so what is F plus three now a simple answer and a very good answer is to combine the first components to form the new first component and to combine the second components to form the new second component that is the first component of F plus G is going to be 2 plus 0 which is equal to 2 and the new second come on is going to be 1 plus 1 which is also equal to 2 now on the graph what you can do is imagine taking that vector and sliding it up here and then completing this parallelogram here and then what you're going to do is you're going to draw in the diagonal of the parallelogram and that should be the vector 2 2 if we've drawn a parallelogram accurately but this is how we add vectors and it turns out for the quaternions we're going to do the exact same thing so I have my four-dimensional vector here that 1 2 3 4 and let me just make up another four-dimensional vector let's say 0 1 1 0 how do I add them just combine the components so I have 1 plus 0 that's 1 now I have 2 plus 1 that's 3 I have 3 plus 1 which is 4 and finally I have 4 plus 0 which is 4 simply put that's how you add two quaternions more abstractly if I have some quaternion which I'll call q1 made up of ABC and D and I have another quaternion q2 which is made up of e F G and H the sum of the two quaternions which I'll call q1 plus q2 is going to be given by a plus e in the first component just adding a and E and the second component is going to be B plus F the third is going to be C plus G and the last is going to be D plus h as you can see quite simple and quite analogous to the 2-dimensional case and I should emphasize that we can go back and forth between our notations instead of thinking of that quaternions ABCD I can think of it as a what's a bi + CJ + DK and that other one I can think of as e + fi + g j + HK and the resulting quaternion after i sum those two is going to be a + e in the first component and the second component is going to be b + f all times i keeping the eyes the other now keeping the J so it's going to create C plus G times J and finally keeping the case together I have D plus h times K just emphasize that we can go back and forth between these two notations now what makes the quaternions very interesting and also endow them with some very interesting properties is the way in which one multiplies to quaternions together now what I could do is just give you the formula but more importantly I think is to show you what the inside was that generates the formula because if you see what the inside is you can generate the formula on your own and half of the insight is to go back to what we know about the complex numbers or how we generate the complex numbers which is that we have some object called AI that has the property that I squared is equal to minus 1 equivalently I is one of the two square roots of minus one now what the quaternions do is not only have an eye but also a J and a K that also square to minus 1 so I have J squared is equal to minus 1 and K squared is equal to minus 1 so this is 1/2 the insight right here to have 3 imaginary units that square to minus 1 now the other half of the insight behind the quaternion multiplication is to have the 3 imaginary units multiplied together in this white that i times J times K is equal to minus 1 and these four equations are summarized as follows I squared is equal to J squared which is equal to K squared which is equal to IJ K which is equal to minus 1 and this is the famous equation that Hamilton came up with the famous Irish mathematician I believe this is a famous piece of graffiti somewhere in Dublin and this is this equation right here especially this one is going to generate all the rules that we're going to need to set up quaternion multiplication now to actually generate the quaternion ik multiplication what I'm going to do is simply take this a plus bi + CJ + DK and distribute it to e + fi + GJ + HK and I've written that out down here all 16 terms of that sum here and this may look like a mess but it's actually quite organized what I did here in this first line is take the a and distribute it to each of the 4 terms so I get a E + AF I that's a fi then a GJ plus a HK and then I take B I times E and B F I squared then bi G J and so on the thing you need to watch out for is when you have something like I times J that you make sure you write it in the order I J that you don't carelessly flip it around and write J I because because it's going to turn out that the quaternion multiplication is not commutative so this is what you get and as you can see here if I take for example I J I need to know what I'm going to have to do with the IJ I need some rule for what's a substitute into IJ and to show you how I'm going to make all these substitutions for example the IJ j AI k j and also the I Squared's and J Squared's I'd like to generate the multiplication table for you or at minimum I'd like to generate some of the multiplication table but lecture to show you how it's going to be done what I'm going to do is go back to that equation IJ K is equal to minus 1 and what I'm going to do is multiply both sides by I so I'm going to have I times I times JK is equal to minus I just multiplying both sides on the left by I and here I have I squared JK is equal to minus I and remember what I squared was equal to that was minus 1 so this equation implies minus JK is equal to minus I which also implies that JK is equal to I so from this equation alone if I ever see JK in this sum here and I actually have a JK right there I'm allowed to replace the JK with an I now what I'm going to do is organize all these multiplication rules in the table like this so the JK I'm going to stick right here J K and I'm going to write I and it turns out that I know three more positions in this table already I know that I times I or I squared is equal to minus 1 same thing for J times J or J squared that's also equal to minus 1 and K squared is also equal to minus 1 now to generate the other entries what we're going to do is we're going to take this equation I'm going to multiply both sides by J so I'm going to get J squared times K is equal to ji now remember J squared is equal to minus 1 so I get minus K is equal to ji so I'll just write that in the table here J I is equal to minus K and now let me take this equation and multiply on the right by I so I'm going to get minus ki equals minus RS RJ I squared so I get minus ki is equal to minus J which implies that ki is equal to J and I'll fill that in right here ki is equal to J now I'll leave the remaining three entries right here here and here as an axis for you but what you're going to find is the very interesting property that let's say I have ji is equal to minus K then instead of looking at ji if I look at IJ it's actually equal to the opposite of minus K which is K that is to say when I commute each of the is J's or case commuting them results in a sign flip so I have I J is you'll okay but then when I flip the order I have J I that's equal to minus K and if I go down here I have K I is equal to J and what you can prove is that I times K is equal to minus J and finally I have J K is equal to I and if I flip the order K times J that's going to be equal to minus I so this is the very interesting non commutative structure of the quaternion multiplication since we have this multiplication table at our disposal finishing this calculation is just a matter of making the right substitutions since we know what to do with for example the I square is the IJ and the I K we just look it up on the table and make the substitution and let me do that for you right now here's what I get after I make all those substitutions and you could probably notice that I have some sign flips coming in here and the last step is to simply collect all of the like terms that is all of these terms such as AE minus b f- c g and minus d h are all going to get collected to form the new first component the eyes are going to be collected together I have the eyes there there there and there then I collect the J's and then I collect the case all together and let me do that for you right now and here is the final product after combining together all the terms that have neither eyes J's and arcades in them that's this first line here combining together all the eyes that's the second line combined together all the J's that's the third and all the case the fourth line now it's important to note besides where this comes from that quaternion multiplication is in general not commutative that is to say if I have q1 and q2 in general that's not equal to q2 times q1 that's one of the interesting properties about quaternion multiplication even though the commutative law is false in the quaternions the associative law remains true that is to say if I have three quaternions let's say q1 q2 and q3 I could multiply q1 and q2 first then multiply on the right by q3 or I could take q2 and q3 multiply those first and then multiply on the left by q1 so the Associates of the law is going to be true the last little piece of jargon that I'd like to point out is let's say I have some quaternion q1 made up of a b c and d often times this first part this first component the a is called the scalar part and the final three components taken together as one three-dimensional vector is called the vector part of a quaternion oftentimes we divide them like this for specific applications in physics and also computer graphics and I think then I'll do it for the fundamentals of quaternions of course there's always much more to say about any mathematical topic these quaternions very famously find application in those who create video games who want to accurately model a rotation in three-dimensional space and it's also very interesting to note that this is a problem that people struggle with in the 1800s mathematicians and physicists and it's interesting that in the year 2016 we find some application for these seemingly abstract mathematical objects perhaps we might say that the mathematical objects that we create in the year 2016 may find some application in 2200 or 2100 who knows so I thank you for watching the video if you enjoyed this video or my other content I highly encourage you to subscribe to my channel feel free to leave comments including angry comments um I'm always disappointed that I don't have too many angry comments and thanks again for watching