# Relations of a dot product between a vector and another rotated vector in 3D

I am considering generic rotation matrices $R$ in 3D, for an angle $\theta$ about a given normalized axis $u = (u_x, u_y, u_z)$. (Taken directly from Wiki)

$$R = \begin{bmatrix} \cos \theta +u_x^2 \left(1-\cos \theta\right) & u_x u_y \left(1-\cos \theta\right) - u_z \sin \theta & u_x u_z \left(1-\cos \theta\right) + u_y \sin \theta \\ u_y u_x \left(1-\cos \theta\right) + u_z \sin \theta & \cos \theta + u_y^2\left(1-\cos \theta\right) & u_y u_z \left(1-\cos \theta\right) - u_x \sin \theta \\ u_z u_x \left(1-\cos \theta\right) - u_y \sin \theta & u_z u_y \left(1-\cos \theta\right) + u_x \sin \theta & \cos \theta + u_z^2\left(1-\cos \theta\right) \end{bmatrix}$$

For any two vectors $x$, $y \in \mathbb{R}^3$, and a fixed $R$ (therefore, the axis $u$ and angle $\theta$ are known), is there any relation between:

1) The scalar product between $x$ and a rotated $y$, i.e: $$k_1 = x \cdot R^T y$$

2) and the original scalar product $$k_0 = x \cdot y$$

So essentially, I'm asking for $f$ in $k_1 = f k_0$, presumably, $f$ is a function of the original axis $u$ and angle $\theta$.

If not with the original scalar product, then perhaps is there anything I can say about the relation between $k_1$ and the result of any conceivable operation I can do with just the original vectors $x, y$, before rotation?

• Experiment with Rodrigues’ formula instead of that clumsy matrix.
– amd
Commented Jul 10, 2018 at 9:34

As you probably know, $$k_0 := x \cdot y = |x||y|\cos(\phi)$$ where $|x|$ is its norm and $\phi$ is geometrically the angle between the directions of $x$ and $y$.

If $R$ is a rotation, it preserves the norm of the vectors it acts on. Therefore we can say, $$k_1 := x \cdot Ry = |x||Ry|\cos(\phi') = |x||y|\cos(\phi')$$

which implies, $$k_1 = \frac{\cos(\phi')}{\cos(\phi)} k_0$$

The original vectors $x$ and $y$ are not specified, so $\phi$ can take on any value. Since $R$ can be any rotation, $\phi'$ can also take on any value. Thus the range of the following function is all of $\mathbb{R}$, $$\alpha(\phi, \phi') := \frac{\cos(\phi')}{\cos(\phi)}\\ \phi \in [-\pi, \pi]_{/\pm \frac{\pi}{2}},\ \ \ \phi' \in [-\pi, \pi]\ \ \implies\ \ \alpha \in \mathbb{R}$$ Therefore, using only your specifications (and assuming $x$ and $y$ are not orthogonal), $$k_1 = \alpha k_0,\ \ \ \ \alpha \in \mathbb{R}$$

We see that $k_0$ and $k_1$ can have any ratio. I think that there may not be any particularly interesting way to express $\alpha$ as a function of $u$ and $\theta$ other than the obvious, $$\alpha(u, \theta) = \frac{x \cdot R(u, \theta)y}{x \cdot y}$$ That is, there is no way to avoid computing $Ry$. For archival purposes though I will leave the following flawed analysis here:

Let $R(u_0, \phi)$ be the rotation that brings $x$ to $y$ through the angle $\phi$ about axis $u_0$. That is, $$\frac{y}{|y|} = R(u_0, \phi) \frac{x}{|x|},\ \ \ \ u_0 = \frac{x \times y}{|x \times y|}$$

If $y$ is further rotated to $y'$ by some $R(u, \theta)$, $$y' = R(u, \theta)y$$ then we have that the angle between $x$ and $y'$ is the angle associated with the following rotation composition (matrix multiplication), $$\phi' = \angle\ \big{(} R(u, \theta) \circ R(u_0, \phi) \big{)}$$ (The above equation is likely untrue because this composition does not necessarily express a rotation about the axis $\frac{x \times R(u, \theta)y}{|x \times R(u, \theta)y|}$).

So, in the form you were looking for, $$k_1 = f(x, y, u, \theta)k_0$$ where, $$f(x, y, u, \theta) = \frac{\cos\Big{(}\angle\ \Big{(} R(u, \theta) \circ R\big{(}\frac{x \times y}{|x \times y|}, \cos^{-1}(\frac{x \cdot y}{|x||y|})\big{)} \Big{)}\Big{)}}{\frac{x \cdot y}{|x||y|}}$$

• Thanks! I need some time to look through this before accepting, but it looks promising.
– Troy
Commented Jul 10, 2018 at 11:12
• @Troy You're welcome! I'm not 100% sure about $\phi'$ being the angle associated with that rotation composition anymore. But I can at least say for sure that $$\phi' = \cos^{-1}\Big{(}\frac{x \cdot R(u, \theta)y}{|x||y|}\Big{)}$$I wrote my answer very late last night so I'll edit it to reflect this Commented Jul 10, 2018 at 11:28
• That's a shame, thanks anyway. :) I'll leave the question open a few more days before accepting in that case.
– Troy
Commented Jul 10, 2018 at 13:06