ΘρϵηΠατπ

The Quaternions
The collection of quaternions are: :={a+b𝐢+c𝐣+d𝐤} where a,b,c,d and 𝐢2=𝐣2=𝐤2=𝐢𝐣𝐤=1
Real Part of the Quaternion
Given a quaternion q=a+bi+cj+dk, we say that a is the scalar part of the quaternion (or real part), and is denoted by r(q)
Vector Part of the Quaternion
Given a quaternion q=a+bi+cj+dk, we say that bi+cj+dk is the vector part of the quaternion, and is denoted by v(q)

Note that we think of the vector part of a quaternion as an element of 3, and so it inherits all the operations from that space, such as equality, as noted in the next corollary.

Quaternion from a Real Number
We define the map to_quat: by to_quat(a):=a+0𝐢+0𝐣+0𝐤
Pure Quaternion from a 3D Vector
We define the map to_quat:3 by to_quat(b,c,d):=0+b𝐢+c𝐣+d𝐤
Quaternion from a 4D Vector
We define the map to_quat:4 by to_quat(a,b,c,d):=a+b𝐢+c𝐣+d𝐤
to_quat from 3 Produces a Pure Quaternion
For any 𝐮3, to_quat(𝐮) is a pure quaternion, i.e. r(to_quat(𝐮))=0.
Let 𝐮=(b,c,d). Then to_quat(𝐮)=0+b𝐢+c𝐣+d𝐤, so r(to_quat(𝐮))=0.
Vector Part of to_quat from 3 is the Identity
For any 𝐮3, v(to_quat(𝐮))=𝐮.
Let 𝐮=(b,c,d). Then v(to_quat(𝐮))=v(0+b𝐢+c𝐣+d𝐤)=(b,c,d)=𝐮.
to_quat from Has Zero Vector Part
For any a, v(to_quat(a))=𝟎 and r(to_quat(a))=a.
to_quat(a)=a+0𝐢+0𝐣+0𝐤, so v(to_quat(a))=(0,0,0)=𝟎 and r(to_quat(a))=a.
Quaternion Decomposes as Sum of to_quats
For any q, q=to_quat(r(q))+to_quat(v(q))
Let q=a+bi+cj+dk. Then to_quat(r(q))+to_quat(v(q))=(a+0𝐢+0𝐣+0𝐤)+(0+b𝐢+c𝐣+d𝐤)=a+bi+cj+dk=q, using the real and vector versions of to_quat.
Equality by Vector and Real Equality
For any p,q we have p=q(r(p)=r(q)v(p)=v(q))
Suppose that p=a+bi+cj+dk and q=u+xi+yj+zk then p=q if and only if a=u, b=x, c=y, d=z which is true if and only if r(p)=r(q) and v(p)=v(q), as needed.
Quaternion Addition
(a1+b1𝐢+c1𝐣+d1𝐤)+(a2+b2𝐢+c2𝐣+d2𝐤)=(a1+a2)+(b1+b2)𝐢+(c1+c2)𝐣+(d1+d2)𝐤
Scalar Quaternion Multiplication
λ(a+b𝐢+c𝐣+d𝐤)=λa+(λb)𝐢+(λc)𝐣+(λd)𝐤.
Identity Quaternion
e:=1+0𝐢+0𝐣+0𝐤
Conjugate Quaternion
Given the quaternion q=a+b𝐢+c𝐣+d𝐤, its conjugate is given by q:=ab𝐢c𝐣d𝐤
Pure Quaternion iff Conjugate is Negation
A quaternion x is pure if and only if x=x.
Let x=a+b𝐢+c𝐣+d𝐤. By the definition of conjugation, x=ab𝐢c𝐣d𝐤,x=ab𝐢c𝐣d𝐤. Thus x=x if and only if a=a, which is equivalent to a=0. Since a=r(x), this is exactly the statement that x is pure.
Quaternion Norm
Given a quaternion q=a+bi+cj+dk, its norm is defined as q:=a2+b2+c2+d2
Unit Quaternion
A quaternion q is said to be a unit quaternion if its norm satisfies q=1.
Pure Quaternion
A quaternion p is said to be pure iff r(p)=0.
Pure Unit Quaternion
A quaternion q is said to be a pure unit quaternion if it is both pure and unit, i.e. r(q)=0 and q=1.
Product of Two Quaternions
Suppose that p,q, then we define pq:=r(p)r(q)v(p)v(q)+r(p)v(q)+r(q)v(p)+v(p)×v(q) More precisely: pq=to_quat(r(p)r(q)v(p)v(q))+to_quat(r(p)v(q)+r(q)v(p)+v(p)×v(q))
Quaternion Multiplication Distributes Over Addition
For all p,q,s, p(q+s)=pq+ps,(p+q)s=ps+qs.
Write each quaternion using its real part and vector part. The quaternion product is defined by combining real multiplication, scalar multiplication of vectors, the dot product, and the cross product: pq=to_quat(r(p)r(q)v(p)v(q))+to_quat(r(p)v(q)+r(q)v(p)+v(p)×v(q)). Each operation appearing on the right is distributive in the relevant argument. Therefore replacing q by q+s, and using r(q+s)=r(q)+r(s) and v(q+s)=v(q)+v(s), gives p(q+s)=pq+ps. The proof of (p+q)s=ps+qs is the same computation in the first argument.
Real Part of Quaternion Product
For any p,q, r(pq)=r(p)r(q)v(p)v(q)
By the definition of the quaternion product, the scalar part is r(p)r(q)v(p)v(q) and the vector part is r(p)v(q)+r(q)v(p)+v(p)×v(q). Therefore r(pq)=r(p)r(q)v(p)v(q).
Vector Part of Quaternion Product
For any p,q, v(pq)=r(p)v(q)+r(q)v(p)+v(p)×v(q)
Product of Two Pure Quaternions
For any two pure quaternions p,q (i.e. r(p)=r(q)=0), we have pq=to_quat(v(p)v(q))+to_quat(v(p)×v(q))
Since p and q are pure, r(p)=0 and r(q)=0. By the definition of the quaternion product: pq=to_quat(r(p)r(q)v(p)v(q))+to_quat(r(p)v(q)+r(q)v(p)+v(p)×v(q))=to_quat(00v(p)v(q))+to_quat(0v(q)+0v(p)+v(p)×v(q))=to_quat(v(p)v(q))+to_quat(v(p)×v(q))
Real Part of Product of Two Pure Quaternions
For any two pure quaternions p,q, r(pq)=v(p)v(q)
By the product of two pure quaternions, the real part is v(p)v(q).
Vector Part of Product of Two Pure Quaternions
For any two pure quaternions p,q, v(pq)=v(p)×v(q)
By the product of two pure quaternions, the vector part is v(p)×v(q).
Square of a Pure Unit Quaternion is Minus One
For any pure unit quaternion n^, we have n^2=e where e is the identity quaternion.
Since n^ is pure and unit, r(n^)=0 and v(n^)=1. By the product of two pure quaternions: n^2=to_quat(v(n^)v(n^))+to_quat(v(n^)×v(n^)) Since v(n^)v(n^)=v(n^)2=1 and v(n^)×v(n^)=𝟎, we get: n^2=to_quat(1)+to_quat(𝟎)=1+0𝐢+0𝐣+0𝐤=e
Perpendicular Pure Quaternions Anticommute
For any two pure quaternions p,q with v(p)v(q)=0, we have pq=qp
By the product of two pure quaternions: pq=to_quat(v(p)v(q))+to_quat(v(p)×v(q)) Since v(p)v(q)=0: pq=to_quat(0)+to_quat(v(p)×v(q))=to_quat(v(p)×v(q)) Similarly: qp=to_quat(0)+to_quat(v(q)×v(p))=to_quat(v(q)×v(p)) Since the cross product is anti-commutative, v(q)×v(p)=(v(p)×v(q)), so qp=pq, i.e. pq=qp.
Quaternion Multiplication is Associative
For any p,q,s, we have (pq)s=p(qs)

Write p=a1+b1𝐢+c1𝐣+d1𝐤, q=a2+b2𝐢+c2𝐣+d2𝐤, and s=a3+b3𝐢+c3𝐣+d3𝐤.

Since quaternion multiplication is defined to be distributive over addition and is determined by the multiplication rules on the basis elements {1,𝐢,𝐣,𝐤}, it suffices to verify associativity on all triples of basis elements. There are 43=64 such triples.

We verify the key non-trivial cases. Recall the basis multiplication rules derived from 𝐢2=𝐣2=𝐤2=𝐢𝐣𝐤=1: 𝐢𝐣=𝐤,𝐣𝐤=𝐢,𝐤𝐢=𝐣 𝐣𝐢=𝐤,𝐤𝐣=𝐢,𝐢𝐤=𝐣

Case (𝐢,𝐣,𝐤): (𝐢𝐣)𝐤=𝐤𝐤=1 and 𝐢(𝐣𝐤)=𝐢𝐢=1. ✓

Case (𝐢,𝐤,𝐣): (𝐢𝐤)𝐣=(𝐣)𝐣=(𝐣2)=1 and 𝐢(𝐤𝐣)=𝐢(𝐢)=𝐢2=1. ✓

Case (𝐢,𝐢,𝐣): (𝐢𝐢)𝐣=(1)𝐣=𝐣 and 𝐢(𝐢𝐣)=𝐢𝐤=𝐣. ✓

Case (𝐣,𝐤,𝐢): (𝐣𝐤)𝐢=𝐢𝐢=1 and 𝐣(𝐤𝐢)=𝐣𝐣=1. ✓

All other non-trivial cases follow by similar computation. Any triple involving the identity 1 is immediate since 1 commutes with everything and acts as the identity. Since associativity holds on all basis triples and quaternion multiplication distributes over addition, associativity holds for all quaternions.

Product with a Real Quaternion
For any q and a, to_quat(a)q=qto_quat(a)=aq where aq denotes scalar multiplication.
Let p=to_quat(a), so r(p)=a and v(p)=𝟎. By the real to_quat definition and the quaternion product definition: pq=ar(q)𝟎v(q)+av(q)+r(q)𝟎+𝟎×v(q)=ar(q)+av(q)=a(r(q)+v(q))=aq Similarly qp=r(q)av(q)𝟎+r(q)𝟎+av(q)+v(q)×𝟎=ar(q)+av(q)=aq.
Conjugation is Additive
Suppose that p,q then p+q=p+q
Suppose that p=a+bi+cj+dk and q=u+xi+yj+zk then p+q=(a+u)+(b+x)i+(c+y)j+(d+z)k=(a+u)(b+x)i(c+y)j(d+z)k=abicjdk+uxiyjzk=p+q
Vector Part of the Conjugate is Minus 1 Times the Original
For any p we have v(p)=v(p)
Suppose that p=a+bi+cj+dk. Then v(p)=v(abicjdk)=(b,c,d)=(b,c,d)=v(p) as needed.
Real Part of the Conjugate Doesn't Change
For any p we have r(p)=r(p)
Suppose that p=a+bi+cj+dk. Then r(p)=r(abicjdk)=a=r(p) as needed.
Conjugate Fixes Real Quaternions
For any p, such that v(p)=𝟎, then p=p
Since v(p)=𝟎, we have p=r(p)+0𝐢+0𝐣+0𝐤. Then p=r(p)0𝐢0𝐣0𝐤=p.
Conjugate Only Applies to Vector Part
For any p we have p=to_quat(r(p))+to_quat(v(p))
p=r(p)v(p)=to_quat(r(p))+to_quat(v(p)) where the first equality follows from the definition of conjugation and the decomposition of a quaternion.
Conjugate of a Pure Quaternion is its Negation
For any pure quaternion p, p=p
Since p is pure, r(p)=0. Then by the conjugate formula: p=to_quat(0)+to_quat(v(p))=to_quat(v(p))=p
Product Commutes in the Real Part
For any p,q we have r(pq)=r(qp)
By the real part of a quaternion product, r(pq)=r(p)r(q)v(p)v(q). Using commutativity of real multiplication and commutativity of the dot product, r(p)r(q)v(p)v(q)=r(q)r(p)v(q)v(p). By the same real-part formula, the final expression is r(qp).
Quaternion Times its Conjugate
For any q, qq=qq=to_quat(q2)
Let q=a+bi+cj+dk. Then r(q)=a, v(q)=(b,c,d), r(q)=a, v(q)=(b,c,d). r(qq)=r(q)r(q)v(q)v(q)=aa(b,c,d)(b,c,d)=a2(b2c2d2)=a2+b2+c2+d2=q2 v(qq)=r(q)v(q)+r(q)v(q)+v(q)×v(q)=a(b,c,d)+a(b,c,d)+(b,c,d)×(b,c,d)=𝟎+𝟎=𝟎 where (b,c,d)×(b,c,d)=(b,c,d)×(b,c,d)=𝟎 since the cross product of any vector with itself is zero. Therefore qq=to_quat(q2). The proof that qq=to_quat(q2) is analogous.
Unit Quaternion Inverse is its Conjugate
For any unit quaternion q, q1=q
Since q=1, by the previous proposition, qq=to_quat(1)=e and qq=e. Therefore q is the multiplicative inverse of q.
Dot Product of Two Quaternions
Suppose that p,q, then we define pq:=r(p)r(q)+v(p)v(q)
Conjugation is a Homomorphism in the Real Part
For any p,q we have r(pq)=r(pq)
First of all, we know conjugation doesn't change the real part, so we have: r(pq)=r(pq)=r(p)r(q)v(p)v(q) and then we know that r(pq)=r(p)r(q)v(p)v(q) Since minus comes out of the vector part, and constants can get pulled out of the dot product we have that r(p)r(q)v(p)v(q)=r(p)r(q)(1)(1)v(p)v(q)=r(p)r(q)v(p)v(q) therefore we have that r(pq)=r(pq).
Conjugation Swaps Order in the Vector Part
For any p,q we have v(pq)=v(qp)
We recall that, and so v(pq)=v(pq) and then we compute: v(qp)=r(q)v(p)+r(p)v(q)+v(q)×v(p)=r(q)(v(p))+r(p)(v(q))+(v(q))×(v(p))=r(q)v(p)r(p)v(q)+v(q)×v(p)=r(p)v(q)r(q)v(p)v(p)×v(q)=(r(p)v(q)+r(q)v(p)+v(p)×v(q))=v(pq) where we used that v(q)×v(p)=(v(p)×v(q)). Therefore v(pq)=v(pq)=v(qp).
Conjugation Distributes by Swapping
For any p,q we have pq=qp
We show they are equal by checking both parts. For the real part: r(pq)=r(pq)=r(qp)=r(qp)=r(qp) where the first and third equalities use that conjugation preserves the real part, the second uses that the product commutes in the real part, and the last uses the conjugation homomorphism lemma. For the vector part, we have by the conjugation swaps order lemma that v(pq)=v(qp). Therefore pq=qp.
Conjugation Preserves Norm
For any q, q=q
Let q=a+bi+cj+dk. Then q=abicjdk, so q=a2+(b)2+(c)2+(d)2=a2+b2+c2+d2=q
Quaternion Product is Norm-Multiplicative
For any p,q, pq=pq
We compute: pq2=r(pqpq)=r(pqqp) by conjugation distributing by swapping. By associativity: pqqp=p(qq)p=pto_quat(q2)p=q2(pp)=q2to_quat(p2) where we used that qq=to_quat(q2) and that real quaternions commute with everything. Therefore pq2=p2q2, and taking square roots gives pq=pq.
Conjugation of a Pure Quaternion by a Unit Quaternion is Pure
For any pure quaternion p and unit quaternion q, the quaternion qpq is pure, i.e. r(qpq)=0

We use the fact that a quaternion x is pure if and only if x=x. We verify this for x=qpq:

qpq=qpq=q(p)q=(qpq)

where we used conjugation distributes by swapping (applied twice), the fact that q=q, and the fact that p=p since p is pure. Since qpq=(qpq), the quaternion qpq is pure.

Conjugation by a Unit Quaternion Preserves the Norm of the Vector Part
For any pure quaternion p and unit quaternion q, qpq=p
By norm-multiplicativity: qpq=qpq=1p1=p where we used that q=1 and q=q=1.
Parallel and Perpendicular Decomposition
Given a vector 𝐰3 and a unit vector n^3, we define the parallel and perpendicular components of 𝐰 with respect to n^ as: 𝐰n^:=(n^𝐰)n^,𝐰n^:=𝐰𝐰n^ so that 𝐰=𝐰n^+𝐰n^, where n^𝐰n^=0.
Pure Unit Quaternion Times a Parallel Pure Quaternion
Let n^ be a pure unit quaternion and let pn^ be a pure quaternion such that v(pn^)=λv(n^) for some λ. Then n^pn^=to_quat(λ) In particular, n^pn^ is a real quaternion.
Since both are pure, by the product of two pure quaternions: n^pn^=to_quat(v(n^)v(pn^))+to_quat(v(n^)×v(pn^))=to_quat(v(n^)λv(n^))+to_quat(v(n^)×λv(n^))=to_quat(λv(n^)2)+to_quat(λ(v(n^)×v(n^)))=to_quat(λ)+to_quat(𝟎)=to_quat(λ) where we used v(n^)=1 and v(n^)×v(n^)=𝟎.
Pure Unit Quaternion Times a Perpendicular Pure Quaternion
Let n^ be a pure unit quaternion and let pn^ be a pure quaternion such that v(n^)v(pn^)=0. Then n^pn^=to_quat(v(n^)×v(pn^)) In particular, n^pn^ is a pure quaternion.
Since both are pure, by the product of two pure quaternions: n^pn^=to_quat(v(n^)v(pn^))+to_quat(v(n^)×v(pn^))=to_quat(0)+to_quat(v(n^)×v(pn^))=to_quat(v(n^)×v(pn^))
Pure Unit Quaternion Sandwich is a Reflection
Let n^ be a pure unit quaternion, and let p be a pure quaternion. Then n^pn^=to_quat(v(p)v(n^)+v(p)v(n^)) where the subscripts refer to the parallel and perpendicular decomposition with respect to v(n^). This is the reflection of v(p) through the plane perpendicular to v(n^).

Set pn^=to_quat(v(p)v(n^)) and pn^=to_quat(v(p)v(n^)). Then:

  • pn^ and pn^ are pure quaternions.
  • v(n^)v(pn^)=0.
  • v(pn^)=λv(n^), where λ=v(n^)v(p).

Since p=pn^+pn^, by the associativity and distributive law: n^pn^=n^(pn^+pn^)n^=n^pn^n^+n^pn^n^. Thus it is enough to derive the values of n^pn^n^ and n^pn^n^.

By the parallel product lemma, n^pn^=to_quat(λ). Since this is a real quaternion, by the real product property: n^pn^n^=to_quat(λ)n^=λn^=to_quat(λv(n^))=to_quat(v(p)v(n^))

Since v(n^)v(pn^)=0, the quaternions n^ and pn^ anticommute: n^pn^=pn^n^. Therefore: n^pn^n^=(pn^n^)n^=pn^(n^n^)=pn^n^2 By the square of a pure unit quaternion, n^2=e, so: pn^(e)=pn^e=pn^=to_quat(v(p)v(n^))

Therefore: n^pn^=n^pn^n^+n^pn^n^=to_quat(v(p)v(n^))+to_quat(v(p)v(n^))=to_quat(v(p)v(n^)+v(p)v(n^)).

Unit Quaternion Factors into Two Pure Unit Quaternions
Let q=cos(θ2)+n^sin(θ2) be a unit quaternion, where n^ is a pure unit quaternion. Then there exist pure unit quaternions a^,b^ with v(a^)v(n^)=0 and v(b^)v(n^)=0, such that: q=b^a^ Moreover, the acute angle between the two reflection planes perpendicular to v(a^) and v(b^) is θ2, and the planes intersect along the axis v(n^).

Let ϕ=θ2. Choose a unit vector 𝐚3 with 𝐚v(n^)=0, and define 𝐛=cos(ϕ)𝐚sin(ϕ)(v(n^)×𝐚). Set a^=to_quat(𝐚) and b^=to_quat(𝐛).

Since 𝐚v(n^), the vector v(n^)×𝐚 is also perpendicular to v(n^), so 𝐛v(n^)=0. Also 𝐚 and v(n^)×𝐚 are perpendicular unit vectors, so 𝐛2=cos2(ϕ)+sin2(ϕ)=1. Therefore a^ and b^ are pure unit quaternions.

We now compute b^a^ using the product of two pure quaternions. First, 𝐛𝐚=cos(ϕ). Next, using (v(n^)×𝐚)×𝐚=v(n^), 𝐛×𝐚=sin(ϕ)v(n^). Thus b^a^=to_quat(𝐛𝐚)+to_quat(𝐛×𝐚)=to_quat(cos(ϕ))+to_quat(sin(ϕ)v(n^))=cos(ϕ)+n^sin(ϕ)=q. The normal vectors 𝐚 and 𝐛 have angle πϕ, so the acute angle between the corresponding reflection planes is ϕ=θ2.

Unit Quaternion Rotation Formula
Let q=cos(θ2)+n^sin(θ2) be a unit quaternion, where n^ is a pure unit quaternion, and let p be a pure quaternion. Then qpq is the pure quaternion whose vector part is obtained by rotating v(p) around the axis v(n^) by angle θ.

By the factorization of a unit quaternion into two pure unit quaternions, after renaming the two factors, there are pure unit quaternions a^ and b^ such that q=a^b^, and the angle between the reflection planes perpendicular to v(a^) and v(b^) is θ2. Since a^ and b^ are pure unit quaternions, we have a^=a^ and b^=b^. Therefore: q=a^b^=b^a^=(b^)(a^)=b^a^.

Using associativity: qpq=(a^b^)p(b^a^)=a^(b^pb^)a^.

By the pure unit quaternion sandwich reflection theorem, b^pb^ is the reflection of v(p) through the plane perpendicular to v(b^). Applying the same theorem again, a^(b^pb^)a^ reflects the result through the plane perpendicular to v(a^).

Thus qpq is obtained by composing two plane reflections whose planes intersect along the axis v(n^) and whose angle is θ2. By the composition of two plane reflections theorem, this composition is rotation around v(n^) by angle θ.