Quaternions

Any number of the form a + bi + cj + dk where a, b, c, and d are real numbers, ij = k, i2 = j2 = -1, and ij = -ji. Under addition and multiplication, quaternions have all the properties of a field, except multiplication is not commutative.

That is what dictionary.com says about quaternions. I have read up on them to start with 3D programming, with great thanks to confuted. So where do a, b, c, d, i, j, and k come from? After I study more about these, I will most definetely have more questions, but please stick with me for it!! Thanks all !

With quaternions, the axes are just i, j and k, and happen to be imaginary... So a is the real number representing the amount of rotation (usually called w when dealing with rotation...), and b, c and d (usually x, y, and z) are coefficient scalars for the i, j and k axes...

In the eighteenth century, W. R. Hamilton devised quaternions as a four-dimensional extension to complex numbers. Soon after this, it was proven that quaternions could also represent rotations and orientations in three dimensions. There are several notations that we can use to represent quaternions. The two most popular notations are complex number notation (Eq. 1) and 4D vector notation (Eq. 2).

A complex number is an imaginary number that is defined in terms of i, the imaginary number, which is defined such that i * i = -1.

A quaternion is an extension of the complex number. Instead of just i, we have three numbers that are all square roots of -1, denoted by i, j, and k. This means that
j * j = -1
k * k = -1

So a quaternion can be represented as
q = w + xi + yj + zk
where w is a real number, and x, y, and z are complex numbers.

Another common representation is
q=[ w,v ]
where v = (x, y, z) is called a "vector" and w is called a "scalar". Although the v is called a vector, don't think of it as a typical 3 dimensional vector. It is a vector in 4D space, which is totally unintuitive to visualize.