Quaternion Mathematics - Addition with a Scalar?

Within the past few weeks, I have been encountering and coding into my Python programs scripts for handling Quaternion Mathematics. Quaternion Algebra and Calculus is still a relatively new concept to me, so I'm still doing research on how Quaternions interact with various other values, such as Scalars, Tensors, and other Quaternions.

My question today has to do with Addition. Addition involving two quaternions is done on a 'per element' basis: if $q_0 = A + Bi + Cj + Dk$ and $q_1 = W + Xi + Yj + Zk$, with ${A, B, C, D, W, X, Y, Z} \in \mathbb R$ then

$$q_0 + q_1 = (A + W) + (B + X)i + (C + Y)j + (D + Z)k$$

My question now involves Quaternion Addition with a Scalar. Is a Scalar in this case to be represented as a Quaternion with $Bi + Cj + Dk = 0$? Is it even possible to add these two things directly? Or is there no such way or reason to perform this operation? I merely ask so as to determine whether or not to implement such functionality within my Python class...

• In short, is Addition a defined operation for a Quaternion and a Scalar? – S. Gamgee Sep 7 '16 at 20:39
• We embed the reals into the quaternions, by which the addition is indeed just such that the $i,j,k$ components are left untouched. – Hagen von Eitzen Sep 7 '16 at 20:40
• Ahh, so in this particular example, if s = 12, then the sum s + q0 would be (a + s) + bi + cj + dk? – S. Gamgee Sep 7 '16 at 20:42
• I wonder if that unesplained downvote was the result of a misunderstanding of what you meant by "Python class" $\ddot{\frown}$. – Rob Arthan Sep 7 '16 at 21:07

By "scalar", I believe you mean a real number. It is normal to identify the real numbers $\Bbb{R}$ as a subalgebra of the quaternions $\Bbb{H}$, by identifying $x \in \Bbb{R}$ with $x + 0i + 0j + 0k$. So you work as if $\Bbb{R} \subseteq \Bbb{H}$. Operations between "scalars" and quaternions are then just special cases of the quaternion operations. In the usual mathematical notation, this is virtually invisible: the sum $x + (a + bi+cj+dk)$ of the real number $x$ and the quaternion $a +bi+cj+dk$ is $(x + a) + bi + cj+dk$: if you drop the brackets (because "addition is associative") you can't tell the difference. Of course, this is likely to look a bit more clunky in a programming language that doesn't allow you the freedom to overload operators that we enjoy in traditional mathematical notations.
As an aside: you can similarly identify the complex numbers $\Bbb{C}$ with a subalgebra of $\Bbb{H}$ by identifying $x + yi$ with $x + yi + 0j + 0k$, but that is not the only possibility: given any purely imaginary quaternion $u = bi + cj + dk$ with $b^2 + c^2 + d^2 = 1$, you can identify $x + yi$ with $x + yu$. The quaternions have only one subalgebra isomorphic to the real numbers, but they have an abundance of subalgebras isomorphic to the complex numbers, one for each point $(b, c, d)$ on the unit sphere in $\Bbb{R}^3$.
• That sounds good for adding quaternions to vectors in $\Bbb{R}^3$ (identified with the purely imaginary quaternions). I don't know what you mean by "tensor" in this contet. – Rob Arthan Sep 7 '16 at 22:01