Projection to Intersection of Two Hyperplanes

linear algebraoptimizationprojection

Let $x \in \mathbb{R}^n$ and $V$ a vector space.

We know that if we have a hyperplane $S = \{x \in V | \langle a \,, x \rangle = b\}$, then the projection of $y$ onto $S$, i.e. $\arg\min_{x\in S} ||x-y||$ is $$z = y-\left(\frac{\langle a \,, x \rangle – b}{||a||^2}\right)a$$

Now consider the intersection of two hyperplanes $S_1 = \{x \in V | \langle a_1 \,, x \rangle = b_1\}$ and $S_2 = \{x \in V | \langle a_2 \,, x \rangle = b_2\}$. How do we generalize the above result to find the explicit form of the projection of $y$ onto $S_1 \cap S_2$, i.e. $\arg\min_{x\in S1\cap S2} ||x-y||$? I know that it's in the form $$y-c_1a_1 – c_2a_2$$

How do we find $c_1$ and $c_2$?

Best Answer

Let $V$ be any finite dimensional real inner product space. Given a (linear) subspace $U\subseteq V$, the set $U^\perp = \{\, y\in V \mid \forall x\in U\colon \langle x,y\rangle =0 \,\}$ is the orthogonal complement of $U$ and $V$ decomposes as the direct sum $V=U\oplus U^\perp$. Any vector $v\in V$ uniquely decomposes as $v=u+w$ with $u\in U$ and $w\in W$. In this situation, $u$ is the orthogonal projection of $v$ onto $U$.

By picking an orthonormal basis $u_1,\dots,u_k,w_1,\dots,w_l$ of $V$ such that the $u_i$ span $U$ and the $w_i$ span $U^\perp$, we obtain the projections as $$ v = \underbrace{\sum_{i=1}^k \langle v, u_i\rangle u_i}_{\in U} + \underbrace{\sum_{i=1}^l \langle v, w_i\rangle w_i}_{\in W}. $$

Hence, all you need to obtain orthogonal projection onto $U$ is either an orthonormal basis of $U$ to obtain $u$ directly, or an orthonormal basis of $U^\perp$ to obtain $u$ as $u=v-w$.

Now we consider the case where $U=S_1\cap S_2$ for central hyperplanes $S_i=\{\,x\in V\mid \langle x, a_i\rangle =0\,\}$ with $a_1, a_2$ linearly independent. In this case $U^\perp$ is spanned by $a_1, a_2$ and an orthonormal basis can be obtained from $a_1, a_2$ using the Gram–Schmidt process: \begin{align*} w_1 &= \frac{1}{\|a_1\|} a_1, \\ w_2 &= \frac{1}{\|w_2'\|} w_2' \quad\text{where}\quad w_2' = a_2 - \frac{\langle a_2, a_1\rangle}{\langle a_1, a_1\rangle } a_1. \end{align*} The orthogonal projection of $v\in V$ onto $U=S_1\cap S_2$ is then given by $$ u = v-\sum_{i=1}^2 \langle v, w_i\rangle w_i. $$ When the hyperplanes $S_1$ and $S_2$ are not central as is the case in your question, you can find an arbitrary point $p$ in $S_1\cap S_2$ first and then shift everything so that $p$ becomes the origin. Now the situation is the same as described above.

Related Question