Advanced

Quaternion Calculator

Perform quaternion arithmetic: add q₁ + q₂, subtract q₁ − q₂, or multiply q₁ × q₂ using the Hamilton product. Also shows magnitude, conjugate and inverse of q₁, with a full step-by-step derivation of the multiplication.

Operation

|Result|
72.24957

Result: −60 + 12i + 30j + 24k

Result w (real)
-60
Result x (i)
12
Result y (j)
30
Result z (k)
24
|q₁|
5.47723
|q₂|
13.19091
q₁ conjugate
1 − 2i − 3j − 4k
q₁ inverse
0.0333 − 0.0667i − 0.1j − 0.1333k
Step-by-step computation
1

Real part (w): w₁w₂ − x₁x₂ − y₁y₂ − z₁z₂

1·5 − 2·6 − 3·7 − 4·8 = -60
2

i component: w₁x₂ + x₁w₂ + y₁z₂ − z₁y₂

1·6 + 2·5 + 3·8 − 4·7 = 12
3

j component: w₁y₂ − x₁z₂ + y₁w₂ + z₁x₂

1·7 − 2·8 + 3·5 + 4·6 = 30
=

k component: w₁z₂ + x₁y₂ − y₁x₂ + z₁w₂

1·8 + 2·7 − 3·6 + 4·5 = 24
Step by step
  1. 1

    Sum of squared components

    -60² + 12² + 30² + 24² = 5,220
  2. 2

    Magnitude |result|

    √5,220 = 72.24957
    The magnitude equals the square root of the sum of squares of all four components.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Quaternion multiplication follows q₁×q₂ = (w₁w₂−x₁x₂−y₁y₂−z₁z₂) + ... (see formula). Addition is component-wise. Multiplication is NOT commutative: q₁×q₂ ≠ q₂×q₁. |q| = √(w²+x²+y²+z²); inverse = q*/|q|². Unit quaternions (|q|=1) represent 3-D rotations.

Formula
q₁ × q₂ = (w₁w₂−x₁x₂−y₁y₂−z₁z₂) + (w₁x₂+x₁w₂+y₁z₂−z₁y₂)i + (w₁y₂−x₁z₂+y₁w₂+z₁x₂)j + (w₁z₂+x₁y₂−y₁x₂+z₁w₂)k
How this is calculated

A quaternion is a four-dimensional extension of the complex numbers, written q = w + xi + yj + zk, where w is the real (scalar) part and x, y, z are the imaginary (vector) components. The three imaginary units satisfy i² = j² = k² = ijk = −1 and the non-commutative rules ij = k, jk = i, ki = j, ji = −k, kj = −i, ik = −j. William Rowan Hamilton discovered quaternions in 1843.

Addition and subtraction are component-wise, exactly like complex numbers: (w₁ ± w₂, x₁ ± x₂, y₁ ± y₂, z₁ ± z₂). Multiplication (the Hamilton product) uses the distributive law together with the ij=k etc. rules, which yields the four-component formula shown above. Crucially, quaternion multiplication is NOT commutative: q₁ × q₂ ≠ q₂ × q₁ in general.

The magnitude (norm) is |q| = √(w² + x² + y² + z²). The conjugate is q* = w − xi − yj − zk (negate the imaginary parts). The inverse is q⁻¹ = q* / |q|² — only defined for non-zero quaternions. Unit quaternions (|q| = 1) represent 3-D rotations and are the basis of modern computer graphics and robotics orientation maths.

Frequently asked questions

Quaternions extend complex numbers to four dimensions with three imaginary units i, j, k. The multiplication rules ij = k and ji = −k mean the order matters, just as matrix multiplication is order-dependent. This non-commutativity is exactly what makes quaternions useful for representing 3-D rotations (which also do not commute — rotating X then Y differs from Y then X).

Quaternions are heavily used in 3-D computer graphics, robotics, aerospace and game engines to represent orientations and perform smooth rotations (via SLERP — spherical linear interpolation). They avoid "gimbal lock" — a pathology that plagues Euler-angle representations — and are computationally cheaper than 3×3 rotation matrices for composing and interpolating rotations.

A unit quaternion has magnitude |q| = 1. Unit quaternions parametrise the rotation group SO(3): every 3-D rotation can be encoded as q = cos(θ/2) + sin(θ/2)·(xi + yj + zk), where (x,y,z) is the unit rotation axis and θ the angle. To rotate a vector v, compute q·v·q⁻¹ (treating v as the quaternion 0 + vxi + vyj + vzk).

Also known as

quaternion multiplication calculator
hamilton product calculator
quaternion addition subtraction
quaternion norm magnitude
quaternion conjugate inverse
hypercomplex number calculator

APA

TG we-Calculate Editorial Team. (2026). Quaternion Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/quaternion-calculator

Chicago

TG we-Calculate Editorial Team. "Quaternion Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/quaternion-calculator.

IEEE

TG we-Calculate Editorial Team, "Quaternion Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/quaternion-calculator

BibTeX

@misc{wecalculate_quaternion_calculator, title = {Quaternion Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/quaternion-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?