# Finding orthonormal basis from orthogonal basis

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.

• $\lvert \lvert \sin(x) \rvert \rvert = \sqrt{\langle \sin(x), \sin(x) \rangle} = \sqrt{\frac{\pi}{2}}$. So in order to make an orthonormal basis from this orthogonal basis, we devide by the length, – Tim Dikland Jul 3 '18 at 10:09
• @TimDikland You mean $||\sin(x) ||$? – The Pointer Jul 3 '18 at 10:11
• Exactly, editted. – Tim Dikland Jul 3 '18 at 10:11
• Whenever you require an orthogonal basis to be ortonormal, just divide each vecotr by its norm. It remains an orthogonal basis (because of the properties of the inner product), but the norm of each vector is 1. – LuxGiammi Jul 3 '18 at 10:15
• Is that a typo in your example where you are using the integral over $[0,1]$ to define the inner product? If not, that changes things. – Disintegrating By Parts Jul 5 '18 at 3:07

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.