I'm trying to understand whether I can use the following equality in my application -- for $u,v,w \in \mathbb{R}^d$:
$$\cos(u,w)\approx \cos(u,v)\cos(v,w)$$
Where $\cos(x,y)$ gives cosine of the angle between vectors $x$,$y$
$$\cos(x,y)=\frac{\langle x, y\rangle}{\|x\| \|y\|}$$
In simulations, I'm finding it becomes a near perfect fit for $d>100$ when $v=f_1(u), w=f_2(v)$ where $f_i(x)$ is a random perturbation of $x$. For instance, $f_i(x)$ could be:
- performing random simple rotation of $x$ with angle $\le \frac{\pi}{4}$ (details)
- adding IID standard normal random variable to each entry of $x_i$ (details)
In both cases, this equation gives a good fit even though individual cosines are far from $1$.
Questions:
What is a high-level explanation of this behavior?
What restrictions on randomly sampled $f_i$ will let me justify using triangle equality for cosine similarity in high dimensions?
$$\cos[u,f_2(f_1((u))]\overset{P}{=} \cos[u,f_1(u)]\cos[f_1(u),f_2(f_1(u))]+O(d^{-\frac{1}{2}})$$
(note, there's a dimension-free bound on approximation error of this formula here, making it applicable in my setting requires turning it into probabilistic bound, and removing "dimension-free" part)