This is the first time I'm attempting to do a quaternion and I am not quite getting the concept. This is part of a 3 calculation homework question

The initial question is

  1. Given a 3-D point at position $(0, 1, 0)$. Provide the matrix for a $90$ degree rotation around the $x$-axis. Determine the point that results from performing that rotation on the original point. Next provide the matrix for a $45$ degree rotation around the $y$-axis. Determine the result from performing the $y$-rotation on the point that resulted from the previous rotation. Finally provide the matrix for a $180$ degree rotation around the $z$-axis. Determine the result from performing the $z$-rotation on the point that resulted from the previous rotation. Because no translations are involved, you can use $3 \times 3$ matrix math for your calculations.

I've done these with matrix mult but the next part is quaternions:

Using quaternions, perform the same three rotations on the same original point in problem 4. Show the quaternion and its conjugate used for each rotation and the quaternion that results after using that quaternion to perform the rotation.

From what I understand... in order to do this I need to calculate the quaternion and the conjugate of it as well. I've never done this before but this is how I've started. I understand they have a basic structure of $q = w + xi + yj + zk$.

So for the first question I think what I'm supposed to do is the following: $$q = \cos\left(\tfrac{1}{2} \cdot 90^{\circ}\right) + i\sin\left(0 \cdot \tfrac{1}{2} \cdot 90^{\circ}\right) + j\sin\left(1 \cdot \tfrac{1}{2} \cdot 90^{\circ}\right) + k\sin\left(0 \cdot \tfrac{1}{2} \cdot 90^{\circ}\right)$$

which would give me

$$q = .7071 + .7071 j .$$

From there I don't really understand what to do though. What is that number supposed to be? What does it represent? And how do I take it to the next step?


You're on the right track: If we think of $\Bbb R^3$ as the set of imaginary quaternions, that is, as $\langle {\bf i}, {\bf j}, {\bf k} \rangle$, then we can write any rotation as the (linear) map $C_{\bf q} : \Bbb R^3 \to \Bbb R^3$ defined by $$C_{\bf q} : {\bf x} \mapsto {\bf q} {\bf x} \bar{\bf q}$$ for some unit quaternion $\bf q$.$^*$ If one takes the quaternion you've computed, namely, ${\bf q} := \tfrac{1}{\sqrt{2}} (1 + {\bf j})$ and writes out the matrix for $C_{\bf q}$, it should coincide with the first linear transformation you computed above.

The quantity $\bf q$ is simply a unit quaternion (so, we can think of it as being on the $3$-sphere $\Bbb S^3 \subset \Bbb H \cong \Bbb R^4$) that encodes the rotation. It follows immediately from the definition that $C_{\bf q} = C_{-\bf q}$, so there is some redundancy in the representation of rotations as unit quaternions, but it turns out that this is the only redundancy, that is, $C_{\bf q} = C_{{\bf q}'}$ iff ${\bf q}' = \pm {\bf q}$. So, the map ${\bf q} \mapsto C_{\bf q}$ that maps a quaternion to its rotation is a $2$-fold cover $\Bbb S^3 \to SO(3)$. (Thus, we can identify the group of unit quaternions, which we sometimes denote $SU(2)$, is the spin group Spin(3).) The fact that this cover is $2$-fold, that is, that each rotation is represented by exactly two quaternions, is basically responsible for the factors of $\frac{1}{2}$ that appear in the angle arguments.

$^*$Note that this requires a general fact that I recommend you check, namely, that for any ${\bf x} \in \Bbb R^3$, $C_{\bf q}({\bf x})$ is actually an imaginary quaternion.

  • $\begingroup$ So to give a little background for you as well this is for a programming course so my understanding is a bit less on the subject. So you are saying that for the unit quaternion (which is where x = 1 ∨ y = 1 ∨ z = 1?) that the quaternion is equal to the conjugate which has the form q' = w - xi - yj - zk? In my case the conjugate would be .7071 - .7071j right? Or rather that the matrix for the two is the same if they are the same? $\endgroup$ – Vincent Jenkins Apr 17 '16 at 15:08
  • $\begingroup$ Feel free to ignore the comments about "$2$-fold cover," etc., which are basically color commentary. A quaternion $\bf q$ is a unit quaternion iff $||{\bf q}||^2 = 1$, and it's often convenient to rewrite this as ${\bf q}\bar{\bf q} = 1$. And yes, to compute the conjugate of a quaternion, just change the sign of the coefficients of the imaginary (${\bf i}, {\bf j}, {\bf k}$) terms. And yes, $\overline{\frac{1}{\sqrt{2}}(1 + {\bf j})} = \frac{1}{\sqrt{2}}(1 - {\bf j})$. $\endgroup$ – Travis Apr 17 '16 at 15:18
  • $\begingroup$ The rotations determined by $\bf q$ and $\bar {\bf q}$ are in general not the same---they are rotations about the same axis, but in opposite directions. It is true, though, that for any imaginary quaternion ${\bf q}'$, we have $\bar{\bf q}' = -{\bf q}$; if ${\bf q}'$ is imaginary, then $C_{{\bf q}'}$ is a $180^{\circ}$ rotation about the corresponding axis. $\endgroup$ – Travis Apr 17 '16 at 15:21
  • $\begingroup$ How do you get qq' = 1? Is that because j^2 = i^2 = k^2 = -1? and it comes up with .5 - .5j? In that case how do I map it like you said earlier with the mapping to x. My resulting point is (0,0,1). I'm unsure of how to go from my qq' to my new point. Thank you very much for the help by the way. I am really enjoying your explanation. Also I didn't see that last comment. Is it the case then that my final quaternion will be an imaginary quaternion since it is a 180 degree rotation? Also how do I know that it is a rotation about the x axis as opposed to the y or z axis? $\endgroup$ – Vincent Jenkins Apr 17 '16 at 15:38
  • $\begingroup$ It's a good exercise to verify that if you write ${\bf q}{\bf q}'$ in terms of the components $a, b, c, d$ of $a + b {\bf i} + c {\bf j} + d {\bf k}$, then you get $a^2 + b^2 + c^2 + d^2$, which is the usual form for the length of the vector $(a, b, c, d) \in \Bbb R^4$. I'm not sure what went wrong in your computation of ${\bf q}{\bf q}'$ for your $\bf q$, but it looks like you forgot half of the terms. Indeed, ${\bf q}{\bf q}'$ is always real! $\endgroup$ – Travis Apr 17 '16 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.