Quaternion Calculator
Add, subtract, multiply, or divide two quaternions.
Enter a+bi+cj+dk components for each, choose an operation, and get the result with norm and conjugate.
Quaternions extend complex numbers from two dimensions to four. A quaternion is written q = a + bi + cj + dk, where a is the real (scalar) part and (b, c, d) is the vector part. The basis units satisfy i^2 = j^2 = k^2 = ijk = -1.
This single rule generates all the multiplication identities: ij = k, jk = i, ki = j, and ji = -k, kj = -i, ik = -j. Quaternion multiplication is non-commutative — q1 * q2 is generally not equal to q2 * q1. That non-commutativity is exactly what makes them useful for representing 3D rotations, where the order of rotations matters.
Operations supported:
Addition and subtraction work component-wise: (a1 + b1i + c1j + d1k) + (a2 + b2i + c2j + d2k) = (a1+a2) + (b1+b2)*i + (c1+c2)*j + (d1+d2)*k.
Multiplication uses the full distributive expansion. The result has real part a1a2 - b1b2 - c1c2 - d1d2, and vector parts that combine the dot product and cross product of the (b,c,d) parts.
Division q1 / q2 means q1 * (q2 inverse), where the inverse of q is its conjugate divided by its norm squared: q^(-1) = q* / |q|^2. The conjugate negates the vector part: q* = a - bi - cj - dk. The norm |q| = sqrt(a^2 + b^2 + c^2 + d^2) measures the quaternion magnitude.
Quaternions show up in computer graphics (avoiding gimbal lock in 3D rotations), spacecraft attitude control, robotics, and quantum mechanics (where Pauli matrices are essentially quaternions in disguise).
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.