# Analogue of the dot product for functions

I have been reading some articles and I see that there is an analogue of the dot product for functions in the form of an integral. However, I am confused by the fact that there seems to be 2 forms:

1. $\int f_1(x)f_2(x)dx$
2. $\int w(x)f_1(x)f_2(x)dx$ where $w(x)$ is called the weight function

What is going on? Perhaps the 1st case is a special case of the second where the weight function equals 1? When do you need the weight function?

Thanks.

-
See Examples 4 and 5. tutorial.math.lamar.edu/Classes/LinAlg/InnerProductSpaces.aspx – M.B. Sep 26 '11 at 16:37
Given $n$ positive numbers $a_1, \ldots, a_n$, did you know that $(x,y) =_{def} \sum_{i=1}^n a_i x_i y_i$ is also an inner product (where $x,y \in \mathbb R^n$)? You can think of the second form as an analogue of this. – Srivatsan Sep 26 '11 at 16:44
@M.B.: Thanks. The thing is I have read that when determining the orthogonality of eigenfunctions, the weight function must be included in the integral -- 2nd form. But I don't understand why and when the weight function should be necessary... – Confusedlearner Sep 26 '11 at 16:51
@SrivatsanNarayanan: Ah, interesting. No, I didn't know that. Thanks! There is still a problem though, as I said in my comment addressed to M.B., if I want to test the orthogonality of 2 eigenfunctions say of the forms $\sin(nx)$ and $\sin(mx)$ then would I need a weight function? I saw some demonstrations that just do the 1st form and some the 2nd... :-S – Confusedlearner Sep 26 '11 at 16:54
"Perhaps the 1st case is a special case of the second where the weight function equals 1?" - yes. In general, one considers a measure first and foremost, and then the inner product that goes along with it. The weight function accounts for the measure... – J. M. is back. Sep 26 '11 at 16:58

• Yes, the first inner product is a special case of the second, with $w\equiv 1$
• There are multiple reasons to consider spaces with weighted inner product (called weighted $L^2$ spaces):
1. Polynomials are not square integrable on unbounded intervals $I$ such as $\mathbb R$ or $[0,\infty)$. If one wishes to have an orthogonal basis of polynomials on $L^2(I)$, a weight must be used. Two popular weights are $\exp(-x^2)$ and $\exp(-x)$.
2. Even on a bounded interval, polynomials with interesting properties (such as Chebyshev polynomials $T_n$ on $[-1,1]$) happen to be orthogonal with a weight different from $1$.
Is there any meaning to the question: "Given 2 functions $f(x)$ and $g(x)$, determine whether they are orthogonal." (with no additional information)?
Without any context, this is an unacceptably vague question. If I had to guess, I'd say that the inner product $\int_D fg$ should be used, where $D$ is the intersection of domains of $f$ and $g$.