# Distance to a hyperplane

Let $c \in \mathbb{R}$, $\alpha =(\alpha_1, \ldots, \alpha_n )$ and $L= \{ x \in \mathbb{R}^n : \langle \alpha,x\rangle=c \}$ (hyperplane). Show that for all $a \in \mathbb{R}^n$, $\mathrm{d}(a,L)=\frac{ |\langle a, \alpha \rangle-c|} {\| \alpha\|}$.

We know from the projection theorem that for all $x \in \mathbb{R}^n$, $\| x- \pi_L(x)\|=\inf_{z \in L} \| x-z \|=\mathrm{d}(a,L)$

How I can write $\pi_L(x)$ ?

-

You have to consider an orthogonal from $x$ to $L$. As $L$ is parallel to the hyperplane $\{x\mid \langle \alpha,x\rangle = 0\}$, exactly $\alpha$ will give a normalvector to $L$, so $$\pi_L(x) = x -u\alpha$$ for some $u\in\mathbb R$. Now write this into the equation of $L$ and find $u$ in terms of $c$, $\alpha$ and scalar product with $x$.