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
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.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- q₁: real part a₁: enter a number.
- q₁: i part b₁: enter a number.
- q₁: j part c₁: enter a number.
- q₁: k part d₁: enter a number.
- Operation: choose q₁ + q₂, q₁ − q₂, q₁ × q₂ (Hamilton product) or q₁ ÷ q₂ = q₁ × q₂⁻¹.
- q₂: real part a₂: enter a number.
- q₂: i part b₂: enter a number.
- q₂: j part c₂: enter a number.
- q₂: k part d₂: enter a number.
- 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 |
| Operation | q₁ × 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 part | 12 |
| Result: j part | 30 |
| Result: k part | 24 |
| 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.