Back to Home

Quaternions as a vector space \(\mathbb{H}\)

The article reveals quaternions as a 4-dimensional vector space \(\mathbb{H}\). Describes bilinear decompositions of multiplication, norms, rotations and connection with octonions. Suitable for senior developers in graphics and physics.

Linear algebra of quaternions: rotations and norms
Advertisement 728x90

Quaternions in Linear Algebra: Vector Spaces and Operations

Quaternions form a vector space \(\mathbb{H}\) over the real numbers \(\mathbb{R}\), with dimension 4. The basis consists of unit vectors \(\hat{h}, \hat{\imath}, \hat{\jmath}, \hat{k}\), where \(\hat{h}\) represents the real part and the others the imaginary subspace.

Any quaternion is written as \(\mathbf{q} = x^0 \hat{h} + x^1 \hat{\imath} + x^2 \hat{\jmath} + x^3 \hat{k} = x^0 + \vec{q}\), where \(\vec{q}\) is the vector of the imaginary part. Addition of quaternions and scalar multiplication by reals from \(\mathbb{R}\) are closed in \(\mathbb{H}\) and satisfy vector space axioms.

The imaginary subspace \(\Im = \{ \mathbf{q} \in \mathbb{H} \mid x^0 = 0 \}\) is \(\mathbb{R}^3\) with basis \(\hat{\imath}, \hat{\jmath}, \hat{k}\). It's closed under addition and scalar multiplication, but the product of two pure quaternions leaves \(\Im\): \(\mathbf{q}_1 \mathbf{q}_2 = - \langle \vec{q}_1, \vec{q}_2 \rangle + \vec{q}_1 \times \vec{q}_2\).

Google AdInline article slot

Reduced and Bilinear Operations

The reduced quaternion product extracts the scalar part of the standard product: \(\mathbf{q}_1 \circ \mathbf{q}_2 = \langle \mathbf{q}_1, \mathbf{q}_2 \rangle = x_1^0 x_2^0 - \vec{q}_1 \cdot \vec{q}_2\). This is a bilinear, symmetric, and positive definite form.

Full quaternion multiplication decomposes into three bilinear forms:

  • Intrascular product: \(x_1^0 x_2^0\)
  • Complex: \(x_1^0 \vec{q}_2 + x_2^0 \vec{q}_1\)
  • Vector: \(- \vec{q}_1 \cdot \vec{q}_2 + \vec{q}_1 \times \vec{q}_2\)
\mathbf{q}_1 \mathbf{q}_2 = (x_1^0 x_2^0 - \vec{q}_1 \cdot \vec{q}_2) + (x_1^0 \vec{q}_2 + x_2^0 \vec{q}_1 + \vec{q}_1 \times \vec{q}_2)

Quaternion norm: \(||\mathbf{q}|| = \sqrt{x_0^2 + |\vec{q}|^2}\), Euclidean in \(\mathbb{R}^4\).

Google AdInline article slot

Rotations and Scaling

Unit quaternions \(\hat{\mathbf{q}} = \cos \angle_q + \hat{q} \sin \angle_q\) represent rotations in the imaginary \(\Im\). Action on a vector \(\mathbf{v} \in \Im\): \(\hat{\mathbf{q}} \mathbf{v} \hat{\mathbf{q}}^{-1}\).

A real-imaginary rotation \(r \hat{q}\), where \(r \in \mathbb{R}\), \(\hat{q} \in \Im\), scales space along the \(\hat{q}\) axis: \(r \hat{q} \mathbf{v} (r \hat{q})^{-1} = r^2 \langle \mathbf{v}, \hat{q} \rangle \hat{q} + \mathbf{v}_\perp\).

Any quaternion equals a rotation of a real scalar around an imaginary axis: \(\mathbf{q} = |\mathbf{q}| e^{\angle_q \hat{q}}\).

Google AdInline article slot

Comparison with octonions \(\mathbb{O}\): dimension 8, 7 imaginary units, alternative (non-associative) algebra. Multiplication table shows loss of associativity, e.g., \(\jmath \circ (\ell \circ m) \neq (\jmath \circ \ell) \circ m\).

Practical Aspects

  • Basis properties: \(\imath^2 = \jmath^2 = k^2 = -1\), \(\imath \jmath = k\), cyclic.
  • Conjugate: \(\overline{\mathbf{q}} = x^0 - \vec{q}\), \(\mathbf{q} \overline{\mathbf{q}} = ||\mathbf{q}||^2\).
  • Pure quaternions: \(\mathbf{q}^* = \vec{q}\), lie in \(\Im\).

For developers: quaternions shine in 3D graphics for rotation interpolation (SLERP), offering compactness and numerical stability over 3×3 matrices.

Key Takeaways

  • Quaternions are a 4D Euclidean space with non-commutative multiplication.
  • Multiplication decomposes into bilinear forms for easier analysis.
  • Unit quaternions parameterize SO(3) without gimbal lock.
  • Real-imaginary rotations enable anisotropic scaling.
  • Octonions extend the algebra but lose associativity.

— Editorial Team

Advertisement 728x90

Read Next