Rotate a vector towards a subspace

46 Views Asked by At

Set Up

Consider this scenario. For any point $x\in\mathbb{R}^n$ I can find two projection matrices $N_x$ and $T_x$ such that I can write any other point $v\in\mathbb{R}^n$ as $$ v = N_x v + T_xv $$ I decompose $v$ into $N_x v$, which I call the normal component and $T_x v$, which I call the tangential component.

Rotation

Given $\alpha\in[0, 1)$ I would like to "rotate" $v$ towards $T_x v$.

What do I mean by that? One way would be to first "reduce" the component $N_xv$ by setting $v' = v - \alpha N_x v$ and then rescaling to have the correct norm. This would give $$ v'' = \frac{\|v\|}{\|v - \alpha N_x v\|}(v - \alpha N_x v) $$ This is not a proper rotation, since the matrix performing this operation is not orthogonal. How can I achieve the same transformation but by defining a rotation matrix?

Visual Example

This is a simple example where the normal and tangent space are just lines and $\alpha = 0.5$. The green vector is almost correct, but it has been shrunk. The other one instead has been rescale to have the same norm. This looks like a rotation to me, but don't know how to find its rotation matrix.

enter image description here

1

There are 1 best solutions below

0
On

Though the map from $v$ to $v'$ is linear, the map from $v$ to $v''$ is not. We have $v'' = v$ if $v \in \mathcal T_x$ and (provided $\alpha>0$) if $v \in \mathcal N_x$. But the only linear map that satisfies both properties has $v'' = v$ for all $v$.

(If $\alpha=0$, we're in even more hot water, because $v''$ is not defined for $v \in \mathcal N_x$.)

In fact, just asking for a norm-preserving linear map that is the identity on $\mathcal T_x$ is very limiting. If $f \colon \mathbb R^n \to \mathbb R^n$ is such a linear map, then we have $$f(v) = f(N_x v + T_x v) = f(N_x v) + T_x v.$$ We have $\|v\|^2 = \|N_x v\|^2 + \|T_x v\|^2$ and $\|f(v)\|^2 = \|f(N_x v)\|^2 + \|T_x v\|^2 + 2 \langle f(N_x v), T_x v\rangle$. If we want $f$ to be norm-preserving, then we first have $\|f(N_x v)\|^2 = \|N_x v\|^2$; canceling like terms from $\|v\|^2 = \|f(v)\|^2$, we conclude that $\langle f(N_x v), T_x v\rangle = 0$. We are free to vary $T_x v$ independent from $N_x v$, so we conclude that $f(N_x v)$ is orthogonal to all elements of $\mathcal T_x$: in other words, that for $w \in \mathcal N_x$, $f(w) \in \mathcal N_x$.

This limits $f$ to being, essentially, a rotation and/or reflection that spins $\mathcal N_x$ around the axis $\mathcal T_x$ (though in dimensions higher than $3$, we should interpret this metaphorically). In particular, the distance between $f(v)$ and $\mathcal T_x$ cannot change from the distance between $v$ and $\mathcal T_x$.