I understand characters are traces of the matrix of a representation $D(g): G \rightarrow GL(V)$ in representations, but I really fail to understand how these functions can form a basis for the class functions. From how I see it, they are nothing but numbers.
Perhaps someone could shed light on this problem for me by giving an example, maybe on the $S_3$ representation or something, please? Thank you!
For $S_3$ we have $$ \begin{array}{l|ccc|ccc} g\in S_3 & \chi_1(g) & \chi_2(g) & \chi_3(g) & f_1(g) & f_3(g) & f_3(g) \\ \hline e & 1 & 1 & 2 & 1 & 0 & 0 \\ %\hline (12) & 1 & -1 & 0 & 0 & 1 & 0 \\ (23) & 1 & -1 & 0 & 0 & 1 & 0 \\ (13) & 1 & -1 & 0 & 0 & 1 & 0 \\ %\hline (123) & 1 & 1 & -1 & 0 & 0 & 1 \\ (132) & 1 & 1 & -1 & 0 & 0 & 1 \end{array} $$ which shows the three irreducible characters $\chi_1$, $\chi_2$, $\chi_3$ and three other class functions $f_1$, $f_2$, $f_3$.
It should be clear that $\{f_1,f_2,f_3\}$ are a basis for the space of all class functions, so this space has dimension $3$. One can also check that $\{\chi_1,\chi_2,\chi_3\}$ are linearly independent, and since there are just as many $\chi_i$s as there are $f_i$, the $\chi_i$s must be a basis too.
And you can compute directly that every pair of different $\chi_i$s are orthogonal to each other.