<s>[INST] Meaning of the sign of a complex number What is the meaning and the practical uses of the sign (signum function) of a complex number $z$ defined as $\frac{z}{|z|}$? Does it also extend to quaternions?
 [/INST] You can think of a complex number $z=a+ib$ as a vector in the complex plane, and as such it has a direction and a length. The sign of $z$ gives the normalized direction of $z$ as a unit vector lying on the unit circle. We normalise $z$ by dividing by its modulus:
$$\operatorname{sgn}(z)=\frac{z}{|z|}=\frac{a+bi}{\sqrt{a^2+b^2}}$$
This gives a unit complex number. For example take $z=5+3i$. Then
$$\operatorname{sgn}(5+3i)=\frac{5+3i}{|5+3i|}=\frac{5}{\sqrt{34}}+\frac{3}{\sqrt{34}}i$$
where 
$$\left(\frac{5}{\sqrt{34}}\right)^2+\left(\frac{3}{\sqrt{34}}\right)=1$$
For a quaternion $q=a+bi+cj+dk$, the case is similar:
$$\operatorname{sgn}(q)=\frac{a+bi+cj+dk}{|a+bi+cj+dk|}=\frac{a+bi+cj+dk}{\sqrt{a^2+b^2+c^2+d^2}}$$
For example take $q=1+2i+3j+5k$. Then
$$\operatorname{sgn}(1+2i+3j+5k)=\frac{1+2i+3j+5k}{|1+2i+3j+5k|}=\frac{1}{\sqrt{39}}+\frac{2}{\sqrt{39}}i+\frac{3}{\sqrt{39}}j+\frac{5}{\sqrt{39}}k$$
where 
$$\left(\frac{1}{\sqrt{39}}\right)^2+\left(\frac{2}{\sqrt{39}}\right)+\left(\frac{3}{\sqrt{39}}\right)^2+\left(\frac{5}{\sqrt{39}}\right)^2=1$$
Note in the complex case we have the modulus $|z|=\sqrt{z\cdot\bar{z}}=\sqrt{(a+bi)\cdot(a-bi)}=\sqrt{a^2+b^2}$, where $\bar{z}$ is the complex conjugate. In the quaternion case we have $|q|=\sqrt{q\cdot\bar{q}}=\sqrt{(a+bi+cj+dk)\cdot(a-bi-cj-dk)}=\sqrt{a^2+b^2+c^2+d^2}$, where $\bar{q}$ is the quaternion conjugate. 
</s>