Given a quaternion of the form,
$$q= a + bi + cj + dk$$
Which is the norm of $q$?
(1) $\sqrt{a^2+b^2+c^2+d^2}$
(2) $a^2+b^2+c^2+d^2$
This page from MathWorks says (1) but another page says (2). Wikipedia says (1). My lecture slides say:
$$|q|^2=a^2+b^2+c^2+d^2$$
but it is not clear whether $|q|$ is the norm or $|q|^2$ is the norm. It is not clear whether $||^2$ is just the L2 norm notation or it is the power of 2 notation.
I am trying to figure this out because I am trying to normalize and compute inverses of quaternions. Both of these operations depend on the norm.
From a practitioner point of view, you have two cases:
$$v' = Q v Q^{-1}$$
Where $Q^{-1} = Q^* / \|Q\|^2$ and $\|Q\|^2 = a^2 + b^2 + c^2 + d^2$.
As you see the nornalization term must be squared since Q appears twice in the quaternion ("sandwitch") product.
$$v' = Q v Q^*$$
Now, a unit quaternion is just $Q / \|Q\|$ where $\|Q\| = \sqrt { a^2 + b^2 + c^2 + d^2}$.