# Measure of correlation between two vectors that also takes into account their magnitudes?

I am trying to find a measure of correlation between two sets of (2-D) displacement vectors that takes into account not only their directions (in which case, the cosine of the angle between them is frequently used to measure correlation/similarity), but also their magnitudes.

For example, I would want this measure to indicate imperfect correlation/similarity between two vectors of differing magnitude, even if both point in the exact same direction (angle between them = 0).

Is the closest measure to what I am looking for the trace of the 2x2 matrix of correlation functions? (see: https://en.wikipedia.org/wiki/Correlation_function )? The i,j entry of this matrix is corr(Xi, Yj), where X and Y are the vectors from the two vector sets in question.

• And what is the context for this supposed measure of correlation? What does "two sets of (2-D) displacement vectors" mean? Does that mean you have $(x_1,y_1)$ and $(x_2,y_2)$? Could you consider them as complex numbers $x_1+iy_1$ and $x_2+iy_2$? – Somos May 29 at 1:02
• @somos I don't know what you mean. I think it is pretty clear what "two sets of (2-D) displacement vectors" means. Just as you take the correlation between two sets of number, you take the correlation between two sets of vectors; in this case, I was specifying (perhaps unnecessarily) that all of these vectors have two components. They are meant to represent physical displacement, so I don't know if you could consider them as complex numbers -- it would depend upon the reason for doing. – ArashkG May 29 at 15:11