I'm learning Unity and came across a situation where rotations are represented as Quaternions. I've heard that they where used in computer graphics, but never had to use them until now. What I can't understand is, how do quaternions represents rotations in the three dimensional space?
I know that complex numbers represents rotations in the 2 dimensional space (such as multiplying a number by $i$ would move it by $\frac \pi 2$). This seems logical in the sense that $\Bbb C$ has two unit vectors $i$ and $1$, like the two dimensional space. Why would we need a four dimensional set to represent rotations on a three dimensional space? And what kind of rotation would a quaternion (for example $i+j+k+1$) represent?
Remark:
On the tutorial I'm following to learn Unity, I've used the Quaternion.Euler(float x, float y, float z)
function to create a rotation. From the documentation about the later:
Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis (in that order).
Note that the fourth dimension isn't used to define that rotation.