A powerful tool for all quaternion operations.
Enter the components of your quaternions, select an operation, and get instant results. Supports addition, subtraction, multiplication, and more.
Explore these examples to understand common quaternion operations.
Component-wise addition of two quaternions.
q1: w=1, x=2, y=3, z=4
q2: w=5, x=6, y=7, z=8
Demonstrates the non-commutative multiplication.
q1: w=0, x=1, y=0, z=0
q2: w=0, x=0, y=1, z=0
Negates the vector part of the quaternion.
q1: w=3, x=-1, y=2, z=5
Calculates the inverse, useful for undoing rotations.
q1: w=1, x=1, y=1, z=1
q = w + xi + yj + zk
, where w
, x
, y
, and z
are real numbers, and i
, j
, and k
are the fundamental quaternion units.i² = j² = k² = ijk = -1
. This leads to other important identities, such as ij = k
, jk = i
, ki = j
, and their anti-commutative counterparts ji = -k
, kj = -i
, ik = -j
. This non-commutative property (ij ≠ ji
) is a key feature of quaternions and is crucial for representing 3D rotations correctly.w
) and a vector part (v = xi + yj + zk
). This structure makes them incredibly useful for representing orientations and rotations in three-dimensional space.w
, x
, y
, z
) into the respective input fields. The calculator accepts integers and decimal values.q1 * q2
is the same as q2 * q1
. Correction: This is false. The order of multiplication matters immensely. In terms of rotations, q1 * q2
means applying rotation q2
first, followed by rotation q1
. Reversing the order produces a different final orientation.w
Component is the Rotation Anglew
component directly represents an angle. Correction: The rotation is encoded in all four components. For a rotation of angle θ
around a unit vector axis (ax, ay, az)
, the corresponding quaternion is q = cos(θ/2) + (ax*sin(θ/2))i + (ay*sin(θ/2))j + (az*sin(θ/2))k
.q1 = w1 + x1i + y1j + z1k
and q2 = w2 + x2i + y2j + z2k
, their product q1 * q2
is: w = w1w2 - x1x2 - y1y2 - z1z2
, x = w1x2 + x1w2 + y1z2 - z1y2
, y = w1y2 - x1z2 + y1w2 + z1x2
, z = w1z2 + x1y2 - y1x2 + z1w2
.q
is defined as q⁻¹ = q* / ||q||²
, where q*
is the conjugate of q
and ||q||
is its norm. The conjugate q*
is w - xi - yj - zk
, and the squared norm ||q||²
is w² + x² + y² + z²
.v
using a unit quaternion q
, you first represent the vector as a pure quaternion p = 0 + v_x i + v_y j + v_z k
. The rotated vector v'
is then found by computing p' = q * p * q⁻¹
, where q⁻¹
is the inverse of q
(which is also its conjugate, since q
is a unit quaternion). The vector part of the resulting quaternion p'
is the rotated vector v'
.