# 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

• You don't need the QR algorithm. Just use the definition of orthogonality. You'll prove it almost immediately. – user137731 Nov 29 '16 at 2:58
• Hint: the (real) inner product is linear in both of its arguments – eepperly16 Nov 29 '16 at 3:12
• oh, so I could try proving that matrix a times the first expression is equal to I? – 12345 Nov 29 '16 at 3:13
• That's not the definition of orthogonal vectors... – Steve D Nov 29 '16 at 3:14
• Here $a$ is evidently a vector belonging to the same inner product space as $x$, perhaps Euclidean $n$-space. – hardmath Nov 29 '16 at 3:15

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.$$
$$\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.$$