As is well-known, in dimension 2, a linear map $f : \mathbb{R}^2 \rightarrow \mathbb{R}^2$ is a direct similarity if, once we identify $\mathbb{R}^2$ with $\mathbb{C}$, $f$ is of the form
$$\forall z \in \mathbb{C}, \quad f(z) = a z + b$$
with $a \in \mathbb{C}\backslash \{0\}$ and $b \in \mathbb{C}$. This gives an especially appealing way of describing and parameterizing similarities. By writing $a = r\mathrm{e}^{\mathrm{i} \theta}$ with $r >0$ and $\theta \in [0,2\pi)$, we recover that a similarity is the combination of a rotation (of angle $\theta$), a homothety (of parameter $r$), and a translation (of $b$). 


I am curious about possible extension of this result in dimension 3. Of course, there is no three-dimensional space such as the complex numbers. However, it is possible to describe 3D direct similarities in terms of a combination of homotheties (around a certain point, possibly non-zero), rotations (idem), and translations. Since we can represent 3D-rotations with unit-quaternions (see [this nice Youtube video](https://www.youtube.com/watch?v=zjMuIxRvygQ)), I am wondering if there is a nice comparable relation to $f(z) = az + b$ above in the 3D case.



3D similarities and quaternions?
Call a quaternion whose scalar part is zero a vector quaternion. We shall denote the vector quaternions as $\mathbb R^3$. Given $q = w + xi + yj + zk$, we shall define $q^\*$ (called the "conjugate" of $q$) to be $w - xi - yj - zk$.


If $q$ is a unit quaternion, then $v \in \mathbb R^3\mapsto qvq^\*$ is a rotation. All rotations about the origin in 3D can be given in this form.


If $q$ is a general (i.e. not necessarily a unit) quaternion, then $v \mapsto qvq^\*$ is a rotation followed by a dilation from the origin by $|q|^2$ units.


Finally, add a vector quaternion $x$ to perform a translation. We thus get $v \mapsto qvq^\* + x$ as a general form for similarity transformations.


Postscript: This can be generalised to higher dimensions, and some non-Euclidean geometries, using Clifford algebras.


