I'm trying to calculate the sum of these 2 equations but I'm really having trouble. Here are the 2 quaternions that I'm trying to find the sum of:
$q_1 = 2 − i + j + 3k$, and
$q_2 = −1 + i + 4j − 2k$.
I'm aware that to get the sum of two quaternions you do something like this:
$a+b=(a_1+b_1)+(a_2+b_2)i+(a_3+b_3)j+(a_4+b_4)k$
This sort of formula makes sense but I can't figure out how I get the values of $i$, $j$ and $k$ on the right hand side. Could someone either care to explain the process of getting the sum of these equations or maybe provide a link that could help refresh my memory on this?
Would really appreciate any help!
Perhaps writing like this will help you understand what's happening
\begin{align} q_1 &=& 2&& - 1&\color{red}{i}& + 1&\color{blue}{j}& + 3&\color{orange}{k}& \\ q_2 &=& -1&& + 1&\color{red}{i}& + 4&\color{blue}{j}& - 2&\color{orange}{k}& \\ q_1 + q_2 &=& (2 - 1)&& + (-1 + 1)&\color{red}{i}& + (1 + 4)&\color{blue}{j}& + (3-2)&\color{orange}{k} \end{align}
So that
$$ q_1 + q_2 = 1 + 5\color{blue}{j} + \color{orange}{k} $$