Skip to content

Quaternion calculator

Multiply, conjugate, invert or normalize a quaternion, or rotate a 3D vector.

Inputs

Processed in your browser.

Result

Enter values, then calculate.

How to use

Choose an operation and enter q in scalar-first order: w, x, y, z, separated by spaces or commas. Only multiplication needs p; only rotation needs the three vector coordinates. Calculate confirms the values. Editing an input removes the previous result; Clear empties the fields, and Copy saves the confirmed answer. The pale initial values are executable examples. Focusing or editing the first value field clears all example values once; later fields keep your own entries. Clear leaves the form empty.

Method and interpretation

Hamilton multiplication uses i² = j² = k² = ijk = −1. Order matters: q × p generally differs from p × q. For rotations, q × p applies p first. The conjugate changes the signs of x, y and z; the inverse divides the conjugate by |q|². Normalization divides every component by |q|.

Examples

For a right-handed active rotation of a column vector, v′ = u (0, v) conjugate(u), where u = q / |q|. Enter q = 0.7071067811865476, 0, 0, 0.7071067811865476 and v = 1, 0, 0: the result is approximately (0, 1, 0), a positive 90° turn around z.

Limits and errors

Zero has a conjugate and can be multiplied, but has no inverse, normalized form or rotation. Enter finite decimal numbers with a dot, optionally using scientific notation; magnitudes above 1e100 are rejected. Results use floating-point arithmetic and up to nine significant digits, so tiny residuals may occur. This is a calculation aid, not a 3D editor. Nonzero input components must have absolute values from 1e-100 to 1e100; exact zero is allowed. Smaller values are rejected to prevent underflow.

Frequently asked questions

Why do q and −q rotate identically?

Their two sign changes cancel in the sandwich product. Does rotation change vector length? No: normalization preserves length, apart from numerical rounding.