# How to normalize a 3-component vector?

I know how to normalize a 2 component vector, but I need to normalize a 3-component vector? If it's the same formula as 2-component vector normalization, then how do I figure out the magnitude of a 3-component vector?

It's exactly the same idea: given a non-zero vector $$\mathbf{x} = [x_1, x_2, x_3]$$, its magnitude is $$\Vert\mathbf{x}\Vert = \sqrt{x_1^2 + x_2^2 + x_3^2}.$$

You normalize $$\mathbf{x}$$ by dividing by this magnitude. The idea extends to any number of dimensions.

Side note: to see why this would be true, imagine the projection $$\mathbf{p}$$ of $$\mathbf{x}$$ onto the $$x_1,x_2$$-plane. The length of that vector is $$\Vert \mathbf{p} \Vert = \sqrt{x_1^2+x_2^2}$$. Now consider the triangle from the origin with $$\mathbf{p}$$ as a base and extending up to $$\mathbf{x}$$: its hypotenuse is $$\sqrt{\Vert \mathbf{p} \Vert^2 + x_3^2} = \sqrt{x_1^2 + x_2^2 + x_3^2}$$.

• Quick tip: \Vert looks nicer than ||. Apr 23, 2021 at 19:30
• @K.defaoite I appreciate it! I knew there was a symbol but couldn't remember off the top of my head. Apr 23, 2021 at 19:38

In 3-dimesnions, $$\mathbf{u} = (u_1, u_2, u_3)$$, so its $$\frac{\mathbb{u}}{\|\mathbb{u}\|}$$ where $$\|\mathbf{u}\|$$ is $$\sqrt{u_{1}^1 + u_{2}^2 + u_{3}^2}$$

And more generally for a vector $$\mathbf{u} \in \mathbb{R}^n$$: $$\|\mathbf{u}\|$$ is just $$\sqrt{u_{1}^1 + \dots + u_{n}^2}$$