To multiply quaternions, you need to:
Use the distributive property of multiplication over addition.
Multiply basic unity quaternions according to the rules:
1 × i = i × 1 = i, 1 × j = j × 1 = j,1 × k = k × 1 = k;
i² = j² = k² = -1;
i × j = k, j × k = i, k × i = j; and
j × i = -k, k × j = -i, i × k = -j.
Simplify by combining common summands.
Enjoy your quaternion product.
Read more