# Orthogonal projection onto Hyperplane

Let $$Ax = y$$ be a linear system with $$A \in \Bbb R^{n,m}, n. Consider $$H_i := \{x \in \Bbb R^{m}: A_ix = y_i\}, i \in \{1,\dots,n\}, y_i \in \Bbb R$$ where $$A_i$$ denotes the $$i$$-th row of $$A$$. Now, regard $$\mathcal{P}_{H_i}z := z - {A_i}^{\intercal} {y_i - A_i z \over \|A_i\|^2}$$. This is apparently an orthogonal projection onto the hyperplane $$H_i$$ but I fail to show it. Any help is appreciated.

$$Px$$ is the orthogonal projection onto $$H$$ if and only if $$Px\in H$$ and $$\langle x-Px,z-Px\rangle = 0$$ for all $$z\in H$$.

If $$Px = x + \frac{y_i-A_ix}{\|A_i\|^2}A_i^T$$ (there must be a plus!), then $$A_iPx = A_ix + \frac{y_i-A_ix}{\|A_i\|^2}A_iA_i^T = A_ix + (y_i-A_ix) = y_i$$, hence $$Px\in H_i$$. Also, if $$z\in H_i$$, \begin{align} \langle x-Px,y-Px\rangle &= -\frac{y_i-A_ix}{\|A_i\|^2}\left\langle A_i^T,z-x-\frac{y_i-A_ix}{\|A_i\|^2}A_i^T\right\rangle\\ &= -\frac{y_i-A_ix}{\|A_i\|^2}\left(A_iz - A_ix - \frac{y_i-A_ix}{\|A_i\|^2}A_iA_i^T\right)\\ &= -\frac{y_i-A_ix}{\|A_i\|^2}\left(A_iz - A_ix - y_i + A_ix\right)\\ &= -\frac{y_i-A_ix}{\|A_i\|^2}\left(A_iz - y_i\right) = 0, \end{align} since $$A_iz=y_i$$. So, $$P$$ is indeed the orthogonal projection onto $$H_i$$.

• $\mathcal{P}_{H_i}z \in H_i$ if and only if $A_i\mathcal{P}_{H_i}z = y_i$ but I get $A_i\mathcal{P}_{H_i}z = -y_i + 2A_iz$ – Pazu Oct 9 at 16:31
• I have edited the answer... – amsmath Oct 9 at 16:39
• Well in the concerning paper there is a minus but I guess it must be a typo. – Pazu Oct 9 at 16:46
• Yes, it's definitely a typo. – amsmath Oct 9 at 16:47

Hint: To show it, it's enough to prove $$\mathcal P_{H_i}(z)$$ is $$z$$ if $$z\in H_i$$ and is $$0$$ if $$z\perp H_i$$ (i.e. if $$z=\lambda A_i^T$$).

• This is false. We are considering the projection onto an affine subspace here. – amsmath Oct 9 at 16:19
• Ah, indeed.. Sorry – Berci Oct 9 at 16:45