# Determine vectors similarity weighing the vectors lengths

I have many vector couples, for which I would like to assign a single number (for each couple) that signify their similarity. I am running a minimization algorithm on the whole group of vector couples so the relative 'similarity grade' between couples is important.

If they were all at the same length, cosine similarity would be my obvious choice. However, the vectors are not of same length and I would like to take their size differences into account.

My intuition of vectors similarity are :

• Vectors with the same direction (d) but of different sizes (s1,s2) are more similar than vectors with same sizes (s1,s2) but of different directions (d1,d2).
• Vectors of the same size (Sshort) with different directions (d1,d2) are more similar than the vectors of sam direction (d1,d2) with a larger size ((Slong).
• In my context, this makes sense as (somewhat abstractly) if I wanted to align the 2 vectors I would have needed less "energy" to rotate the shorter ones.

Is there a standard method that determines vectors similarity along these lines?

Thanks!

• I don't know what it means for two vectors of different size to have the same direction. Aug 20 '13 at 10:39
• @Gerry Myerson - Thanks for the clarification. Would you prefer if I used the term 'angle'? A vector (as I refer to it here) is characterized with size (or length) and direction (or angle). If we would look at an X\Y axes where 2 vectors are aligned with the X axis, they both originate at (0,0), the first reaches (2,0) and the second reaches (100,0). I would say that they are of different sizes (the second is longer) and with the same direction (aligned with the X axis). Aug 20 '13 at 10:53
• Ah, I was misunderstanding what you meant by "size" --- I thought you meant the number of components, but you just meant "length". Aug 20 '13 at 10:58