This answer is an elaboration on one of the comments above.
Assume that we are working with finite dimensional spaces. Futhermore for simplicity assume that the underlying field $\mathbb{F}$ is the set of real numbers $\mathbb{R}$. An inner product on a vector space $V$ is a function $(.,.):V\times V\mapsto \mathbb{F}$ that obeys the following properties for all $u,v,w \in V $ and all $\lambda \in \mathbb{F}$:
- $(u,v)=(v,u)$
- $(\lambda v,u)=\lambda(v,u)$
- $(v+w,u)=(v,u)+(w,u)$
- $(u,u)\geq 0$ and $(u,u)=0$ iff $u=0$
Now if you are familiar with the Gram Schmidt process, any finite dimensional vector space equiped with an inner product (often called an euclidean space), has an orthonormal basis.
The proof of this involves two non trivial steps. The first step is to prove that any finite dimensional space has a basis. The second step is to show that this basis can be turned into an orthonormal basis. For a detailed explanation of how to do this I advice you to look into practically any book on linear algebra
If a vector space has an orthonormal basis one can show that any inner product on that space is the dot product in the orthonormal basis.
Proof: Let $u,v\in V$, then since $V$ is an euclidean space it has an orthonormal basis $\{e_1,…,e_n\}$, hence we have $u=x_1e_1+..+x_ne_n$ and $v=y_1e_1+…+y_ne_n$ for some scalars $x_1,..,x_n$ and $y_1,..,y_n$ in the underlying field. But then $(u,v)=(x_1e_1+...+x_ne_n,y_1e_1+...+y_ne_n)=$$=\sum_{i=0}^n{}x_1y_i(e_1,e_i)+…+\sum_{i=0}^nx_ny_i(e_n,e_i)=x_1y_1+...+x_ny_n$
Where we several times used that $\{e_1,…,e_n\}$ is an orthonormal basis , and that (.,.) is a norm. More precisely we used properties 2 and 3 of the norm.