Skip to main content
Mathematics LibreTexts

Inner Product Spaces

  • Page ID
    218315
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Inner Product Spaces

    Definitions and Examples

    We have seen how to take the dot product of any two vectors in Rn.  In this discussion, we will generalize this idea to general vector spaces.  The dot product had certain properties that we will use to define this generalized product.

    Definition

    Let V be a vector space and u, v, and w be vectors in V and c be a constant.  Then an inner product ( , ) on V is a function with domain consisting of pairs of vectors and range real numbers satisfying the following properties.  

    1.  (u, u>  0 with equality if and only if u  =  0.

    2.  (u, v)  =  (v, u)

    3.  (u + v, w)  =  (u, w) + (v, w)

    4.  (cu, v)  =  (u, cv)  =  c(u, v)

    A vector space with its inner product is called an inner product space.

    Notice that the regular dot product satisfies these four properties.

     

    Example

    Let V be the vector space consisting of all continuous functions with the standard + and *.  Then define an inner product by

            \( (f, g) = \int_0^1 f(t)g(t) dt \)

    For example

            \( (x, x^2) = \int_0^1 (x)(x^2)dx = \frac{1}{4} \)

     

    The four properties follow immediately from the analogous property of the definite integral.  For example

           \( (f + g, h) = \int_0^1 (f+g)(t)h(t) dt \)

            \( = \int_0^1 (f(t)h(t) + g(t)h(t)) dt  = \int_0^1 f(t)h(t) dt + \int_0^1 g(t)h(t) dt \)

           \( = (f, h) = (g, h) \)


    Example

    Let V  =  R2 and consider the function

            ((a,b), (c,d))  =  ac + 2bd

    Then this function defines an inner product.  We will prove Property 1.  We have

            ((a,b), (a,b))  =  a2 + 2b2  >  0

    And equality occurs if and only if both a and b are 0.


    Fourier Series

    We will spend the rest of the discussion with a special case of an inner product space.  For any inner product space V we call vectors v and w orthogonal if 

            (v, w)  =  0

    And we define the length of v by 

         \( length = \sqrt{(v, v)}\)

    We will call a basis S for a vector space V orthonormal if every element of S is a unit vector (length one) and any two distinct elements are orthogonal.

    The inner product space that we are interested in is the space of continuous functions with 

            \( (f, g) = \int_{-\pi}^\pi f(t) g(t)dt \)

    Let S  =  {v1, v2, v3, ...} be the infinite set of vectors (functions) defined by 

            \( v_1 = \frac{1}{\sqrt{2\pi}},  v_2 = \frac{1}{\sqrt{\pi}}cos(t),  v_3 = \frac{1}{\sqrt{\pi}}sin(t),    v_4 = \frac{1}{\sqrt{\pi}}cos(2t),  v_5 = \frac{1}{\sqrt{\pi}}sin(2t) \)

            \( v_6 = \frac{1}{\sqrt{\pi}}cos(3t),  v_7 = \frac{1}{\sqrt{\pi}}sin(3t),  v_8 = \frac{1}{\sqrt{\pi}}cos(4t),    v_9 = \frac{1}{\sqrt{\pi}}sin(4t) ... \)

    We leave it as an exercise to show that 

            \( \int_{-\pi}^\pi cos(mt)sin(nt)dt = 0\)

            

    and for m and n distinct positive integers,

            \(\int_{-\pi}^\pi cos(mt)cos(nt)dt =\int_{-\pi}^\pi sin(mt)sin(nt)dt = 0\)

    and 

            \( \sqrt{ \frac{1}{\pi} \int_{-\pi}^\pi cos(mt)cos(mt)dt} = \sqrt{ \frac{1}{\pi} \int_{-\pi}^\pi sin(mt)sin(mt)dt} =  1 \)

            

    The above identities imply that S is an orthonormal set of vectors.  To show that it is a basis is beyond the level of this discussion.  In fact, we have yet to understand about infinite dimensional bases. 

    Recall that 

            projWv  =  (v,w1) w1  + (v,w2) w2  + (v,w3) w3  + ...

    Notice that we have adjusted the definition to use the inner product instead of the dot product and for an infinite orthonormal set instead of a finite set.  This definition provides us with a way of approximating a continuous function with elements of the orthonormal set.  Ths idea is analogous to idea of the Taylor Series.  When the basis is as above, the inner products are called the Fourier coefficients of the function.

     

    Example

    Calculate the first four nonzero Fourier coefficients for the function

            f(t)  =  |t|

     

    Solution

    We have

           \(\frac{1}{\sqrt{2\pi}} \int_{-\pi}^\pi (1)(|t|) dt \approx 3.94,  \frac{1}{\sqrt{\pi}} \int_{-\pi}^\pi (cos(t))(|t|) dt \approx -2.26, \frac{1}{\sqrt{\pi}} \int_{-\pi}^\pi (sin(t))(|t|) dt = 0\)

    It turns out that the next two nonzero Fourier coefficients are

            \(  \frac{1}{\sqrt{\pi}} \int_{-\pi}^\pi (cos(3t))(|t|) dt \approx -0.251, \frac{1}{\sqrt{\pi}} \int_{-\pi}^\pi (cos(5t))(|t|) dt \approx -0.090\)

    We can write

            \( |t| \approx 3.94(\frac{1}{\sqrt{2 \pi}})- 2.26(\frac{1}{\sqrt{ \pi}}cos(t)) - 0.251(\frac{1}{\sqrt{ \pi}}cos(3t)) - 0.090(\frac{1}{\sqrt{ \pi}}cos(5t))   \)

            \( = 1.57 - 1.28cos(t) - 0.142cos(3t) - 0.051cos(5t) \)

    The graphs of y  =  |t| and the above equation are shown below.

            Graph of y = absolute value of t and its Fourier approximation.  The approximation is very close between t  = -3 and t = 3



    Back to the Vectors Page

     

     

    Inner Product Spaces is shared under a CC BY license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?