[Math] Finding orthonormal basis from orthogonal basis

functional-analysislinear algebraorthonormal

The following is example C.5 from Appendix C (Linear Spaces Review) of Introduction to Laplace Transforms and Fourier Series, Second Edition, by Phil Dyke:

Example C.5 Show that $\{\sin(x),\cos(x)\}$ is an orthonormal basis for the inner product space $V=\{a\sin(x)+b\cos(x); a,b\in\mathbb R, 0\le x\le\pi\}$ using as inner product $$\langle f,g \rangle = \int_0^1 fg dx, \qquad f,g\in V$$
and determine an orthonormal basis.

Solution $V$ is two dimensional and the set $\{\sin(x),\cos(x)\}$ is obviously a basis. We merely need to check orthogonality. First of all, $$\begin{align}\langle\sin(x),\cos(x)\rangle=\int_0^\pi\sin(x)\cos(x)\,dx&=\frac{1}{2}\int_0^\pi\sin(2x)\,dx\\ &=\left[-\frac{1}{4}\cos(2x)\right]_0^\pi \\ &=0.\end{align}$$ Hence orthogonality is established. Also, $$\langle\sin(x),\sin(x)\rangle=\int_0^\pi\sin^2(x)\,dx=\frac{\pi}{2}$$ and $$\langle\cos(x),\cos(x)\rangle=\int_0^\pi\cos^2(x)\,dx=\frac{\pi}{2}.$$ Therefore $$\left\{\sqrt{\dfrac{2}{\pi}}\sin(x),\sqrt{\dfrac{2}{\pi}}\cos(x)\right\}$$ is an orthonormal basis.

I understand that, for orthonormality, we require that $\| \mathbf{a} \| = 1$. However, I'm unsure of how the orthonormal basis was found at the bottom of the proof?

I would appreciate it if people could please take the time to clarify this.

Best Answer

As mentioned in the comments to the main post, $\lVert \sin(x) \rVert = \sqrt{\langle \sin(x), \sin(x) \rangle} = \sqrt{\frac{\pi}{2}}$. We then divide the orthogonal vectors by their norms in order convert them into orthonormal vectors. This gets us the orthonormal basis mentioned in the textbook excerpt.