 and the next time we can get into homogeneous transformations which combines rotations and translations. So, we think about conversions now. So, we have we started with the rotation matrix and I gave you yaw pitch and roll right. So, that is the first thing we did and you can go back and forth between these, but you have to be very careful about the problems I talked about the kinematic singularities, the non uniform representation and just generally because of non commutativity it gets complicated. So, when you have individual rotations and you are not combining them it is nice, but that is because it is based on three different axis angle representations that happen to be the coordinate axis right. Then we went down the path of axis angle representations. So, I mentioned over here you can convert back and forth between quaternions and rotation matrices. So, we can get to quaternions using this Q representation. So, unit quaternions. So, you may want to convert back and forth between these I am not giving the exact conversion formulas here. If you would like to look them up it is very easy to do a search and find those. You can also find them in my planning algorithms book I cover all these things in the context of robotics, but it is the same kind of thing. So, it is in my book. So, just you can look for that it is online for free. And then there is very simple conversions between this and axis angle representation, which by the Euler rotation theorem as I said is a very natural way to describe rotations. So, there is a very easy relationship between axis angle and quaternions. It requires some computational expense to go back and forth between rotation matrices and the others. So, very often people like to work directly in quaternion space because it makes it very natural for axis angle kinds of computations and representations as well. And all of this will turn out to be advantageous when we do things like head tracking and we want to avoid kinematic singularities. So, that is I think just about where I want to finish. Let me add one last thing here, which is the order of operations to pay attention to here. And this is just one sort of final reminder about non-commutativity and to pay close attention to the order. We have a question of if I have rotations r 1 r 2 or I have quaternions q 1 q 2, there is the interesting question of which is applied first, right? So, for example, let us suppose I have some point p equals x y z and I calculate p prime equals r 1 p and then I calculate p double prime equals r 2 p prime and now I would like to combine both these matrices together. So, I want to figure out what is p double prime is it r 1 r 2 p or p double prime equals r 2 r 1 p. So, which one of these is it? This one? So, a lot of people do not like this, they do not like the fact that wait a minute, if r 1 came first why is not r 1 appearing first, right? So, it is backwards. So, a lot of people call this would say this is counterintuitive. This is the way the algebra works because these matrices are acting from the left side and so, they come in act you know. So, that if you look at it by putting parentheses in you can understand it like this, right? You say first this gets applied and then this gets applied. So, if you add parentheses and remember associativity which does not matter for matrix multiplication, right? In these at this stage when we are when we are chaining together rotations this does not matter because we have a group of matrices that are being multiplied, but nevertheless if you add the parentheses back then you can keep track of it like that and remember that this is occurring first and then this. So, the order of operations matters because of non commutativity and just when you see a chain of matrices make sure you are correctly interpreting the order of operation. So, it is very easy to get that backwards it is a common source of mistakes and another thing is when you do inverses as we have talked about just make sure you are applying the proper inverses. So, if I take r 1 r 2 r 3 and I invert that just recall that you get r 3 inverse r 2 inverse r 1 inverse, right? So, that is just a basic property of group theory it applies all over the place when you are dealing with algebra that is commutative you do not care, but when you have non commutative algebra which we found ourselves dealing with because of 3D rotations you have to reverse the order of the matrices when you apply the inverse and distribute it across each of the matrices, right? So, just something to pay attention to. So, if you are going to invert a sequence of quaternions the same thing is going to happen you are going to have to reverse the order of the quaternions and then apply the inverse to each one which is just these simple sign changes that I told you about, right? Questions about that? All right. So, I am going to I am going to finish up for today next time I will talk about homogeneous transform matrices you can read in chapters I believe 6 and 7 of the Shirley graphics book if you would like some background on this. Thanks.