I am facing difficulty understanding the requirement of the weighted inner product. As per my understanding, the inner or dot product is just the projection of one vector onto another and also gives the angle between them for vector spaces, or it is the integral of the product of two arbitrary functions continuous and differentiable within the interval (a,b) for the function spaces. And analogically I can relate the meaning of orthogonality of functions with the vectors when the integral is zero.$$<f,g>=\int_a^b f(x)g(x)dx$$
But why do we need the integral of the form $$I=\int_a^b w(x)f(x)g(x)dx$$for the inner product of the functions? As per my understanding, I think of it as something similar to the weighted integral statement in Finite Element Analysis where we provide weight to one function (i.e. scale the function values at different 'x' with w(x) ) and then integrate.
But neither am I able to interpret the meaning of the weighted inner product physically nor do I understand why the former inner product is not enough that we needed to define weighted inner product? Any help would be appreciated.
Also,let's say that the functions f(x) and g(x) are orthogonal with respect to weight function w(x) i.e. integral$$I=0$$then f(x) and g(x) are not actually orthogonal (or linearly independent if I speak in analogy with orthogonal eigenvector) right? Then how and why can we express any function as the linear combination of f & g which are orthogonal with respect to w(x) only? Why does f and g still form a basis?
The weight function has large values for those $x$ which are significant for the application you have in mind. Taking $x$ to be "frequency" for example, you might want to determine how similar two signals with spectra (fourier transform) $f$ and $g$ are, but your application requires that for some region of $[a,b]$ the similarity is more important and should be weighted higher. Say the importance is decaying as you move away from a certain point $c.$ Then you might use $$ \frac{\int_{a}^b w(x) f(x) g(x) \,dx}{\int_{a}^b w(x) \,dx} $$ with $w(x)$ (say) being defined as $$ w(x)=e^{-k|x-c|},\quad k>0. $$