Quaternions Algebraic Definition Let $\mathbb{H}=\lbrace a+bi+cj+dk \mid a,b,c,d \in \mathbb{R}\rbrace$. There is a vector-space structure on $\mathbb{H}$:
$$ \cdot: \mathbb{R} \times \mathbb{H} \rightarrow \mathbb{H}: (\lambda, a+bi+cj+dk) \rightarrow (\lambda, \lambda a+\lambda bi+\lambda cj+\lambda dk) $$ $$ \begin{aligned} +:\mathbb{H} \times \mathbb{H} \rightarrow \mathbb{H}: (a_1+b_1i+c_1j+d_1k, a_2+b_2i+c_2j+d_2k) \\ \rightarrow (a_1+a_2, (b_1+b_2)i,(c_1+c_2)j,(d_1+d_2)k) \end{aligned} $$ Clearly $(\mathbb{H},+)$ is an abelian group, so $(\mathbb{H},+,\cdot)$ is an $\mathbb{R}$-linear space.
In addition, we define a multiplication operation on $\mathbb{H}$. First set:
$$ i^2=j^2=k^2=ijk=-1 $$ $$ ij=k,jk=i,ki=j,ji=-k,kj=-i,ik=-j $$ Then multiplication is defined componentwise. To keep the notation lighter, the imaginary part can be written as a vector: $\vec{v}=(b,c,d)$. A quaternion can then be written as $x=[a,\vec{v}]=a+\vec{v}$; this is only notation, and does not mean we are adding a scalar and a vector.
...