The basis here are functions which is weird, usually it is in infinite dimensional space. The inner product is computed as: if the two functions are orthogonal, then this inner product is equal to 0, actually this is the formal definition for orthogonality.
An example for function spaces is fourier series, the result is always in a function space where the basis are , this is infinite dimensional space.
TODO: square integrability