# Rotating an N-dimensional vector in a plane

Suppose that I have two vectors $\mathbf{z} \in \mathbb{R}^{N}$ and $\mathbf{v} \in \mathbb{R}^{N}$. I want to find a $\mathbf{\tilde{z}}$ that is closer in angle by a preselected $\Delta \theta$ to $\mathbf{v}$ in the plane defined by the column space of $A = [\mathbf{z}, \mathbf{v}]$.

In other words, I want to find a new $\mathbf{{z}}$ that reduces the value:

$$\theta = cos^{-1}\Big( \frac{\mathbf{z}^T \mathbf{v}}{ ||\mathbf{z} || \cdot || \mathbf{v} || } \Big)$$

Obviously, I can simply choose my new $\mathbf{z}$ as $\mathbf{\tilde{z}} = \mathbf{z} + d\cdot(\mathbf{v} - \mathbf{z})$ for some $d \in \mathbb{R}_{++}$. However, I don't know how I can choose $d$ analytically such that I can reduce $\theta$ by a given amount $\Delta \theta$ that I have pre-selected -- ie other than by a line search.

Another approach I thought of is to define find a vector $\mathbf{w} \in N(A)$ via QR decomposition of $A^{T}$. Then, I will just need to rotate $\mathbf{z}$ about $\mathbf{w}$ by $\Delta \theta$ to get my result. However, I don't know how to actually do this.

Can anyone provide some insight on my two approaches, or another way to do this all-together?

Let me write the dot products of the vectors instead of your notation, instead of transposes, etc, so then $$\mathbf{z} \cdot \mathbf{v} = | \mathbf{z} | \cdot |\mathbf{v} |\cos \theta.$$ If I understand you right, you are seeking $\mathbf{\tilde{z}}$ in the plane of the original vectors with $$\mathbf{z} \cdot \mathbf{\tilde{z}} = | \mathbf{z} | \cdot |\mathbf{\tilde{z}} |\cos \Delta \theta.$$
Note $$\mathbf{u}\equiv \mathbf{v}~\frac{| \mathbf{z}|}{| \mathbf{v}|\cos\theta} - \mathbf{z}$$ dictates $$\mathbf{u}\cdot \mathbf{z} =0 .$$
You may then take $$\mathbf{\tilde{z}}\equiv \mathbf{z}+ \mathbf{u } \frac{\tan\Delta\theta}{\tan\theta} .$$ It follows that $$\mathbf{\tilde{z}}\cdot\mathbf{z}= |\mathbf{z}|^2,$$ and $$|\mathbf{\tilde{z}}|^2=\frac{|\mathbf{z}|^2} { \cos^2\Delta\theta },$$ to yield your $$\mathbf{z} \cdot \mathbf{\tilde{z}} = | \mathbf{z} | \cdot |\mathbf{\tilde{z}} |\cos \Delta \theta.$$
• Hmm, but how do I know that $\tilde{z} \cdot v = |\tilde{z}| |v| cos( \theta - \Delta \theta)$ and not $\tilde{z} \cdot v = |\tilde{z}| |v| cos( \theta + \Delta \theta)$? – Some_Guy_2018 Mar 7 '18 at 16:47