Cosine similarity between a vector and a mean of vectors/a sum of vectors

226 Views Asked by At

I am trying to understand how cosine similarity works when applied to two vectors: considering vectors $u$ and $v$, their cosine similarity is computed as follows:

$cos(u,v)$ = $\frac{u\cdot v}{||u||*||v||}$

so we divide the dot product of the two vectors by the product of their norms. While reading, I stumbled in the following proposition:

vector sum and vector average are equivalent under cosine similarity, because the cosine is only sensitive to vector direction and not to vector length.

The idea is to compare by cosine similarity a vector $u$ to two other vectors $x$ and $y$, where $x$ is obtained by summing a list of vectors $v1,...,vn$ and $y$ is obtained by averaging that same list $v1,...,vn$.

In this case, should $cos(u,x) = cos(u,y)$ ?