Calculating a quaternion that represents a given rotation 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


  
*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?
 A: 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.
