# Normalizing Euclidean distance by the length of the vectors

Suppose I have 4 vectors, the first 2 vectors are of length 4 and the last 2 vectors are of length 400. all values in the vectors range from 0.5 to 0.6.

The Euclidean distance between the last 2 vectors will be greater than the distance between the first 2 vectors. This is due to the much larger dimensionality of the last 2 vectors.

How can I modify my approach to make both the distance values comparable ? I have thought of using Cosine or Jaccard distance, but I do not want the similarity/angle between the vectors.

Could I simply divide each distance by the length of the vectors ?

So the new distance d1 would be:

d1 = d1/4


and the new distance d2 would be:

d2 = d2/400


Would this approach be an effective way to compute the Euclidean distance between data where the scale of each value is the not skewed, but the length of the pair of vectors between which the distance is measured is not uniform ?

Given a random vector $$v$$ (the difference between your two vectors) with $$n$$ i.i.d. components $$v_i\sim X$$, you have that $$\mathbb E[|v|^2]=\sum_i \mathbb E[v_i^2]=n \mathbb E [X^2]$$.
That is, the expectation of the distance squared increases linearly with $$n$$, so if you want something comparable, you should divide the distance by $$\sqrt n$$.