# A Question on Cauchy-Schwarz inequality

1. Oct 3, 2016

### mnb96

Hello,

if we consider the vector spaces of integrable real functions on [a,b] with the inner product defined as: $$\left \langle f,g \right \rangle=\int _a^bf(x)g(x)dx$$ the Cauchy-Schwarz inequality can be written as: $$\left | \int_{a}^{b} f(x)g(x)dx\right | \leq \sqrt{\int_{a}^{b}f(x)^ 2dx} \sqrt{\int_{a}^{b}g(x)^ 2dx}$$
Does it still hold true that, like in ℝn, equality holds iff $g=\lambda f$ for some real scalar λ?

2. Oct 3, 2016

### Erland

iff $g=\lambda f$ or $f=\lambda g$, yes (if $\lambda =0$ and one of $f$ and $g$ is the zero function but not the other one, then only one of these conditions can hold).
Also, we must identify all functions which differ at a set of measure zero, but in most elementary linear algebra texts it is assumed that the functions are continuous and then this problem does not occur.

3. Oct 3, 2016

### mnb96

Thanks for the response, Erland.

Your observation about the functions that differ at a set of zero measure clarified my doubts. And that's quite interesting, because it basically implies that if the angle between two functions is zero, it does not necessarily mean that the two functions are the same up to a multiplicative scalar.

4. Oct 3, 2016

### PeroK

On the space of integrable functions, this is not an inner product. Can you see why?

5. Oct 4, 2016

### mnb96

Probably I can.
It seems to me that the operator <f,g> as defined in my original post does not satisfy the axiom of "positive definiteness" of inner products. In fact, it is not true that <f,f>=0 f=0.

The easiest counter-example that comes to my mind is the zero-function with a discontinuity at the origin: $$f(x)=\left\{\begin{matrix} 0 & ;\,x\neq 0\\ 1 & ;\,x = 0 \end{matrix}\right.$$

The norm of f is 0, but f is not the zero-function.

As suggested by Erland, imposing continuity on the set of integrable functions should be sufficient (and necessary?) to make my definition of <f,g> an inner product.

6. Oct 4, 2016

### PeroK

Correct. What can you do to fix this?

7. Oct 4, 2016

### mnb96

...your response came so fast I didn't have time to edit and clarify my previous post. Anyway, imposing continuity should be sufficient to fix that problem.

8. Oct 4, 2016

### PeroK

That excludes a large number of integrable functions. The alternative is to define an equivalence relation based on functions being equal except on a set of measure 0. The inner product is then technically defined on the vector space of equivalence classes of functions.

Note that you also need the functions to be square integrable for the inner product to be well defined (finite) in all cases.

9. Oct 4, 2016

### mnb96

That's a very elegant way to circumvent the problem. Instead of restricting the original space to the space of continuous functions, one could simply change the meaning of the symbol "=". I guess that when I was approaching this problem I was tacitly/unwittingly assuming that: f=g ⇔ ∀x∈[a,b] f(x)=g(x), which is just another way of defining an equivalence relation between functions.

Oh, that's true. Otherwise we can't guarantee that the quantity <f,f> is defined for every function in our space.

In summary, the operator <f,g> defined in the OP is an inner product on the vector space of equivalence classes of square integrable functions that differ on a set of measure zero.