---
title: 'Hamilton’s Quaternions: Algebra & Applications'
url: https://www.emergentmind.com/topics/hamilton-quaternion
type: topic
---

# Hamilton’s Quaternions: Algebra & Applications

Hamilton’s quaternions constitute the first and most fundamental example of a non-commutative division algebra over the real numbers. Developed by William Rowan Hamilton in 1843, quaternions generalized the complex numbers to facilitate the description of three-dimensional geometry, particularly for applications involving rotations and kinematical transformations. Quaternions form a four-dimensional real vector space endowed with a specific multiplication law that makes them an associative algebra. Their algebraic, geometric, and analytic properties underpin a prevalence in mathematics, physics, engineering, and, more recently, machine learning contexts.

## 1. Algebraic Structure and Properties

A quaternion is defined as an element of the form
\[
q = a + b\,i + c\,j + d\,k, \quad a,b,c,d\in\mathbb{R},
\]
where \(1, i, j, k\) are linearly independent over \(\mathbb{R}\) and satisfy
\[
i^2 = j^2 = k^2 = i\,j\,k = -1.
\]
This system is equipped with non-commutative multiplication determined by
\[
i^2 = j^2 = k^2 = -1, \quad ij = k, \quad ji = -k, \quad jk = i, \quad kj = -i, \quad ki = j, \quad ik = -j,
\]
extended bilinearly and associatively. The multiplication table for the basis \(\{1, i, j, k\}\) is as follows:

|   ×  |  1 |  i  |  j  |  k  |
|:----:|:--:|:---:|:---:|:---:|
| **1**| 1  |  i  |  j  |  k  |
| **i**| i  | -1  |  k  | -j  |
| **j**| j  | -k  | -1  |  i  |
| **k**| k  |  j  | -i  | -1  |

Addition and real scalar multiplication are defined componentwise. The quaternion conjugate is given by
\[
\overline{q} = a - b\,i - c\,j - d\,k,
\]
and the norm is
\[
|q|^2 = q\,\overline q = a^2 + b^2 + c^2 + d^2.
\]
For \(q \neq 0\), the multiplicative inverse is
\[
q^{-1} = \frac{\overline{q}}{|q|^2}.
\]
Thus, quaternions form a normed division algebra over \(\mathbb{R}\), and as a vector space,
\[
\mathbb{H} \cong \mathbb{R}^4,
\]
where the quaternion product reduces to complex multiplication when \(c = d = 0\), i.e., for the subalgebra \(\mathbb{C} \subset \mathbb{H}\) [1606.03315, 2107.02678, 2307.08663].

## 2. Quaternionic Representation of Rotations in \(\mathbb{R}^3\)

“Pure” quaternions, those with vanishing scalar part (\(a = 0\)), can be identified with vectors in \(\mathbb{R}^3\):
\[
v = 0 + b\,i + c\,j + d\,k.
\]
Given a unit quaternion \(q = a + \mathbf{u}\), with \(a^2 + \|\mathbf{u}\|^2 = 1\), the rotation of the vector \(v\) is realized by the map
\[
v \mapsto q\,v\,q^{-1}.
\]
This action preserves the norm and orientation, implementing the rotation of \(v\) about axis \(\mathbf{u} / \|\mathbf{u}\|\) by angle \(\theta\), where \(q = \cos(\theta/2) + \sin(\theta/2)(u_x i + u_y j + u_z k)\). The explicit formula,
\[
R_q(v) = v\cos\theta + (\mathbf{u}\times v)\sin\theta + \mathbf{u}(\mathbf{u}\cdot v)(1-\cos\theta),
\]
reproduces the classical Rodrigues formula for rotations in three-dimensional space. Every rotation in \(\mathrm{SO}(3)\) is represented in this manner via conjugation by a unit quaternion, with the pairs \(q, -q\) yielding the same rotation [1606.03315, 2107.02678].

## 3. Matrix Realization, Group Structure, and the Pauli Correspondence

Any quaternion \(q = a + b\,i + c\,j + d\,k\) can be represented as a \(2 \times 2\) complex matrix:
\[
F(q) = 
\begin{pmatrix}
a + b\,i & c + d\,i \\
-c + d\,i & a - b\,i
\end{pmatrix},
\]
with the property \(F(q_1 q_2) = F(q_1)F(q_2)\) and \(\det F(q) = |q|^2\). The set of unit quaternions corresponds bijectively to \(\mathrm{SU}(2)\), the group of \(2 \times 2\) unitary matrices of determinant 1:
\[
\{q: |q| = 1\} \leftrightarrow \mathrm{SU}(2).
\]
Conjugation \(v \mapsto q v q^{-1}\) yields a surjective homomorphism \(\mathrm{SU}(2) \to \mathrm{SO}(3)\) with kernel \(\{\pm 1\}\), indicating that \(\mathrm{SU}(2)\) is the double cover of \(\mathrm{SO}(3)\).

The canonical basis elements have a direct correspondence with the Pauli matrices under the identifications:
\[
i \mapsto i \sigma_3, \quad j \mapsto i \sigma_2, \quad k \mapsto i \sigma_1,
\]
where the Pauli matrices satisfy
\[
\sigma_i^2 = I, \quad \sigma_i \sigma_j = -\sigma_j \sigma_i \ (i \neq j), \quad \sigma_1\sigma_2 = i\sigma_3.
\]
This correspondence is foundational in quantum theory, with the Lie algebra \(\mathfrak{su}(2)\) generated by these purely imaginary components [1606.03315].

## 4. Quaternionic Methods in Celestial Mechanics

Hamilton’s formulation enables a quaternionic regularization of the three-dimensional Kepler problem, circumventing the singularity at \(r=0\) using the Kustaanheimo–Stiefel (KS) transformation:
\[
q \in \mathbb{H} \implies x = q q^* \in \mathbb{R}^3,
\]
where the “star” conjugate \(q^*\) inverts the sign on the \(k\)-component. Under a new time parameter \(\tau\) with \(dt = r d\tau\), the Kepler equation transforms into a four-dimensional linear oscillator equation. The general solution,
\[
u(\tau) = A \cos(\omega \tau) + B \sin(\omega \tau),
\]
can be mapped back to physical space, providing direct and transparent derivations of the three classical Kepler laws:
1. Orbits are ellipses (\(x(E) = c + a\cos E + i\,b\sin E\)),
2. Equal areas in equal times (\(\dot\Sigma = \frac{1}{2}r^2 \dot\varphi = \text{const}\)),
3. The harmonic law (\(T^2 / a^3 = \text{const}\)),
where \(T\) is the period and \(a\) is the semi-major axis [2107.02678].

## 5. The Hopf Fibration and Higher-Geometric Interpretations

The set of unit quaternions forms the three-sphere \(S^3 = \{q \in \mathbb{H} : |q| = 1\}\). The Hopf fibration is the canonical mapping
\[
h: S^3 \to S^2, \quad h(q) = q k q^{-1},
\]
where \(k\) is a fixed unit imaginary quaternion. The fibers of this fibration are circles \(S^1\), with
\[
\{q e^{i\phi} : \phi \in [0, 2\pi)\} \cong S^1,
\]
demonstrating that \(S^3\) is a nontrivial \(S^1\)-bundle over \(S^2\). In homogeneous coordinates \((z_1, z_2) \in \mathbb{C}^2\), the Hopf map is
\[
(z_1, z_2) \mapsto \left(2 \Re(z_1 \overline{z_2}),\; 2 \Im(z_1 \overline{z_2}),\; |z_1|^2 - |z_2|^2\right).
\]
This geometric structure has implications in topology, gauge theory, and geometric analysis [1606.03315].

## 6. Hamilton Product and Quaternionic Neural Networks

Quaternions, specifically the Hamilton product, have been adapted as computational primitives in Quaternion-Valued Convolutional Neural Networks (QCNNs), offering intrinsic interchannel coupling. Given
\[
q_1 = a_1 + b_1 \hat{\imath} + c_1 \hat{\jmath} + d_1 \hat{k}, \quad
q_2 = a_2 + b_2 \hat{\imath} + c_2 \hat{\jmath} + d_2 \hat{k},
\]
the product is
\[
\begin{aligned}
q_1 q_2 &= (a_1 a_2 - b_1 b_2 - c_1 c_2 - d_1 d_2) \\
&\quad + (a_1 b_2 + b_1 a_2 + c_1 d_2 - d_1 c_2)\, \hat{\imath} \\
&\quad + (a_1 c_2 - b_1 d_2 + c_1 a_2 + d_1 b_2)\, \hat{\jmath} \\
&\quad + (a_1 d_2 + b_1 c_2 - c_1 b_2 + d_1 a_2)\, \hat{k}.
\end{aligned}
\]
QCNN architectures implement convolution, backpropagation, and optimization entirely within the quaternionic algebra, achieving parameter reductions of up to \(\sim 4 \times\) compared to real-valued equivalents, while maintaining or surpassing performance in domains such as image classification, 3D shape recognition, and generative modeling. Empirical studies report, for example, that a quaternion ResNet with 932K parameters matches or outperforms its real-valued counterpart with 3.6M parameters on CIFAR-10 (94.56% vs 93.63% accuracy). Essential mechanisms include split-component activation functions (e.g., QReLU), quaternion batch normalization, and spectral normalization. Active research directions include generalization beyond quaternions, QCNNs in the frequency domain, analytic quaternionic activations, and group-theoretic frameworks unifying various convolutional implementations [2307.08663].

## 7. Connections and Impact Across Mathematics and Applications

All foundational aspects of Hamilton’s quaternions—the non-commutative four-dimensional real algebra, unit-quaternion group structure, their conjugation-induced rotational action, explicit matrix realizations in \(\mathrm{SU}(2)\), Pauli correspondence, Hopf fibration, and contemporary uses in quaternionic neural networks—trace directly to the defining axioms
\[
i^2 = j^2 = k^2 = ijk = -1
\]
and the multiplicative behavior of the quaternion modulus. A central implication is the unifying role of quaternions in expressing spatial symmetries, encoding rotations, and regularizing dynamical systems. Their contemporary computational adoption leverages these algebraic and geometric invariances to produce efficient, expressive, and interpretable models in machine learning, signal processing, and beyond [1606.03315, 2107.02678, 2307.08663].

Source: https://www.emergentmind.com/topics/hamilton-quaternion