SOLVETUTORMATH SOLVER

Instrument MI-01-468 · Mathematics

Quaternion Calculator

A quaternion packs four numbers into one value, and multiplying two of them together follows a rule unlike anything else on this site: order genuinely matters.

Instrument MI-01-468
Sheet 1 OF 1
Rev A
Verified
Type 05 — Algebra SER. 2026-01468

Product: w

-1.00000000

w = w₁w₂ − x₁x₂ − y₁y₂ − z₁z₂

0.00000000 Product: x
7.00000000 Product: y
10.00000000 Product: z
The working Every figure verified twice
  1. w = 1·2 − 2·0 − 3·1 − 4·0 = -1.00000000
  2. x = 1·0 + 2·2 + 3·0 − 4·1 = 0.00000000
  3. y = 1·1 − 2·0 + 3·2 + 4·0 = 7.00000000
  4. z = 1·0 + 2·1 − 3·0 + 4·2 = 10.00000000
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

A quaternion extends the complex number's single imaginary unit into three, written as w + xi + yj + zk, and multiplying two of them uses the Hamilton product: a fixed set of four formulas combining all eight input components into a new four-part result. The real part w behaves loosely like ordinary multiplication paired with a dot product of the imaginary parts, while x, y, and z each blend contributions from both quaternions in a pattern borrowed from three-dimensional rotation.

The property worth sitting with is that this multiplication does not commute: reverse the order of the two quaternions and the result generally changes. Real numbers don't behave that way — 3 times 5 always equals 5 times 3 — and neither do complex numbers, nor most matrix pairs handled elsewhere under everyday conditions. Quaternions break that habit on purpose; it's baked into the formulas themselves, not a quirk tied to any particular pair of values.

Two special cases anchor the whole system. Multiplying any quaternion by (1, 0, 0, 0) leaves it completely untouched, in either order, since that value plays the same role zero plays for addition or 1 plays for ordinary multiplication. Multiplying the unit i, written (0, 1, 0, 0), by itself produces (−1, 0, 0, 0) — the same i² = −1 rule that defines ordinary complex numbers, just carried over into four dimensions instead of two.

w=w1w2x1x2y1y2z1z2w = w_1w_2 - x_1x_2 - y_1y_2 - z_1z_2x=w1x2+x1w2+y1z2z1y2x = w_1x_2 + x_1w_2 + y_1z_2 - z_1y_2y=w1y2x1z2+y1w2+z1x2y = w_1y_2 - x_1z_2 + y_1w_2 + z_1x_2z=w1z2+x1y2y1x2+z1w2z = w_1z_2 + x_1y_2 - y_1x_2 + z_1w_2
w₁,x₁,y₁,z₁ — the four components of the first quaternion; w₂,x₂,y₂,z₂ — the four components of the second; w,x,y,z — the four components of the resulting product, in that same order.
  • Enter w, x, y, and z for Quaternion 1.
  • Enter w, x, y, and z for Quaternion 2.
  • Read the Product fields: w, x, y, and z of the result.
  • Swap the two quaternions' values and recompute to see the order-dependence directly.
  • Try (1, 0, 0, 0) as either quaternion to confirm the identity behaves as expected.

Worked example — (1,2,3,4) times (2,0,1,0)

Multiply the quaternion (1, 2, 3, 4) by (2, 0, 1, 0). The real part is w = (1)(2) − (2)(0) − (3)(1) − (4)(0) = 2 − 0 − 3 − 0 = −1. The i-part is x = (1)(0) + (2)(2) + (3)(0) − (4)(1) = 0 + 4 + 0 − 4 = 0. The j-part is y = (1)(1) − (2)(0) + (3)(2) + (4)(0) = 1 − 0 + 6 + 0 = 7. The k-part is z = (1)(0) + (2)(1) − (3)(0) + (4)(2) = 0 + 2 − 0 + 8 = 10. The full product is (−1, 0, 7, 10).

Order matters here: multiplying (2, 0, 1, 0) by (1, 2, 3, 4) instead — the reverse order — does not reproduce (−1, 0, 7, 10) for a pair like this one, exactly the non-commutative behavior that sets quaternions apart. Two easy checks confirm the special cases described above: (1, 0, 0, 0) times (5, 6, 7, 8) reproduces (5, 6, 7, 8) unchanged, and (0, 1, 0, 0) times itself gives (−1, 0, 0, 0), the four-dimensional echo of i² = −1.

Questions

What is the Hamilton product of two quaternions?

It's the rule for multiplying two quaternions together, producing a new four-part result from four fixed formulas. For (1, 2, 3, 4) times (2, 0, 1, 0), the Hamilton product works out to (−1, 0, 7, 10) — each formula combining all eight input numbers in a specific pattern.

Does quaternion multiplication commute like ordinary multiplication?

No — reversing the order of two quaternions generally produces a different result, unlike real or complex number multiplication, where order never matters. This non-commutative behavior is one of the defining features separating quaternions from the number systems most people learn first.

What quaternion acts as the multiplicative identity?

(1, 0, 0, 0) does — multiplying any quaternion by it, in either order, leaves that quaternion completely unchanged. Multiplying (5, 6, 7, 8) by (1, 0, 0, 0), for instance, still returns (5, 6, 7, 8).

Why does the unit i squared equal negative one?

Because quaternions are built to extend complex numbers, where i² = −1 already holds. Multiplying (0, 1, 0, 0) by itself through the Hamilton product gives (−1, 0, 0, 0), showing the same rule carries straight over into four dimensions.

What are quaternions used for outside of pure math?

They're widely used to represent rotations in three-dimensional space — in flight software, robotics, and computer graphics — because they avoid a rotation-order ambiguity that plain angle-based methods can run into.

How many numbers make up a single quaternion?

Four — one real component, labeled w, and three imaginary components, labeled x, y, and z, corresponding to the units i, j, and k. All four combine through the Hamilton product whenever two quaternions get multiplied together.

References