How do we normalize vectors to have a unit length equal to one?

I would like to understand how the normalization process has done on vectors to be unit length, $1$,

For the following two different length vectors (directional vectors)

\begin{align}X_1&= [0.835, 0.540, 0.094, 0]\\ X_2&= [0.241, 0.207, 0.947]\end{align}

My questions are:

1. What are the mathematical background for finding if both vectors either in similar direction or not.. if we like to know these vectors are similar or not (Angular distance).

2. What is the theoretical reason to make these vectors to be unit length?

Thanks

• Theoretical reason? They are just easier to work with. They are very easy to compare with each other, for instance; and projection is most easily done when projecting onto a unit vector. – Patrick Stevens Mar 13 '17 at 12:37
• thanks, for calculation i need to proof that normalization make the different length vectors to be a unite length ? and my question about theoretical reason i would like to understand what is the meaning of calculate the angel between them by using cosine? thanks again – Mr. kiko Mar 13 '17 at 12:49
• As I understand it, "normalize" means "make to be unit length." That's not something to be proved. If you have a particular formula or algorithm that is intended to normalize the vectors, you can prove that it actually does what it is supposed to do--but then you have to say what the algorithm is, first. – David K Mar 13 '17 at 12:58
• Do you know the formula for the inner product (dot product) of two vectors, using the cosine of the angle between them? Do you need a proof that the formula is true? Is there a reason why your $X_1$ has more components than $X_2$? – David K Mar 13 '17 at 13:01
• yes ... exactly what i'm need – Mr. kiko Mar 13 '17 at 13:11

Your question is a bit vague. If this doesn't answer your question, feel free to explain what you're looking for in the comments.

You mention:

i need to proof that normalization make the different length vectors to be a unite length

There is nothing to prove, really. If you normalize a (non-zero) vector, you divide the vector by its length or norm. This does not change the direction, only the length. The vector you end up with will be, precisely because you divided by its own length, a vector of unit length (length 1).

A few formulas; if a vector $\vec x = \left( x_1,x_2,\ldots,x_n\right)$, then its norm or length is given by: $$\left\| \vec x \right\| = \sqrt{x_1^2 + x_2^2 + \ldots + x_n^2}$$ Note that $\left\| \vec x \right\|$ is not a vector, but a real number. If $\vec x \ne \vec 0$, then $\left\| \vec x \right\| \ne 0$ and you can divide: $$\frac{1}{\left\| \vec x \right\|}\vec x$$ The resulting vector has the same direction as $\vec x$, but has length 1 since: $$\left\| \frac{1}{\left\| \vec x \right\|}\vec x \right\| = \frac{1}{\left\| \vec x \right\|}\left\| \vec x \right\| = 1$$

As for the part about the angle formed by two vectors, the angle is related to these vectors via the dot product. For vectors $\vec x$ and $\vec y$ and the smallest angle $\alpha$ formed by these vectors, you have: $$\vec x \cdot \vec y = \left\| \vec x \right\|\left\| \vec y \right\|\cos \alpha$$ But if you know the coordinates of these vectors, this dot product can also be found as: $$\vec x \cdot \vec y = \sum_{i=1}^n x_iy_i = x_1y_1 + x_2y_2 + \ldots + x_ny_n$$ Combining both formulas for $\vec x \cdot \vec y$ allows to solve for $\cos\alpha$ and hence find the angle $\alpha$ between $\vec x$ and $\vec y$. Note that normalizing the vectors doesn't change the direction so it leaves the angle unchanged as well. The norms become easier, obviously!

1. Two vectors $u$ and $v$ have the same direction iff there exists a constant $c > 0$ such that $u = cv$. From this, you may easily check that, given a vector $v$ with length different than one, you may obtain a unit length vector $u$ with the same direction as $v$ by using:

$u = \frac{v}{||v||}$

1. Unit length vectors have some desirable properties. For instance, if $U$ is a square matrix whose columns are orthogonal vectors with unit length, the linear transformation represented by $U$ is norm preserving, i.e. the vectors $x$ and $y=Ux$ have the same length.