Non-unique zero function in the function space (Hilbert space) I have just started studying about quantum mechanics, and I was studying the definition of the inner product for functions; I am also quite new to linear algebra. While studying I think I encountered a contradiction on the definition of the inner products between functions, and I can't resolve it. I am following the textbook "Mathematics for Physics by Frederick Byron". The book defines inner products as: (the function space is defined over the interval $[a, b]$ where $a,b \in \mathbb{R}$)
$$ \langle f, g \rangle = \int_{a}^{b} f^*(x) g(x) dx $$
And of course the book proves the fact that the function space (the set of square integrable functions over some interval $[a, b]$) is in fact a vector space.
As far as I know, as a consequence of the definition of vector spaces, the zero vector (or the zero function) has to be unique. As well, based on the definition of inner products the following condition should always be met:
$$ \langle f,f \rangle = 0 \iff f=0 $$
However, in the textbook the authors note that $f$ could be a function which is non-zero at a set of points with a Lebesgue measure of 0, and $\langle f,f\rangle$ would still be $0$.
If the definition of the $0$ function is changed from a function which is $0$ for all $x \in [a, b]$, to a function that is only non-zero at a set with a zero Lebesgue measure, then this issue will be resolved and the definition of inner products will be valid.
But this also implies that the zero function is no longer unique, contradicting the fact that the function space is a vector space.
What is my mistake? How can we satisfy both of these conditions (unique zero vector and the inner product property that only the zero function has a norm of 0) without arriving at a contradiction?
I appreciate your help. I understand this question might be more of a mathematics question than a physics question, but considering the problem is relevant to the basis of quantum mechanics I think Physics Stack Exchange is the more appropriate place for this question to be asked.
 A: This is precisely why the $L^2(\mathbb R)$ is not simply the space of square-integrable functions from $\mathbb R$ to $\mathbb C$ (which we might call $SI(\mathbb R)$).
$SI(\mathbb R)$ consists of all functions $f:\mathbb R\rightarrow\mathbb C $ such that $\int_\mathbb{R} |f(x)|^2 dx$ exists and is finite.  But as you note, if you try to make it into a Hilbert space, you run into problems.  The solution is to define an equivalence relation $\sim$ on $SI(\mathbb R)$, whereby $f \sim g$ if $f(x)\neq g(x)$ only on a set of Lebesgue measure zero - that is, $f\sim g$ if they agree almost everywhere.  
From there, define $L^2(\mathbb R)$ as the quotient set $SI(\mathbb R)/\sim$, whose elements are equivalence classes of square-integrable functions under the equivalence relation $\sim$.  This resolves the ambiguity - the functions $f(x)=0$ and $g(x)=\begin{cases}1 & x=0\\ 0& x\neq 0\end{cases}$ are different elements of $SI(\mathbb R)$, but they are two equivalent representatives of the same element of $L^2(\mathbb R)$.
A: The mistake is in assuming that the Hilbert space's base set $V$ "physically" consists of functions directly. It does not. Forming the space of Lebesgue square-integrable functions is just the first step to build the Hilbert space.
The second step is to identify functions which differ only on sets of Lebesgue measure zero as being the same function: that is, to define an equivalence relation
$$f \sim g := \left[\mu_L\left(\{ u \in \mathbb{R} : f(u) \neq g(u) \}\right) = 0\right]$$
where $\mu_L$ is the Lebesgue measure and we're measuring the size of the set of points on which the two functions are equal, and forming a Boolean expression inquiring if the measure is zero. You then take the quotient of the set of all such functions by this relation.
Thus the members of the Hilbert space - the ket vectors - are not functions, but equivalence classes $[f]_\sim$ of functions $f$ under this relation. The zero element is not $u \mapsto 0$, but rather $[u \mapsto 0]_\sim$ (using anonymous function notation). Thus an function like $\mathbf{1}_{S_C}$, the indicator function of the Cantor set $S_C$, is also in $[u \mapsto 0]_\sim$ and hence is an alternative representative for that same equivalence class and thus an alternative representation of the zero vector (ket), not the formal definition of it. Or to put to formal language,
$$|\rangle := [u \rightarrow 0]_\sim$$
.
A: This is an important point that is usualy swept under the rug in introductory classes. 
The elements of the functional Hilbert space  used in Quantum mechancs (called $L^2[{\mathbb R}]$ in the mathematics literature) are not really functions, but rather equivalence classes of functions such that $f_1\sim f_2$ if $f_1$ and $f_2$ differ by a function $\zeta(x)$ of zero length i.e if $f_1(x)=f_2(x)+ \zeta(x)$ where $\int |\zeta(x)|^2 dx=0$ .  Since all the "zero functions" differ by functions of zero length they are regarded as being the "same," so the "zero vector" becomes unique.
As a consequence, wavefunctions $\psi(x)$ do not have actual values at any point $x$. It is only integrals over regions that have numerical values. This leads to further problems such as what do we mean by boundary conditions  $\psi(x)=0$ in the Schroedinger equation?  These are issues that are answered in books on functional analysis, but are  regarded  too difficult for undergraduate QM courses.
A: What you are trying to define is the space  $L^2(\Omega)$ for some set $\Omega$. Your doubt is legitimate. In fact the proper way to define elements of such space is via equivalence classes. An element of such space is strictly speaking not a function but an equivalence class of functions that differ on a set of measure zero. The zero vector is the equivalence class of functions that are zero almost everywhere. 
