Definition

The existence of complex number presented a question for mathematicians, if a complex number exists in a 2D complex plane, could there be a 3D equivalent?

Sir William Rowan Hamilton among many other mathematicians of the 18th and 19th century had been searching for the answer, Hamilton conjectured that a 3D complex number could be represented by the triple a+bi+cj where i and j are imaginary quantities and square to βˆ’1, when he was developing the algebra for this triplet the product of them raised a problem when expanded

z1=a1+b1i+c1jz2=a2+b2i+c2jz1z2=(a1+b1i+c1j)(a2+b2i+c2j)=(a1b1βˆ’b1b2βˆ’c1c2)+(a1b2+b1a2)i+(a1c2+c1a2)j+b1c2ij+c1b2ji

The quantities ij and ji represented a problem for Hamilton, even if ij=βˆ’ji we are still left with (b1c2βˆ’c1b2)ij

On October 16th, 1843, while he was walking with his wife along the Royal Canal in Ireland he saw the solution as a quadruple instead of a triple, instead of using two imaginary terms, three imaginary terms provided the necessary quantities to resolve products like ij

Hamilton defined a quaternion q as

q=s+ai+bj+cks,a,b,c∈Ri2=j2=k2=ijk=βˆ’1ij=kjk=iki=jji=βˆ’kkj=βˆ’1ik=βˆ’j

If a complex number i is capable of rotating points on the plane by 90Β° then perhaps a triple rotates points in space by 90Β°, in the end the triplet was replaced by a quaternion

Notation

There are three ways of annotating a quaternion q

(1)q=s+xi+yj+zk(2)q=s+v(3)q=[s,v]where s,x,y,z∈Rv∈R3and i2=j2=k2=ijk=βˆ’1

Real quaternion

A real quaternion has a zero vector term

q=[s,0]

Pure quaternion

A pure quaternion is a quaternion having a zero scalar term

q=[0,v]

Quaternion conjugate

Given

q=[s,v]

The quaternion conjugate is defined as

qβˆ—=[s,βˆ’v]

Quaternion norm

The norm of a quaternion q=[s,v] is defined as the square root of the product of itself and its conjugate (the multiplication operation is defined later)

|q|=qqβˆ—=s2+x2+y2+z2

Also note that

|q|2=qqβˆ—

Norm facts

  • |qqβˆ—|=|q||qβˆ—|
  • |qβˆ—|=|q|

Unit quaternion

A unit quaternion is a quaternion of norm one given by

(4)q=[s,λn^]s,λ∈R,n^∈R3|n^|=1s2+λ2=1

Note: dividing a non-zero quaternion by its norm produces a unit norm quaternion

Operations

Quaternion Product

Given two quaternions

qa=[sa,a]a=xai+yaj+zakqb=[sb,b]b=xbi+ybj+zbk

The product qaqb is computed as follows

qaqb=(sa+xai+yaj+zak)(sb+xbi+ybj+zbk)=(sasbβˆ’xaxbβˆ’yaybβˆ’zazb)+(saxb+sbxa+yazbβˆ’ybza)i+(sayb+sbya+zaxbβˆ’zbxa)j(5)+(sazb+sbza+xaybβˆ’xbya)k

Replacing the imaginaries by the ordered pairs (which are themselves quaternion units)

i=[0,i]j=[0,j]k=[0,k]1=[1,0]

And substituting them in (5)

qaqb=(sasbβˆ’xaxbβˆ’yaybβˆ’zazb)[1,0]+(saxb+sbxa+yazbβˆ’ybza)[0,i]+(sayb+sbya+zaxbβˆ’zbxa)[0,j]+(sazb+sbza+xaybβˆ’xbya)[0,k]

By doing some aggrupations

qaqb=[sasbβˆ’xaxbβˆ’yaybβˆ’zazb,sa(xbi+ybj+zbk)+sb(xai+yaj+zak)+(yazbβˆ’ybza)i+(zaxbβˆ’zbxa)j+(xaybβˆ’xbya)k]=[sasbβˆ’aβ‹…b,sab+sba+aΓ—b]

Now let’s compute the product qbqa

qbqa=[sbsaβˆ’bβ‹…a,sba+sab+bΓ—a]

Note that the scalar quantity of both products is the same however the vector quantity varies (the cross product sign is changed) therefore

qaqb≠qbqa

This is an important fact to note since for complex number the product commutes however for quaternions it doesn’t

Product of a scalar and a quaternion

Let k be a scalar represented as a quaternion as qk=[k,0] and q=[s,v]

Their product is

qkq=[k,0][s,v]=[ks,kv]

Note that this product is commutative

Product of a quaternion with itself (square of a quaternion)

q=[s,v]q2=[s,v][s,v]=[s2βˆ’vβ‹…v,2sv+vΓ—v]=[s2βˆ’|v|2,2sv]=[s2βˆ’(x2+y2+z2),2s(xi+yj+zk)]

Product of a quaternion and its conjugate

Let q=[s,v]

qqβˆ—=[s,v][s,βˆ’v]=[s2+vβ‹…v,βˆ’sv+svβˆ’vΓ—v]=[s2+vβ‹…v,0]=s2+x2+y2+z2

Note that this product commutes i.e. qqβˆ—=qβˆ—q

Product of unit quaternions

Given

qa=[sa,a]qb=[sb,b]

Where |qa|=|qb|=1, the product is another unit-norm quaternion

qc=[sc,c]

Where |qc|=1

Product of pure quaternions

Let

qa=[0,a]qb=[0,b]

The product qaqb is defined as

qaqb=[βˆ’aβ‹…b,aΓ—b]

Note that the resulting quaternion is no longer a pure quaternion as some information has propagated into the real part via the dot product

Product of a pure quaternion with itself (square of a pure quaternion)

q=[0,v]q2=[0,v][0,v]=[βˆ’vβ‹…v,vΓ—v]=[βˆ’(x2+y2+z2),0]=βˆ’|v|2

If q is a unit norm pure quaternion then

q2=βˆ’1

Product of a pure quaternion with its conjugate

qβˆ—q=qqβˆ—=[0,v][0,βˆ’v]=[vβ‹…v,βˆ’vΓ—v]=[vβ‹…v,0]=|v|2

Inverse of a quaternion

By definition, the inverse qβˆ’1 of q is

qqβˆ’1=[1,0]

To isolate qβˆ’1 let’s pre multiply both sides by qβˆ—

qβˆ—qqβˆ’1=qβˆ—|q|2qβˆ’1=qβˆ—qβˆ’1=qβˆ—|q|2

Quaternion units

Given the vector v

v=vv^where v=|v|, and |v^|=1

Combining this with the definition of a pure quaternion

q=[0,v]=[0,vv^]=v[0,v^]

It’s convenient to identify the unit quaternion as q^ (where v=1)

q^=[0,v^]

Let’s check if the quaternion unit i squares to the ordered pair [βˆ’1,0]

i2=[0,i][0,i]=[0β‹…0βˆ’iβ‹…i,0β‹…i+0β‹…iβˆ’iΓ—i]=[βˆ’|i|2,0]iΓ—i=0=[βˆ’1,0]

Misc operations

Taking the scalar part of a quaternion

To isolate the scalar part of q we could add qβˆ— to it

2S(q)=q+qβˆ—