<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper,12pt]{article}

\begin{document}

\parindent=0pt


QUESTION The inner product is sometimes written $&lt;\textbf{u,v}&gt;$
rather than \textbf{u.v}. In this notation the basic properties
become

\begin{tabular}{cll}
(a)&amp;$&lt;\textbf{u,v}&gt;=&lt;\textbf{v,u}&gt;$&amp;symmetry,\\
(b)&amp;$&lt;\textbf{u+v,w}&gt;=&lt;\textbf{u,w}&gt;+&lt;\textbf{v,w}&gt;$&amp;
additivity,\\
(c)&amp;$&lt;\lambda\textbf{u,v}&gt;=\lambda&lt;\textbf{u,v}&gt;$&amp;homogeneity,\\
(d)&amp;$&lt;\textbf{v,v}&gt;\geq0$ with $&lt;\textbf{v,v}&gt;=0\Leftrightarrow
\textbf{v}=\textbf{0}$ &amp;positivity.\\
\end{tabular}

More generally if $V$ is a vector space then a function
$&lt;&gt;:V\times V\rightarrow\textbf{R}$ which associates a real number
with each pair of ordered vectors is called an inner product if
the above four properties hold; $V$ itself is called an inner
product space.

The concepts of length of a vector, distance between vectors,
angle between vectors, orthogonal bases etc. can be defined for
such spaces and the Gram-Schmidt process still works.

\textbf{Example} The vector space $P_2$ of polynomials of degree
less than or equal to two can be turned into an inner product
space by defining

$$&lt;p,q&gt;=\int_{-1}^1p(x)q(x)\,dx.$$

One basis for $P_2$ is the set $\{1,x,x^2\}$ and since

$$|p|=\sqrt{&lt;p,p&gt;}=\sqrt{\{\int_{-1}^1(p(x))^2\,dx\}},$$

the length of the \lq\lq vector" 1 is

$$\sqrt{\{\int_{-1}^11^2\,dx\}}=\sqrt{\{[x]_{-1}^1\}}=\sqrt{2}$$

and the length of the \lq\lq vector" $x$ is

$$\sqrt{\left\{\int_{-1}^1x^2\,dx\right\}}
=\sqrt{\left\{\left[\frac{x^3}{3}\right]_{-1}^1\right\}}=\sqrt{\frac{2}{3}}.$$

Furthermore since

$$&lt;1,x&gt;=\int_{-1}^1(1 \times x)\,dx=[\frac{x^2}{2}]_{-1}^1=0$$

the functions 1 and $x$ are orthogonal with respect to the inner
product and the functions $\frac{1}{\sqrt{2}}$ and
$\sqrt{\frac{3}{2}}x$ are orthonormal. Since $x^2$ is not
orthogonal to 1, however, the basis $\{1,x,x^2\}$ is not an
orthogonal basis.

\textbf{Exercise} Apply the Gram-Schmidt process to the basis
$\{1,x,x^2\}$ to turn it into an orthogonal basis and the
normalise the new basis. (The resulting polynomials are the first
three normalised Legendre polynomials.)

\bigskip

ANSWER Since 1 and $x$ are orthogonal one can take
\begin{eqnarray*}
\textbf{w}_0&amp;=&amp;1,\\ \textbf{w}_1&amp;=&amp;x.
\end{eqnarray*}
Then
\begin{eqnarray*}
\textbf{w}_2&amp;=&amp;x^2-\frac{[\int_{-1}^1(x^2\times
x)\,dx]x}{\frac{2}{3}}-\frac{[\int_{-1}^1(x^2\times 1)\,dx]1}{2}\\
&amp;=&amp;x^2-\frac{[\frac{x^4}{4}]_{-1}^1x}{\frac{2}{3}}-\frac{[\frac{x^3}{3}]_{-1}^1}{2}\\
&amp;=&amp;x^2-0-\frac{1}{3}\\ &amp;=&amp;\frac{(3x^2-1)}{3}
\end{eqnarray*}

Now

\begin{eqnarray*}
\textbf{w}_2.\textbf{w}_2&amp;=&amp;\int_{-1}^1\frac{(3x^2-1)^2}{9}\,dx\\
&amp;=&amp;\int_{-1}^1\frac{(9x64-6x^2+1)}{9}\,dx\\
&amp;=&amp;\frac{[\frac{9x^5}{5}-2x^3+x]_{-1}^1}{9}\\
&amp;=&amp;\frac{2}{9}[\frac{9}{5}-2+1]\\ &amp;=&amp;\frac{8}{45}.\\
|\textbf{w}_2|&amp;=&amp;\frac{2\sqrt{2}}{3\sqrt{5}}
\end{eqnarray*}

The orthonormal basis giving the first few normalised Legendre
polynomials is:

\begin{eqnarray*}
\hat{\textbf{w}}_0&amp;=&amp;\frac{1}{\sqrt{2}},\\
\hat{\textbf{w}}_1&amp;=&amp;\sqrt{\frac{3}{2}}x\\
\hat{\textbf{w}}_2&amp;=&amp;\frac{\sqrt{5}}{2\sqrt{2}}(3x^2-1)
\end{eqnarray*}


\end{document}
</pre></body></html>