Quaternion Calculator

Calculate quaternion operations, Hamilton products, 3D rotations, and transformations

Quaternion Operations

Quaternion Results

Operation Result:
2.0000
1.0000
|q₁| (Magnitude)
1.0000
|q₂| (Magnitude)
2.0000
|Result| (Magnitude)
q₁ Conjugate:
1.0000
q₂ Conjugate:
1.0000
q₁ Inverse:
1.0000

3D Vector Rotation

Rotation Results

Rotation Quaternion:
0.7071 + 0.7071k
Original Vector:
(0.0000, 0.0000, 0.0000)
Rotated Vector:
(0.0000, 0.0000, 0.0000)
3x3 Rotation Matrix:
[0.0000, -1.0000, 0.0000]
[1.0000, 0.0000, 0.0000]
[0.0000, 0.0000, 1.0000]

Basic Unity Quaternions

×1ijk
11ijk
ii-1k-j
jj-k-1i
kkj-i-1

Quaternion Properties

i² = j² = k² = ijk = -1

Multiplication is non-commutative

|q| = √(w² + x² + y² + z²)

q⁻¹ = q*/|q|² (conjugate/magnitude²)

Unit quaternions represent rotations

Understanding Quaternions

What are Quaternions?

Quaternions are a mathematical extension of complex numbers, discovered by William Rowan Hamilton in 1843. They consist of four real numbers: one real part (w) and three imaginary parts (x, y, z) with basis elements i, j, and k.

Quaternion Form

q = w + xi + yj + zk

Where w, x, y, z are real numbers and i, j, k are the fundamental quaternion units.

Hamilton Product

Quaternion multiplication follows the Hamilton product rules. The product of two quaternions q₁ and q₂ is calculated using the distributive property and the fundamental relations:

  • i² = j² = k² = ijk = -1
  • ij = k, jk = i, ki = j
  • ji = -k, kj = -i, ik = -j

3D Rotations

Unit quaternions (magnitude = 1) can efficiently represent rotations in 3D space. The rotation quaternion is: q = cos(θ/2) + sin(θ/2)(xi + yj + zk) where (x,y,z) is the unit rotation axis and θ is the rotation angle.