Schwarz inequality for riemann integrable functions The space of Riemann integrable functions is not a normed vector space -- $||f|| = 0$ only implies $f = 0$ almost everywhere, and we identify functions pointwise in this space. Nonetheless, Cauchy-Schwarz holds. I am struggling with a small technical part of the standard proof of looking at $||f - tg||^2$. To make this a quadratic polynomial in $t$, we must first assume $||g||^2 \neq 0$. Normally we can say that if $||g|| = 0$, then Cauchy Schwarz holds trivially, but as mentioned before, we can't conclude $g = 0$. Is there an elementary way to see that if $||g|| = 0$, then $\int fg = 0$? I'd prefer avoiding $g = 0$ a.e. implies $fg = 0$ a.e. implies $\int fg = 0$.
 A: I suspect it's not to hard to do this directly. Say $\int_a^b g^2=0$. Let $\epsilon>0$ and then there is a partition such that $$\sum M_j(t_j-t_{j-1})<\epsilon.$$Now $f$ is bounded, etc. If you really want to do this see Below
.
Or you could give a different version of essentially the same argument, where this issue is simpler to resolve. For $t>0$, $||tf-t^{-1}g||\ge0$ shows that $$\int_a^b fg\le\frac12(t^2||f||^2+t^{-2}||g||^2).$$If $||g||=0$ choose $t$ very small; similarly if $||f||=0$. If both norms are positive choose $t$ so $t^2||f||^2=t^{-2}||g||^2$.

Below: Ok. It's enough to show $\int|g|=0$, since $|fg|\le c|g|$. Say $|g|\le1$ for convenience, and let $\epsilon>0$. In more or less standard notation: There exists a partition such that $$\sum M_j(t_j-t_{j-1})<\epsilon^2.$$
Let $A$ be the set of $j$ with $M_j<\epsilon$ and let $B$ be the other $j$. Now $|g|\le M_j^{1/2}$ on $[t_{j-1},t_j]$, so part of the upper sum for $\int |g|$ is $$\sum_{j\in A}M_j^{1/2}(t_j-t_{j-1})\le e^{1/2}(b-a).$$
On the other hand $$\sum_{j/in B}\epsilon(t_j-t_{j-1})<\epsilon^2,$$so the other part of the upper sum for $\int|g|$ is $$\sum_{j\in B}M_j^{1/2}(t_j-t_{j-1})\le\sum_{j\in B}(t_j-t_{j-1})<\epsilon.$$
A: There is no need to worry about integration, this is more basic: 
You know that 
$$0 \leq ||f - tg||^2 = \|f\|^2 -2t \int fg + t^2\|g\|^2$$
Now, if $\|g \|^2=0$ then you get 
$$ \|f\|^2 -2t \int fg \geq 0 \, ; \,\forall t \in \mathbb R$$
It is trivial to conclude that $\int fg=0$, as any bounded from below linear function must be constant.
A: Assuming we know $|\sum_{k=1}^{n} a_k b_k | \le (\sum_{k=1}^{n} a_k^2)^{1/2} (\sum_{k=1}^{n} b_k^2)^{1/2},$  we can argue like this:
$$\left |\sum_{k=1}^{n} f(x_k)g(x_k)\Delta x_k \right | =\left |\sum_{k=1}^{n} f(x_k)\Delta x_k^{1/2}\cdot  g(x_k)\Delta x_k^{1/2}\right |$$ $$ \le \left (\sum_{k=1}^{n} f(x_k)^2\Delta x_k \right )^{1/2} \left (\sum_{k=1}^{n} g(x_k)^2\Delta x_k \right )^{1/2}.$$
Taking limits as $\max \Delta x_k \to 0, $ we get
$$\left |\int_a^b f(x)g(x)\, dx\right| \le \left(\int_a^b f(x)^2\, dx\right)^{1/2}\left ( \int_a^b g(x)^2\, dx\right )^{1/2}.$$
