I'm stuck in the following problem. I feel there may be an elegant solution that's avoiding me, as it's obvious choosing $a$ such that $x-ay$ orthogonal to y will minimize $x-ay$, but I'm getting stuck in the algebra. Here's the problem.
let $||\cdot||$ be a norm on $V$, derived from an inner product, let $x,y\in V$ and suppose $y\ne0$. Show that the scalar $a_0$ that minimizes $||x-ay||$ is $a_0=\langle x,y\rangle/||y||^2$, and that $x-a_0y$ and $y$ are orthogonal.
Once I have the first part, the second part is trivial to show.
I've tried expanding $\langle x-ay,x-ay\rangle$, but I haven't seen any obvious solution emerge, besides being rather tedious.