Bounce a vector off multiple hyperplanes

52 Views Asked by At

Given a unit vector $x\in\mathbb{R}^n$ identifying a hyperplane, it is possible to "bounce" another vector $v\in\mathbb{R}^n$ against this hyperplane as follows $$ v' = v - 2(v^\top x)x, $$ e.g. see here. Is there an equivalent of this operation when we have $x_1, \ldots, x_m$ unit vectors identifying $m$ hyperplanes?

1

There are 1 best solutions below

2
On BEST ANSWER

I will first restate your question.

"Suppose a point object moves towards a linear subspace $U$ in $\mathbb{R}^n$, with a velocity vector $v\in\mathbb{R}^n$. The point will bounce off this linear subspace at the origin. The linear subspace is the orthogonal complement of $m$ unit vectors $x_1,\ldots, x_m$, i.e. $U =\mathrm{span}\{ x_1,\ldots, x_m\}^\perp$. What will the point's velocity vector $v'$ be after the bounce?"

Note: $U$ is the intersection of the $m$ hyperplanes given by their normal vectors $x_i$. So $\dim U = n-m$ if the $x_i$ are linearly independent.

The geometric idea. After the bounce, the velocity $v'$ is the reflection of $v$ w.r.t. the subspace $U$. The idea is to decompose the vector $v = v_t + v_n$ into a tangent part $v_t \in U$ and normal part $v_n \in U^\perp = \mathrm{span}\{x_1,\ldots, x_m\}$. Then $$v' = v_t - v_n.$$

The formula. We assume that $x_1,\ldots, x_m$ are orthogonal unit vectors. (These vectors can be obtained after a Gram-Schmidt method.) Now, $v_n$ is the projection of $v$ onto the orthogonal complement $U^\perp$. Since $\{x_1,\ldots, x_m\}$ form an orthonormal basis of $U^\perp$, we have $$ \begin{align*} v_n &= \sum_{i=0}^m (v^T x_i) x_i \\ v_t &= v- v_t. \end{align*} $$ We can rewrite these formulas. Introduce the $n\times m$ matrix $X= [x_1 \cdots x_m]$. The above expressions then become $$ \begin{align*} v_n &= XX^T v \\ v_t &= (I - XX^T) v. \end{align*} $$ If you are unfamiliar with these formulas, have a look at this wikipedia page. The most important thing to know is this: since the $x_i$ are orthonormal, we can write the orthogonal projections onto $U^\perp$ and $U$ as $XX^T$ and $I-XX^T$ respectively.

So we obtain $$ v' = (I - 2XX^T) v. $$ If $U$ is a hyperplane with normal $x$, then $X =[x]$ and we get $v' = (I-2xx^T)v$ as before.