2D rotation commute, but 3D rotation does not.
We need 3 degree of freedom for rotation. You can use a vector to denote some rotation (like rotation earth), but you that doesn't cover all rotation. (Although you can do it using two consecutive rotation, but that's no longer 3 degree of freedom)
Note: I think \imath = \sqrt{-1} is a bull shit since it is not normal algebra. This relation only exists if we defined Complex Multiplication. Solve z in z^2 = \imath
Complex Number: 2D vectors with basis (1, \imath), but instead of using parenthesis, we write it as a + b \imath
Reason for complex number: adding the notion of tuple in a field Example: think about a way to represent a tuple \mathbb{R}^2 within \mathbb{R}.
Complex Multiplication (*): a new operation just like vector dot product and cross product we defined.
angles add
magnitudes multiply
Note: Complex Multiplication A * B behaves like linear transformation where A = a + a_i\imath = \langle{a, a_i}\rangle, B = b + b_i\imath = \langle{b, b_i}\rangle. Think A as the transformation where the vector \langle{a, a_i}\rangle is where \hat{i} lands and \hat{j} remain in relation to \hat{i}. (Rotation only)
In above example:
Real Part: \text{Re}(z_1z_2) = (ac - bd)
Imaginary Part: \text{Im}(z_1z_2) = (ad + bc)
Complex Addition and Subtraction: vector addition and subtraction
Complex Division: reverse Complex Multiplication
Complex Power: multiple Complex Multiplication
Euler's Formula: e^{\imath \theta} = \cos \theta + \imath \sin \theta (this is a mapping from an angle \theta to a unit vector in 2D plane)
We implement using Euler's Formula: z_1 = r_1e^{t\theta_1}, z_2 = r_2e^{t\theta_2}
Then: z_1z_2 = r_1r_2e^{\imath(\theta_1 + \theta_2)} = r_1r_2(\cos(\theta_1 + \theta_2) + \imath \sin(\theta_1 + \theta_2))
Therefore: we see complex operation preserves invariants of Complex Multiplication
// QUESTION: prove (a + bi)*(c + di) = whatever your result is using definition
// QUESTION: how is high dimensional complex number relate to quaternion
It gives us a easy way calculate \cos(75 \deg)
Definition: i^2 = j^2 = k^2 = ijk = -1
ij = -ji = k
jk = -kj = i
ki = -ik = j
Hamilton Space: \mathbb{H} := \text{span}(\{1, \imath, \jmath, k\})
Complex Product not Commutative: pq \neq qp
This is because rotation not commutative.
Quaternion is a point in Hamilton Space
Interactive Video Explaining Quaternions
We can simplify above equation by viewing the real part as a scalar and the imagenary part as a vector (dot products and cross products).
Quaternion Multiplication in Vector Form:
When the quaternions comes from \mathbb{R}^3 (ie a = b = 0), then we can simplify (0, \overrightarrow{u})*(0, \overrightarrow{v}) = \overrightarrow{u}*\overrightarrow{v} = \overrightarrow{u} \times \overrightarrow{v} - \overrightarrow{u} \cdot \overrightarrow{v}
We first write vectors v \in \mathbb{R}^3 as the imagenary part of a quaternion x \in \text{Im}(\mathbb{H}) with zero real part.
Unit Quaternion: q \in \mathbb{H} | \|q\| = 1
Complex Reflection: let q = a + b\imath + c\jmath + dk, then \bar{q} = a - b\imath - c\jmath - dk
Rotation Expression: \bar{q}xq express some rotation along an axis. q = \cos(\theta / 2) + \sin(\theta / 2)\overrightarrow{u}
where \theta is the angle
were \overrightarrow{u} is the rotational axis
Slerp: spherical linear Interpolation
Represent 3D rotation using a rotational axis. That's it. Downside is that axis angle requires many trignometry and hard to think about.
Table of Content