Orthogonal Projection in Inner Product I got stuck with this question:

Let $a\ne 0\in\mathbb R$ with the usual inner product $\langle\cdot,\cdot\rangle$, and let:
  $$W=\{x\in\mathbb R^n\mid\langle x,a\rangle=0\}$$
  Show that for any $v\in\mathbb R^n$: $\min_{w\in W}|v-w|=\frac{|\langle v,a\rangle|}{\sqrt{\langle a,a\rangle}}$

I know that there is a connection to the orthogonal projection, and I know that
the vector which uphold the minimum condition is the orthogonal projection of v on W, but I can't see where "a" adds to it. I tried a few things, but nothing really worked.
Thank you!

Set $u=v-\frac{\langle v,a\rangle}{\langle a,a\rangle}a$.
Note $\langle u,a\rangle=\langle v,a\rangle-\frac{\langle v,a\rangle}{\langle a,a\rangle}\langle a,a\rangle=0$. Thus $u\in W$.
We can prove that $u$ is the vector in $W$ where the minimum is reached. This is because:
$$|v-u|=\left|\frac{\langle v,a\rangle}{\langle a,a\rangle}a\right|=\left|\frac{\langle v,a\rangle}{\langle a,a\rangle}\right|\sqrt{\langle a,a\rangle}=\frac{|\langle v,a\rangle|}{\sqrt{\langle a,a\rangle}}$$
On the other hand, for every $w\in W$, we have $|v-w|=|(v-u)+(u-w)|=\sqrt{|v-u|^2+|u-w|^2}\ge|v-u|$. (Pythagoras' theorem.) We can apply this theorem because $\langle v-u,u-w\rangle=0$, which is true because $v-u$ is colinear with $a$ and $u-w\in W$.
