I have a little problem wrapping my head around quaternions, in particular I have problems about how to pair the usual "3D algebra" with the theoretic vision of a quaternion.
I know that informally a quaternion is a structure composed of 3 imaginary parts and 1 coefficient/real part .
Now back to elementary number theory, I know that I can visualize a pair composed of an imaginary number + a real part in $\mathbb{R^2}$, the so called complex numbers can be visulized this way with all their properties.
The problem comes when I have 3 imaginary parts and only 1 real, even more, I have to somehow group this into the same family with Euler angles and cartesian coordinates .
I know that mathematicians usually skip this part quite easily by telling you that $\mathbb{i}$ is just a "device" but I know a have a quaternion that is effectively using 4 dimensions, working in a 3 dimensional space while being comparable to other " native $\mathbb{R^3}$ solutions " such as Euler angles .
My question is why quaternions works so well in a 3D metric space and is a quaternion a 4D object ?
The quaternion algebra can be derived from a clifford algebra built upon 3d space. This construction proves the usefulness of quaternions for rotations as well.
Clifford algebra of 3d Euclidean spaces
The cliffod algebra of 3d space is built from a "geometric product" of vectors. Let $e_1, e_2, e_3$ be the basis of your 3d space. The geometric product obeys the following properties:
$$e_i e_j = \begin{cases} 1 & i =j \\ -e_j e_i & i \neq j\end{cases}$$
The product is also associative. This means that you get some products that can't be reduced to scalars: any individual vector can't be reduced, as well as products like $e_1 e_2$ or $e_1 e_2 e_3$. In general, these objects are called multivectors.
Clifford algebra and rotations and reflections
Given the geometric product, you can write rotations and reflections in a more compact manner. For instance, if $n$ is a unit vector normal to a plane, then any vector $a$ is reflected across that plane by $-nan$.
Any rotation can be performed by two reflections, so given two unit vectors $m$ and $n$, a rotation takes the form $mnanm$. The quantity $q = mn$ takes the following form:
$$q = mn = q_0 + q^{12} e_1 e_2 + q^{23} e_2 e_3 + q^{31} e_3 e_1$$
That looks like a quaternion, doesn't it? Indeed, see that $(e_1 e_2)^2 = -1$ and the same for the other basis "bivectors". In clifford algebra, objects like $q$ are called "versors" or "rotors", but they are in direct correspondence to quaternions, obey all the same multiplication rules, and behave in exactly the same manner in all the usual respects.
So, from clifford algebra built directly on top of 3d space, we can derive something identical to quaternions. We can do so in a way that makes the connection to rotations manifest. The geometrical interpretation of a "rotor" or "quaternion" itself may be a little more difficult to conceptualize, but we can see how this object stems from a composition of reflections at least.