We have an arbitrary plane $H$ (not necessarily a linear subspace) described by the equation $\theta_0 + \theta \cdot x = 0 $, where $\theta_0$ is the offset parameter (a scalar) and $\theta_= [\theta_1, \theta_2, \theta_3]^T$ is an orthogonal vector, not necessarily of unit length.
What is the formula for the orthogonal projection of an arbitrary vector $v \in \mathbb{R}^3$ onto this plane? How do we derive it?
In other words, I'm looking for an expression for the vector in $H$ that represents the orthogonal projection of some arbitrary vector $v \in \mathbb{R}^3$ onto $H$, in terms of $v$, $\theta$, $\theta_0$, and their dot products only.
Best Answer
If $\theta_0 = 0$, then you just need to subtract away the orthogonal component (direction $\theta$) from $v$.
$$v - \frac{v \cdot \theta}{\|\theta\|^2} \theta = (I - \frac{\theta \theta^\top}{\|\theta\|^2}) v$$
In general if $\theta_0 \ne 0$, shift everything by $v_0$ (where $v_0$ is any point on the plane $H$) first so that the plane touches the origin, perform the above projection, and then shift back.
$$(I - \frac{\theta \theta^\top}{\|\theta\|^2}) (v - v_0) + v_0$$
If you need an explicit choice of $v_0$, you can take $v_0 = - \frac{\theta_0}{\|\theta\|^2} \theta$.