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.$$

  • $\begingroup$ 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)$? $\endgroup$ – Some_Guy_2018 Mar 7 '18 at 16:47
  • $\begingroup$ ? It's easiest if you diagram it, at least for both θ and Δθ smaller than π/2. In that case, both for θ > Δθ and for θ < Δθ, the evenness of the cosine enforces the cos(θ - Δθ) solution. For very large angles, you have to triage and adapt. It would actually be helpful for you to diagram the v and z on their plane, and "see" the solution. $\endgroup$ – Cosmas Zachos Mar 7 '18 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.