# Introduction to Groups and Geometries

## Section1.2Quaternions

The quaternions, discovered by William Rowan Hamilton in 1843, were invented to capture the algebra of rotations of 3-dimensional real space, extending the way that the complex numbers capture the algebra of rotations of 2-dimensional real space.
Elements in the set of quaternions $$\Quat$$ are in one-to-one correspondence with points in 4-dimensional real space $$\R^4\text{.}$$ We will write $$r\leftrightarrow (t,x,y,z)$$ to denote that the quaternion $$r$$ corresponds to the 4-tuple $$(t,x,y,z)$$ of real numbers.

### Subsection1.2.1Cartesian form and pure quaternions

The quaternions $$i,j,k$$ are defined as follows.
\begin{align} i \amp \leftrightarrow (0,1,0,0)\tag{1.2.1}\\ j \amp \leftrightarrow (0,0,1,0)\tag{1.2.2}\\ k \amp \leftrightarrow (0,0,0,1)\tag{1.2.3} \end{align}
The expression $$r=a+bi+cj+dk$$ is called the Cartesian form of the quaternion that corresponds to the vector $$(a,b,c,d)$$ in $$\R^4\text{.}$$ A quaternion of the form $$a=a+0i+0j+0k\leftrightarrow (a,0,0,0)$$ is called a scalar quaternion or a real quaternion. A quaternion of the form $$xi+yj+zk\leftrightarrow (0,x,y,z)$$ is called a pure quaternion or an imaginary quaternion. For a quaternion $$r=a+bi+cj+dk\text{,}$$ we call the real quaternion $$a$$ the scalar part or real part of $$r\text{,}$$ and we call the quaternion $$xi+yj+zk$$ the vector part or the imaginary part of $$r\text{.}$$ To reflect the natural correspondence of the pure quaternion $$xi+yj+zk$$ with the vector $$(x,y,z)$$ in $$\R^3\text{,}$$ we will write $$\R^3_\Quat$$ to denote the space of pure quaternions.

### Subsection1.2.2Correspondence with complex matrices

Analogous to the way that the complex numbers $$\C$$ can be realized as the set $${\mathcal M}_\C$$ of $$2\times 2$$ real matrices (see Exercise 1.1.3), the quaternions can be realized by a set of $$2\times 2$$ complex matrices, as follows. Let $${\mathcal M}_\Quat$$ denote the set of $$2\times 2$$ complex matrices of the form $$\left[\begin{array}{cc} u \amp v\\ -v^\ast \amp u^\ast\end{array}\right]\text{.}$$ Given a quaternion $$r=a+bi+cj+dk\text{,}$$ let $$u,v$$ be the complex numbers $$u=a+bi$$ and $$v=c+di\text{,}$$ and let $${M}(r)$$ denote the $$2\times 2$$ matrix in $${\mathcal M}_\Quat$$ given by
\begin{equation*} {M}(r)=\left[\begin{array}{cc} u \amp v\\ -v^\ast \amp u^\ast\end{array}\right]. \end{equation*}
Conversely, given a matrix $$M\in {\mathcal M}_\Quat\text{,}$$ with top left entry $$a+bi$$ and top right entry $$c+di\text{,}$$ let $$Q(M)$$ denote the quaternion $$r=a+bi+cj+dk\text{.}$$ It is clear that the mappings $$r\to M(r)$$ and $$M\to Q(M)$$ are inverses to one another, and establish a one-to-one correspondence $$\Quat\leftrightarrow {\mathcal M}_\Quat\text{.}$$

#### Checkpoint1.2.2.

By virtue of Proposition 1.2.1, we can define addition and multiplication of quaternions $$r,s$$ as follows.
\begin{gather} r+s=Q(M(r)+M(s))\tag{1.2.4}\\ rs=Q(M(r)M(s))\tag{1.2.5} \end{gather}
Because matrix algebra has associative and distributive laws, these carry over to quaternions. Note that quaternion multiplication is not commutative! However, for any real quaternion $$a\text{,}$$ we have $$M(a)=a\Id\text{,}$$ so $$M(a)$$ commutes with all matrices, and therefore $$a$$ commutes with all quaternions. To summarize, let $$q,r,s$$ be quaternions and let $$a$$ be a real quaternion. We have the following.
\begin{align} q(rs) \amp = (qr)s\;\; \text{ (associative law of multiplication)}\tag{1.2.6}\\ q(r+s)\amp = qr+qs \;\; \text{ (distributive law)}\tag{1.2.7}\\ ar\amp =ra \;\; \text{ (real quaternions commute with all quaternions)}\tag{1.2.8} \end{align}
In practice, it is not necessary to convert quaternions to matrices in order to add and multiply. Quaternion addition and multiplication in Cartesian form is analogous to complex multiplication, using the following basic multiplication rules.
\begin{gather} i^2=j^2=k^2=-1 \tag{1.2.9}\\ ij=-ji=k, \;\; jk=-kj=i, \;\; ki=-ik=j\tag{1.2.10} \end{gather}

#### Checkpoint1.2.3.

For $$r=a+bi+cj+dk$$ and $$r'=a'+b'i+c'j+d'k\text{,}$$ we have
$$r+r'=(a+a')+(b+b')i+(c+c')j+(d+d')k.\tag{1.2.11}$$
Multiplication looks like this.
\begin{align} rr'\amp = (a+bi+cj+dk)(a'+b'i+c'j+d'k) \notag\\ \amp = aa'+bb'i^2+cc'j^2+dd'k^2\notag\\ \amp + ab'i+ba'i+cd'jk+dc'kj\notag\\ \amp + ac'j+ca'j+bd'ik+db'ki\notag\\ \amp + ad'k+da'k+bc'ij+cb'ji\notag\\ \amp = (aa'-bb'-cc'-dd')\tag{1.2.12}\\ \amp + (ab'+ba'+cd'-dc')i\notag\\ \amp + (ac'+ca'-bd'+db')j\notag\\ \amp + (ad'+da'+bc'-cb')k\notag \end{align}
If $$u,v$$ are pure quaternions, (1.2.12) can be written more compactly in terms of the dot and cross products for vectors in $$\R^3\text{.}$$
$$uv = -(u\cdot v) + u\times v \;\;(\text{for pure quaternions }u,v)\tag{1.2.13}$$

### Subsection1.2.4Conjugate, modulus, and polar form

The conjugate of a quaternion $$r=a+bi+cj+dk$$ is $$r^\ast = a-bi-cj-dk\text{,}$$ and the modulus of $$r$$ is $$|r|=\sqrt{a^2+b^2+c^2+d^2}\text{.}$$ The unit quaternions, denoted $$U(\Quat)$$, is the set of quaternions with modulus 1.
1
The set of unit quaternions $$U(\Quat)$$ is in one-to-one correspondence with the 3-sphere $$S^3=\{(t,x,y,z)\in \R^4\colon t^2+x^2+y^2+z^2=1\}\text{.}$$ This is analogous to the set of norm 1 complex numbers that is in one-to-one correspondence with the 1-sphere $$S^1=\{(x,y)\in \R^2\colon x^2+y^2=1\}\text{.}$$
Analogous to complex numbers, a quaternion $$r$$ can be expressed in polar form
$$r=|r|(\cos \theta + u\sin \theta)\tag{1.2.14}$$
where $$u$$ is a pure unit quaternion and $$\theta$$ is a real number.

#### Checkpoint1.2.5.

1. Show that the following construction produces a polar form for a nonzero quaternion $$r\text{.}$$ Let $$r'=\frac{r}{|r|}=a'+b'i+c'j+d'k\text{.}$$ If $$|a'|\lt 1\text{,}$$ let $$u=\frac{1}{\sqrt{1-(a')^2}}(b'i+c'j+d'k)\text{,}$$ and let $$\theta=\arccos a'\text{.}$$
2. Fill in the remaining details on polar form for quaternions. What happens if $$r=0\text{?}$$ What happens if $$|a'|=1\text{?}$$
3. Are $$u,\theta$$ uniquely determined by $$r\text{?}$$ If not, describe the possible choices for $$u,\theta\text{.}$$
Continuing the analogy with complex numbers, we have the following, for all quaternions $$r,s\text{.}$$
\begin{gather} (rs)^\ast = s^\ast r^\ast\tag{1.2.15}\\ |r|^2 = rr^\ast=r^\ast r\tag{1.2.16}\\ |rs|=|r||s|\text{.}\tag{1.2.17} \end{gather}

#### Checkpoint1.2.6.

Verify the three equations above.
Hint.
Work in $${\mathcal M}_\Quat\text{.}$$ Start by checking that $$(M(r^\ast)) = (M(r))^\dagger\text{,}$$ where $$\dagger$$ denotes the conjugate transpose of a matrix. Alternatively, write $$r,s$$ in polar form and use (1.2.13).

### Subsection1.2.5Quaternions as rotations of $$\R^3_\Quat$$

Let $$r$$ be a unit quaternion and let $$v$$ be a pure quaternion. Let $$R_r(v)$$ denote the quaternion $$R_r(v)=rvr^\ast\text{.}$$ It is easy to check that $$(R_r(v))^\ast = -R_r(v)\text{.}$$ From this we conclude that $$rvr^\ast$$ is a pure quaternion.

#### Checkpoint1.2.7.

Explain how "we conclude" that $$R_r(v)$$ is pure when $$r$$ is a unit quaternion and $$v$$ is a pure quaternion.
It is easy to see that $$R_r$$ is a linear map from the real vector space of unit quaternions to itself. That means that the following properties hold for all pure quaternions $$v,w$$ and all real scalars $$\alpha\text{.}$$
\begin{gather} R_r(v+w) = R_r(v) + R_r(w)\tag{1.2.18}\\ R_r(\alpha v) = \alpha R_r(v)\tag{1.2.19} \end{gather}

#### Checkpoint1.2.8.

Show the details to prove that $$R_r$$ is linear.
We conclude with the main result of this section that shows how rotations of 3-dimensional real space are encoded in the algebra of quaternions.

### Exercises1.2.6Exercises

#### 1.

Prove Proposition 1.2.9 using the following outline. Let $$r=\cos\theta + u\sin\theta$$ be a polar form for a unit quaternion $$r\text{.}$$
1. Show that $$R_r(u)=u\text{.}$$
2. Let $$v$$ be any pure unit quaternion orthogonal to $$u\text{,}$$ and let $$w=u\times v\text{,}$$ so that the triple $$u,v,w$$ forms a right-handed coordinate system for $$\R^3\text{.}$$ Show that
$$R_r(v) = \cos(2\theta)v + \sin(2\theta)w\tag{1.2.20}$$
(use equation (1.2.13)) and then explain how this proves the Proposition.
Hint.
In deriving equation (1.2.20), you will obtain expressions $$uv-vu$$ and $$uvu\text{.}$$ Use equation (1.2.13) to show that $$uv-vu=2w$$ and $$uvu=v\text{.}$$ Show that the quaternion on the right side of (1.2.20) has norm 1. Finally, use the fact that
\begin{equation*} a\cdot b = |a||b|\cos t \end{equation*}
for real vectors $$a,b$$ that make an angle $$t$$ at the origin to determine the angle made by $$v,R_r(v)\text{.}$$

#### 2.

Show that the following hold for all $$r,s\in U(\Quat)\text{.}$$
1. $$\displaystyle R_r\circ R_s = R_{rs}$$
2. $$\displaystyle (R_r)^{-1}=R_{r^\ast}$$