# Trying to find a nice basis to realize the quaternion mapping as a rotation matrix

Trying to find a nice basis to realize the quaternion mapping as a rotation matrix.

The quaternions are a 4 dimensional division algebra over $$\mathbb{R}$$ where we label the standard basis vectors as $$e_1=$$1, $$e_2$$=i $$e_3$$=j and $$e_4=$$k and define the multiplication by ij=k, jk=i, ki=j, ii=jj=kk=-1.

The quaternions were invented by William Rowan Hamilton as a nice way to express rotations in $$\mathbb{R}^3$$. A rotation in $$\mathbb{R}^3$$ is completly specified by it's axis of rotation and angle of rotation. Say we want to rotate $$\mathbb{R}^3$$ an angle of $$a$$ about the axis of rotation $$(b,c,d)$$. To achieve this let $$r=$$a+bi+cj+dk and also associate each point $$(x,y,z) \in \mathbb{R}^3$$ to a "pure" quaternion xi+yj+zk.

Now, define a linear map:

$$R_r: \mathbb{R}^3 \rightarrow \mathbb{R}^3$$ defind by $$R_r(x) = rxr^{-1}$$

This map achieves the desired rotation and has many nice properties properties, in particular composition of rotations corresponds to multiplication of quaternions i.e. $$R_{rs}=R_rR_s$$

I am currently trying to understand (in as many ways as possible) why this map indeed achieves the desired rotation.

For $$r=$$a+bi+cj+dk, I have verified that $$(b,c,d)$$ is an eigenvector of $$R_r$$ with eigenvalue $$1$$.

Using the basis $$\{(b,c,d),(0,1,0)(0,0,1)\}$$ I've computd the matrix for $$R_r$$ as:

$$\begin{bmatrix} 1 & 2(bc-ad) & 2(ac+bd) \\ 0 & a^2-b^2+c^2-d^2 & 2(cd-ab) \\ 0 & 2(ab+cd) & a^2-b^2-c^2+d^2 \end{bmatrix}$$

However, to me this is not in any way an obvious rotation matrix. I'd like to find a basis where the matrix has the following form:

$$\begin{bmatrix} 1 & 0 & 0 \\ 0 & m & -n \\ 0 & n & m \end{bmatrix}$$

Furthermore, I'm a scrub who only undestands $$2\times2$$ rotation matrices, and I'm under the impression that in the standard basis the corresponding matrix is pretty clearly a $$3 \times 3$$ rotation matrix. However, I want to use the fact that we have this nice eigenvector to express the matrix in a nicer form.

So I guess the point of this post is two things:

$$1)$$: What is a nice basis for $$\mathbb{R}^3$$ so that I can express the matrix of $$R_r$$ in a nice form?

$$2)$$ What are some other ways to understand that this map is indeed a rotation of $$\mathbb{R}^3$$?

Thanks!

WLOG we use a unit quaternion, and these have polar forms $$\exp(\theta\mathbf{u})=\cos\theta+\sin\theta\,\mathbf{u}$$ where $$\mathbf{u}$$ is a unit vector. (Note the unit vectors are precisely the square roots of $$-1$$.)

(1) When conjugating by $$\exp(\theta\mathbf{u})$$, extend to an orthonormal basis $$\{\mathbf{u},\mathbf{v},\mathbf{w}\}$$ (oriented appropriately). To calculate the matrix, use the fact $$\mathbf{ab}=-\mathbf{a}\cdot\mathbf{b}+\mathbf{a}\times\mathbf{b}$$ for vectors $$\mathbf{a}$$ and $$\mathbf{b}$$. (This follows from the fact multiplication is bilinear, and if we write the multiplication table for $$\{\mathbf{i},\mathbf{j},\mathbf{k}\}$$ down the scalar and vector components of the entries are the minus dot product and cross product respectively by inspection.)

(2) The fact that the conjugation $$pxp^{-1}$$ involves two $$p$$s (where $$p=\exp(\theta\mathbf{u})$$) and rotates by $$2\theta$$ suggests both $$p$$s (on the left and right) contribute a single $$\theta$$ to the final outcome. This can be seen by looking at the left and right multiplication maps $$L_p(x)=px$$ and $$R_p(x)=x\overline{p}$$; each is an isoclinic rotation in a matching pair of planes. To see this, extend to an orthonormal basis $$\{1,\mathbf{u},\mathbf{v},\mathbf{w}\}$$ and consider the $$1\mathbf{u}$$ and $$\mathbf{vw}$$-planes separately. (By Euler's formula for $$p$$, it suffices to check what happens when $$p=1$$ and $$p=\mathbf{u}$$.)

• What do you mean by $\exp(\theta\mathbf{u})=\cos\theta+\sin\theta\,\mathbf{u}$? It looks like you are adding a scalar $\cos\theta$ to the vector $\sin\theta\,\mathbf{u}$ to me
– user637978
Commented May 6, 2022 at 15:25
• @Frogwilldo That's exactly what I'm doing! A quaternion is a sum $a+b{\bf i}+c{\bf j}+d{\bf k}$ of a scalar $a$ and a 3D vector $b{\bf i}+c{\bf j}+d{\bf k}$ which doesn't simplify. (I mean, you could also represent quaternions other ways, but I claim this is best for the context.)
– anon
Commented May 6, 2022 at 15:33
• Oooh okay gotcha,thanks!
– user637978
Commented May 6, 2022 at 15:34