Relating Quaternions to 3d Vectors

Channel: Dr. Powell's Math Classes Published: 2021-11-19 1,996 words Source: auto_caption
Advanced Mathematics & Geometric Physics

Transcript

welcome to a lesson with dr powell let's talk about how quaternions are related to the cross and the dot product first let's think about what quaternions are made of they're made of a real part and an imaginary part what if we take a vector that just is imaginary it's going to be orthogonal to the to the real axis which you don't really see because it's you know a coordinate which which uh the first coordinate is not the one we see even though it's real we just see the imaginary part the last three coordinates so what if we just take a vector that comes from the last three coordinates let's call it u and let's think of u as being a quaternion example i mean u could be something like i minus j plus 2k completely imaginary now what if we look at negative u faces opposite and in quaternion language we could write this as u over line bar the conjugate of u and now why would we do that well think about complex numbers if we have two plus i its conjugate is two minus i what did we do we made the imaginary part negative okay now what if we just had i what's its conjugate conjugate well just it's negative make the imaginary part negative hence negative means the same thing as conjugate so we're going to use the notation u bar to represent negative u okay now what if we multiply by u bar what happens now just as for complex when we multiply by something we can make a new set of axes with regards to that particular complex number and then plot the second guy in it and that's how we multiply same thing works here u-bar will be like the new real axis facing down here if we multiply by it what is that going to do if we plot u with respect to it actually u is going to be right here it's going to be real it rotates it right down to be real just as it would for imaginaries so if we multiply by u bar the effect is u u bar will be now real now not only will it be rotated but it also be expanded by the size of u bar which is the same as the size of u the length of this so that's that's great so what we get is u times u bar is now on the real line okay what's the utility of that well what if we take two vectors v and v in u okay now thinking about this for a second we can kind of think of there being an orthogonal component for v and a projection of v onto u now what if we want to study that idea the best way to study that justice for complex numbers is to is to multiply both of these guys by something to rotate this guy to the real line so that this part is nothing but the imaginary component of the multiplication of v after we multiply and this would now turn into the real part and we can just read off the projection and the imaginary part just right away when we rotate it down so what we're going to do is we're going to think of u and v [Music] as being quaternions so we can do some multiplication and if we multiply by conjugate u bar what we end up getting is we get the same picture rotated and expanded and if we take the imaginary part of this guy right here that will be exactly that that vector right there of course this will be real we won't see the real part but we actually will see this this is purely imaginary with no real component so we'll actually see this in three space so what we end up getting is um the imaginary part of the u-bar is um is equal to that and we give this a name we call it u cross v so it's an imaginary part of a multiplication here of quaternions the real part in this multiplication v u bar is actually equal to something we call the dot product which we've seen before and those two these ideas all coincide just perfectly okay now when we're looking at this let's think for a minute about what's happening you see v u bar u bar we multiply that together and we're thinking of v and u as being imaginary things if we multiply something imaginary something else to something else it makes the result orthogonal to what we started with here but since they're both imaginary the product will be orthogonal to both of them at least in quaternion land so we're going to get a result which is um has four four different entries in it whatever they are there might be a real part in this multiplication but if we compare it to u and v which have a zero in that component and we do a dot product notice we get zero here so really orthogonality has to happen here the dot product here has to be zero so really if we project again for the real part i mean uh project again onto the imaginary part we get this thing right here actually has to be orthogonal to be what both u and v were to begin with which is kind of a neat idea we'll talk about that right now okay so what we end up getting is um if we think of the plane where u and v reside u is facing this way and v is facing that way okay maybe we have a counter-clockwise rotation right to there so we're going to try to visualize where u cross v is going to be located it has to be orthogonal to both of these and there's only one line coming up from this plane back and forth which is or which represents directions that are orthogonal so it's either going to be up or down only two options for you for for what u cross v is only two options and so u cross b is going to be up this direction or that direction which direction let's take a look at another example with i and j now in the definition of quaternions we take i and we visualize i and j right here counterclockwise from each other in a visualization and we also visualize k counterclockwise here from there now look thinking about this idea and thinking of this plane as being where i and j live um in quaternions we define k to be the product a or i times j which is k which is purely imaginary which means cross products are the same so i cross j is actually equal to k now if you if you were to rotate or multiply all these things by something this same picture would be rotated as well very nicely so in fact we could even like rotate a picture here so you would be in line with i now think about something else when we when we take imaginer in real parts if we're only considered about the concern with the imaginary part um thinking about this i mean we want maybe just this component of the vector v and not this component that actually has projection but really this is the only part that really counts so the cross product is the same as if we took this part and that part which is like taking if we rotate it to this picture i and j and so i times j hat was visualized with the going upward from here counterclockwise so similarly if u is in place of i we can actually just visualize the ijk thing it every single time to get across the direction the cross product so if you and then we have this uh component right here crossed together will give you something if you rotate this you can imagine the u following where the i is this component following where the j is and k will actually be going straight up here or u cross v will be up now if we were to think um the opposite way what if we did v cross u in the same picture v would flip to where the eye is but in order to do that effectively you kind of have to turn this picture upside down so v will land on the eye and then the u and its component would land on the on the j place but in that case when it's turned upside down this picture would be um this picture would be turned upside down as well and k would be down so in other words would be facing down here so v cross u would be going um v cross u would be going down that way if you think about that just one more time let's think so if we had v first going the opposite direction so flip flop so yeah that would come down around the upside down okay so that's kind of a way of picturing which direction u cross v is going to go so u cross v is a nice is um is going to be orthogonal to both of the original vectors now v cross u cross v is also that length in the um if i have my two vectors and i did my rotation so u and v or however i i'm doing it um it's also uh this distance in the parallelogram that i get after i've kind of expanded both of these by the length of u and it's now sitting on the the real line which means this is actually equal to the length of u times the the height of the triangle which is actually the area of the parallelogram formed between those in space so we kind of rotate this down and we can actually see that right away this imaginary part if you take the length of it will actually be the area of that parallelogram kind of neat now if u is actually a unit vector this part's just one so we actually the real part will actually be the projection which is what we'd expect for a dot product um so that's a little description of how quaternion multiplication relates to to the cross product and the dot product but one more note before we finish and that is notice that when things are imaginary interchanging the order does nothing but make it the negative of what it started with notice how we're doing something like we're putting a u bar last and then we're putting b to describe what u cross v is that looks a little out of order what if we interchange these orders to make it negative we would get negative um u bar v and now this is just u of course that interchange of order only really works for imaginary products and imaginary results for i squared and j squared and stuff doesn't quite work so really the real part's going to be affected and messed up if we did this that's why we do this however the imaginary part is not the imaginary part of this is actually the same as the imaginary part of this so if you want you can actually for ease just do u v as quaternions multiplied together take the imaginary part and that's going to be equal to the cross product however the real part will not be the dot product in now it has to be the real part of that but it will be the negative of the dot product negative u dot b thanks for watching