# Normalizing a quaternion

How do I normalize a quaternion $$q=w + \mathbf ix + \mathbf jy + \mathbf kz = a + v$$ ?

I already know: The normalized quaternion is called unit quaternion and can be calculated in this way: $$U_q = {q \over ||q||}$$ Does this mean I have to divide the quaternion by its "length"? How do I calculate its "length", like a 4D-vector? After that, how do I divide a quaternion by a number? Do I divide each part by the length individually?

• Yes to all your questions. The quaternions are a four-dimensional vector space over $\mathbb{R}$. – symplectomorphic Mar 18 '16 at 19:13

$$U_q=\frac{w}{d} + \mathbf i \cdot \frac{x}{d} + \mathbf j \cdot \frac{y}{d} + \mathbf k \cdot \frac{z}{d}$$
where $d = ||q|| = \sqrt {w^2 + x^2 + y^2 + z^2}$ is the norm.