prove that$x-\dfrac{\langle a,x\rangle}{\langle a,a\rangle}a$ is orthogonal to $a$ 
Prove that $x-\dfrac{\langle a,x\rangle}{\langle a,a\rangle}a$ is orthogonal to $a$.

I know this has something to do with the QR algorithm, but I am unsure of where to start.I started with QR decomposition and I am unsure of where to head next

Recall that two vectors $v,w$ are orthogonal if $\langle v,w\rangle=0$. So, to prove that $v:=x-\frac{\langle x,a\rangle}{\langle a,a\rangle} a$ is orthogonal to $a$, we compute
$$\langle v,a\rangle  = \langle x-\frac{\langle x,a\rangle}{\langle a,a\rangle} a,a \rangle.$$
But, recall that the inner product is linear, so we have 
$$\langle x-\frac{\langle x,a\rangle}{\langle a,a\rangle} a,a \rangle = \langle x, a \rangle - \frac{\langle x,a\rangle}{\langle a,a\rangle} \langle a,a\rangle = \langle x,a \rangle -\langle x,a\rangle = 0.$$
