What does orthonomality mean? According to me two vectors are orthogonal when they perpendicular so that their inner product is zero. But what do we mean that two functions are orthogonal ?
Or how to derive this?
$$\langle f,g \rangle =\int_b^af(x)g(x) $$
The only way this possible is that, the solutions of $f(x)$ and $g(x)$ are   vectors,for simplicity 2D vectors and
$$\langle f,g \rangle = 0$$ only if all the solution vectors are perpendicular to each other.
 A: I guess you are having a hard time understanding why $f$ is vector because you've only seen vectors in Euclidean spaces, so whenever you see the word vector, you'd try to associate it to a vector in $\mathbb R^n$.
But we need adopt a more general definition of vectors and vector spaces. In fact in linear algebra, a vector space is any set where you can add its elements, multiply its elements by a real number so that certain properties like commutativity of addition, distribution law, etc. are satisfied. Any element of a vector space is called a vector.
Here, the set you should think about is
$$V=\{f:f\text{ is a square integrable function on $D$}\}$$
where $D$ is the common domain for all functions in $V$. To check that this is a vector space, you need only ask yourself:

*

*If $f,g\in V$, does $f+g\in V$?


*If $f\in V,a\in\mathbb R$, does $af\in V$?


*Do $f+g=g+f$ and $a(f+g)=af+ag$, etc. hold?
Apparently they do, so $V$ is a vector space, and any $f\in V$ is a vector. Based on this we then define the inner product of $f,g$ as the integral of their product.
For the exact axioms of a vector space you can refer to any textbook. For why we can define the inner product this way you can refer to YJT's answer.
P.S. As suggested by Peter Melech, many generalizations are possible. For example $f$ can map to $\mathbb C$, or $D$ can be any measurable space.
A: There is no such thing as "solution" involved here.
If you are in the finite  dimensional case $x$, $y\in{\mathbb R}^n$, and you are given two vectors
$$x=(x_1,x_2,\ldots, x_n),\quad y=(y_1,y_2,\ldots, y_n)$$
then their scalar product $\langle x,y\rangle$ is defined by
$$\langle x,y\rangle:=\sum_{k=1}^n x_k\, y_k\ .\tag{1}$$
This scalar product is a real number. When $\langle x,y\rangle=0$ (by coincidence, or careful choosing of $x$ and $y$) then $x$ and $y$ are called orthogonal, because if $n=3$ then $x$ and $y$ are then orthogonal in the euclidean sense.
This idea can be transferred to an infinite dimensional setting. Assume, our vector space $V$ consists of all reasonable functions $f:\>[a,b]\to{\mathbb R}$. Such an $f$ can be considered as a "vector with infinitely many components". Note that we can write a vector $x\in{\mathbb R}^n$ as
$$x=(x_k)_{1\leq k\leq n}\ .$$
In the same way we can write an $f\in V$ as
$$f=\bigl(f(x)\bigr)_{a\leq x\leq b}\ .$$
Formula $(1)$ then would lead to
$$\langle f,g\rangle:=\sum_{a\leq x\leq b}f(x)\,g(x)\qquad(????)\ .$$
Such a sum of uncountably many terms of course makes no sense. But we can replace it with an integral over $[a,b]$, where also the $x$ are treated "uniformly". In this way one arrives at the definition:
$$\langle f,g\rangle:=\int_a^b f(x)\,g(x)\>dx\ .$$
This scalar product $\langle f,g\rangle$ is again a real number. And one calls $f$ and $g$ orthogonal if $\langle f,g\rangle=0$, even when you don't have a threedimensional intuition for this functional orthogonality.
A: Intuition
$a=(a_1,a_2)$ and $b=(b_1,b_2)$ are orthogonal if when you multiply element by element and then summarize, you get zero: $a_1b_1+a_2b_2=0$.
A function is an $\infty$-lengthed vector: $f=(f(1),f(2),f(\pi),f(18.4),\ldots)$. To check if $f$ and $g$ are orthogonal you do the same: $\sum\limits_{x\in \mathbb{R}} f(x)g(x) =0$.
Alas, such summation does not really exists (there are two many real numbers...) so the "proper" mathematical way to do it is to integrate $f(x)g(x)$.
