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.