How to Normalize a Vector?

Compute the vector’s magnitude: (|v| = sqrt{v_1^2 + v_2^2 + cdots + v_n^2})

Check that the magnitude is not zero

Divide each component of the vector by its magnitude

Write the normalized vector as ( hat{v} = frac{v}{|v|} )

Verify that the resulting vector has magnitude (1)

Suggested for You

Trending Today