# Pythagorean theorem for functions

If $$u$$ and $$v$$ are functions on a function space, what is an easy way to see that Pythagorean holds for functions as it does for triangles:

Suppose u and v are orthogonal functions in V. Then $$\|u+v\|^{2}=\|u\|^{2}+\|v\|^{2}$$

This is used later to prove for minimization criteria for orthogonal spaces:

Suppose U is a finite-dimensional subspace of V. Then two vectors u and v.

Then $$\left\|v-P_{U} v\right\| \leq\|v-u\|$$

Furthermore, the inequality above is an equality if and only if $$u=P_{U} v$$

where $$P_{U} v$$ is the orthogonal projection of $$v$$ onto subspace of U

• Use the inner product definition for that function space and the fact that $\|u\|^2=\langle u,u \rangle$. – Anurag A Jul 17 '19 at 18:13
• @Azif00 the question is in the first line: "what is an easy…" – Anurag A Jul 17 '19 at 18:16
• I wouldn't say it holds for triangles nor for functions but rather it holds for inner product spaces, making the question moot. – rschwieb Jul 17 '19 at 18:29

In general, for any orthogonal vectors $$x$$ and $$y$$ in a inner product space $$( \textsf V , \langle \cdot , \cdot \rangle )$$ the equality $$\| x+y \|^2 = \| x \|^2 + \| y \|^2$$ is still true and the proof is the following :
\begin{align} \| x+y \|^2 &= \langle x+y,x+y \rangle \\ &= \langle x,x+y \rangle + \langle y,x+y \rangle \\ &= \langle x,x \rangle + \langle x,y \rangle + \langle y,x \rangle +\langle y,y \rangle \\ &= \langle x,x \rangle + \langle y,y \rangle \\ &= \| x \|^2 + \| y \|^2 \end{align} Note : $$\langle x,y \rangle = \langle y,x \rangle =0$$ by definition since $$x$$ and $$y$$ are orthogonal.
By linearity ad distributivity (two properties of any linear vector space) we have $$||u+v||^2 \equiv \left< (u+v), (u+v) \right> = \left< u, u \right> + \left< u, v \right> + \left< v,u \right> + \left< v, v \right> =||u||^2 +||v||^2 + \left< u, v \right> + \left< v,u \right>$$ and since $$u$$ and $$v$$ are orthogonal, by definition the last two terms are zero.