Skip to content
FiftyCalc Free calculators for all 50 states

Quaternion Calculator

Test cases replayed : 4 of 4 match · Methodology · No outside source listed

Enter two quaternions q₁ = a₁ + b₁i + c₁j + d₁k and q₂ = a₂ + b₂i + c₂j + d₂k and choose the operation.

Result

Sample figures

Result: real part—

Result: i part —

  • Result: j part—
  • Result: k part—
  • Norm of the result √(w² + x² + y² + z²)—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Quaternion Calculator

q₁: real part a₁: enter a number. Prefilled example: 1.

q₁: i part b₁: enter a number. Prefilled example: 2.

q₁: j part c₁: enter a number. Prefilled example: 3.

q₁: k part d₁: enter a number. Prefilled example: 4.

Operation: choose q₁ + q₂, q₁ − q₂, q₁ × q₂ (Hamilton product) or q₁ ÷ q₂ = q₁ × q₂⁻¹. Prefilled example: q₁ × q₂ (Hamilton product).

q₂: real part a₂: enter a number. Prefilled example: 5.

q₂: i part b₂: enter a number. Prefilled example: 6.

q₂: j part c₂: enter a number. Prefilled example: 7.

q₂: k part d₂: enter a number. Prefilled example: 8.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. q₁: real part a₁: enter a number.
  2. q₁: i part b₁: enter a number.
  3. q₁: j part c₁: enter a number.
  4. q₁: k part d₁: enter a number.
  5. Operation: choose q₁ + q₂, q₁ − q₂, q₁ × q₂ (Hamilton product) or q₁ ÷ q₂ = q₁ × q₂⁻¹.
  6. q₂: real part a₂: enter a number.
  7. q₂: i part b₂: enter a number.
  8. q₂: j part c₂: enter a number.
  9. q₂: k part d₂: enter a number.
  10. Read the result: Result: real part; the panel also shows Result: i part, Result: j part, Result: k part and Norm of the result √(w² + x² + y² + z²).

How this calculator works

Quaternions (W. R. Hamilton, 1843) extend complex numbers with three imaginary units that satisfy i² = j² = k² = ijk = −1, so ij = k, jk = i, ki = j, and reversing the order changes the sign (ji = −k).

Hamilton product: (a₁ + b₁i + c₁j + d₁k)(a₂ + b₂i + c₂j + d₂k) = (a₁a₂ − b₁b₂ − c₁c₂ − d₁d₂) + (a₁b₂ + b₁a₂ + c₁d₂ − d₁c₂)i + (a₁c₂ − b₁d₂ + c₁a₂ + d₁b₂)j + (a₁d₂ + b₁c₂ − c₁b₂ + d₁a₂)k.

Division here is right division, q₁ × q₂⁻¹, with q₂⁻¹ = (a₂ − b₂i − c₂j − d₂k) ÷ (a₂² + b₂² + c₂² + d₂²). Because multiplication is not commutative, q₂⁻¹ × q₁ is usually different.

Worked example

q₁: real part a₁1
q₁: i part b₁2
q₁: j part c₁3
q₁: k part d₁4
Operationq₁ × q₂ (Hamilton product)
q₂: real part a₂5
q₂: i part b₂6
q₂: j part c₂7
q₂: k part d₂8
Result: real part-60
Result: i part12
Result: j part30
Result: k part24
Norm of the result √(w² + x² + y² + z²)72.2496

Frequently asked questions

Is quaternion multiplication commutative?

No. For example ij = k but ji = −k, so q₁ × q₂ and q₂ × q₁ usually differ.

What is (1 + 2i + 3j + 4k)(5 + 6i + 7j + 8k)?

−60 + 12i + 30j + 24k.

Related calculators