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

99 Views Asked by At

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.