I have a question related to the dualism between the inner product of infinite-dimensional vectors and the integral over the product of their corresponding function representations, which is given by
$$ \langle f, g \rangle = \int f^*(x)g(x)dx. $$
How can this transition be made mathematically? I know that my question is closely related to these two threads I found during my research:
The integral form of inner product .
Inner Product spaces with functions?
However, I still don't fully grasp the explanation of why the analogy to the Riemann sum can be made, even with the explanations given there. Or to put it into simple words: Where does the $dx$ come from? For me, the inner product is analogous to summing up the products of the function values of f and g at all positions x as
$$ \langle f, g \rangle = \sum_{i} f_i\cdot g_i $$
$$ f_i \to f(x) $$ $$ g_i \to g(x), $$
so basically what the $\int$ stands for, but to get a "real" Riemann integral the products first have to be multiplied by $dx$.
So which point am I missing here? Is it due to de infinite-dimensional vector representation?