Quaternion Multiplication Calculator
Enter the components of both quaternions to compute their Hamilton product.
Result
How it is calculated
Each quaternion is entered as four numbers (w, x, y, z), meaning w + xi + yj + zk. The first is p = (w1, x1, y1, z1) and the second is q = (w2, x2, y2, z2). The tool returns the Hamilton product p × q:
w = w1w2 − x1x2 − y1y2 − z1z2, x = w1x2 + x1w2 + y1z2 − z1y2, y = w1y2 − x1z2 + y1w2 + z1x2, z = w1z2 + x1y2 − y1x2 + z1w2. It also reports the magnitude √(w² + x² + y² + z²) and the scalar part w. All eight fields are required. Order matters: p × q is generally not q × p. Values are shown with four decimals.
Worked example
Multiply p = (1, 2, 3, 4) by q = (5, 6, 7, 8). Scalar part: 1×5 − 2×6 − 3×7 − 4×8 = 5 − 12 − 21 − 32 = −60. x part: 1×6 + 2×5 + 3×8 − 4×7 = 6 + 10 + 24 − 28 = 12. y part: 1×7 − 2×8 + 3×5 + 4×6 = 7 − 16 + 15 + 24 = 30. z part: 1×8 + 2×7 − 3×6 + 4×5 = 8 + 14 − 18 + 20 = 24. The tool shows (-60.0000, 12.0000, 30.0000, 24.0000). Magnitude: √(3600 + 144 + 900 + 576) = √5220 = 72.2496. The scalar part is −60.
Common mistakes
- Assuming the order does not matter. Swapping the two quaternions here gives (−60, 20, 14, 32) instead, because multiplication of quaternions is not commutative.
- Typing the components in the order (x, y, z, w). The first field of each quaternion is the scalar part w, then x, y and z.
- Multiplying component by component. A quaternion product mixes all the terms using the i, j, k rules; it is not (w1w2, x1x2, ...).
- Expecting a rotation to stay a rotation without unit length. Only quaternions of magnitude 1 describe pure rotations; the product's magnitude is the product of the two magnitudes, so normalise first when composing rotations.
- Leaving a field empty to mean zero. All eight values are required, so enter 0 explicitly.
About this calculator
Quaternions extend complex numbers with three imaginary units (i, j, k) instead of one, and are written as q = w + xi + yj + zk. Multiplying two quaternions uses the Hamilton product, a non-commutative operation (qp ≠ pq in general) defined by the rules i² = j² = k² = ijk = −1, which combines the scalar and vector parts of both quaternions into a new quaternion.
This calculator takes the four components of two quaternions, computes their Hamilton product, and reports the resulting quaternion along with its magnitude and scalar part. Quaternions are the standard way to represent 3D rotations in computer graphics, robotics, flight simulation, and game engines because, unlike Euler angles, they avoid gimbal lock and compose smoothly through multiplication.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Order matters here. Multiplying (1, 2, 3, 4) by (5, 6, 7, 8) gives (-60, 12, 30, 24), while the reverse order gives (-60, 20, 14, 32), although both have the same magnitude of 72.2496. The tool takes the scalar first and uses the Hamilton convention, so libraries that store the scalar last need their inputs reordered. Which component order does your library use?