I'm reading Ken Shoemake's explanation of quaternions in David Eberly's book Game Physics. In it, he describes the $\mathbf{i}, \mathbf{j}, \mathbf{k}$ components of quaternions to all equal $\sqrt{-1}$. Then it states Hamilton's quaternion equation:
$\mathbf{i}^2 = \mathbf{j}^2 = \mathbf{k}^2 = \mathbf{ijk} = \mathbf{-1}$
If $\mathbf{i} = \mathbf{j} = \mathbf{k} = \sqrt{-1}$, then it makes sense how $\mathbf{i}^2 = \mathbf{-1}$. But $\mathbf{ijk}$ should equal $\mathbf{i}^3$, not $\mathbf{i}^2$. How does $\mathbf{ijk} = \mathbf{-1}$?
The book's notation says that lowercase bold letters denote a vector, so I'm thinking of $\mathbf{i}$, $\mathbf{j}$, and $\mathbf{k}$ as the basis of the quaternion, similar to the basis of a vector, and can be written $(\sqrt{-1}, \sqrt{-1}, \sqrt{-1})$. Having the result of $\mathbf{ijk}$ as a bold $\mathbf{-1}$ to me implies that it is the vector $(-1, -1, -1)$. Is this understanding correct? In this context, what does it mean to square vector $\mathbf{i}$? If it equals another vector, then the only operation that makes sense is the cross product, but the cross product of a vector and itself is the zero vector.
Unless he is constructing quaternions from complex numbers, there is no $\sqrt{-1}$ available to be equated with anything.
Instead, these are three independent equations $i^2 = -1, \quad j^2=-1, \quad k^2=-1$ that are used as part of the definition of a multiplication rule on the 4-dimensional vector space generated by a set of four different vectors that are (arbitrarily) assigned the names $1,i,j,k$. There are many un-interesting multiplication rules such as $x \ast y = x$ for all vectors $x,y$, but Hamilton found a much more interesting one.
The equation $ijk=-1$ is a mnenomic device for reproducing the full set of defining equations, but is not itself part of the definition.
There are 4x4=16 products of ordered pairs of the generators, and all of them need to be specified in order to define multiplication. Here only 3 products of pairs are given, and one is supposed to infer the rest from $ijk=-1$ by multiplying that equation on the left or the right by $i,j$ and $k$ in all possible ways, assuming associativity, and applying the previous three rules.
The other rules of quaternion multiplication are $1x = x1 = x$ for all $x$; the $i,j,k$ anticommute when distinct pairs are multiplied (so $ij = -ji$ et cetera); and cyclic permutations of $ij = k$.
This multiplication law is linear in each variable, distributive, associative, noncommutative, and (most unusually) every nonzero element has a multiplicative inverse.
For example, $ijk = i(jk) = i(i) = -1$.
They are 3 of the 4 basis vectors. Every quaternion has a unique expression as a1 + bi + cj + dk for some numbers $a,b,c,d$.
It is the vector (-1)1 where the -1 is a real number and the boldface 1 is one of the basis elements of the quaternions as a vector space.
To use Hamilton's multiplication law to multiply that vector by itself. The result will, by construction, be equal to some other quaternion. The quaternion that it equals happens to be (-1)1, also known as -1.