Skip to main content

Section 35 Inner Product Spaces

Subsection Application: Fourier Series

In calculus, a Taylor polynomial for a function \(f\) is a polynomial approximation that fits \(f\) well around the center of the approximation. For this reason, Taylor polynomials are good local approximations, but they are not in general good global approximations. In particular, if a function \(f\) has periodic behavior it is impossible to model \(f\) well globally with polynomials that have infinite limits at infinity. For these kinds of functions, trigonometric polynomials are better choices. Trigonometric polynomials lead us to Fourier series, and we will investigate how inner products allow us to use trigonometric polynomials to model musical tones later in this section.

Subsection Introduction

In Section 23 we were introduced to inner products in \(\R^n\text{.}\) The concept of an inner product can be extended to vector spaces, as we will see in this section. This will allow us to measure lengths and angles between vectors and define orthogonality in certain vector spaces.

Recall that an inner product on \(\R^n\) assigns to each pair of vectors \(\vu\) and \(\vv\) the scalar \(\langle \vu, \vv \rangle\text{.}\) Thus, an inner product on \(\R^n\) defines a mapping from \(\R^n \times \R^n\) to \(\R\text{.}\) Recall also that an inner product on \(\R^n\) is commutative, distributes over vector addition, and respects scalar multiplication, and the inner product of a vector in \(\R^n\) by itself is always non-negative and is equal to 0 only when the vector is the zero vector. We will investigate this ideas in vector spaces in Preview Activity 35.1.

Preview Activity 35.1.

Consider the vector space \(\pol_2\) of polynomials of degree less than or equal to \(2\) with real coefficients. Define a mapping from \(\pol_2 \times \pol_2\) to \(\R\) by

\begin{equation*} \langle p(t), q(t) \rangle = \int_0^1 p(t)q(t) \, dt\text{.} \end{equation*}
(a)

Calculate \(\langle 1, t \rangle\text{.}\)

(b)

If \(p(t)\) and \(q(t)\) are in \(\pol_2\text{,}\) is it true that

\begin{equation*} \langle p(t) , q(t) \rangle = \langle q(t), p(t) \rangle? \end{equation*}

Verify your answer.

(c)

If \(p(t)\text{,}\) \(q(t)\text{,}\) and \(r(t)\) are in \(\pol_2\text{,}\) is it true that

\begin{equation*} \langle p(t)+q(t), r(t) \rangle = \langle p(t), r(t) \rangle + \langle q(t), r(t) \rangle? \end{equation*}

Verify your answer.

(d)

If \(p(t)\) and \(q(t)\) are in \(\pol_2\) and \(c\) is a scalar, is it true that

\begin{equation*} \langle cp(t) , q(t) \rangle = c\langle p(t) , q(t) \rangle? \end{equation*}

Verify your answer.

(e)

If \(p(t)\) is in \(\pol_2\text{,}\) must it be the case that \(\langle p(t) , p(t) \rangle \geq 0\text{?}\) When is \(\langle p(t) , p(t) \rangle = 0\text{?}\)

Subsection Inner Product Spaces

As we saw in Preview Activity 35.1, we can define a mapping from \(\pol_2 \times \pol_2\) to \(\R\) that has the same properties of inner products on \(\R^n\text{.}\) So we can extend the definition of inner product to arbitrary vector spaces.

Definition 35.1.

An inner product \(\langle \ , \ \rangle\) on a vector space \(V\) is a mapping from \(V \times V \to \R\) satisfying

  1. \(\langle \vu , \vv \rangle = \langle \vv , \vu \rangle\) for all \(\vu\) and \(\vv\) in \(V\text{,}\)

  2. \(\langle \vu + \vv , \vw \rangle = \langle \vu , \vw \rangle + \langle \vv , \vw \rangle\) for all \(\vu\text{,}\) \(\vv\text{,}\) and \(\vw\) in \(V\text{,}\)

  3. \(\langle c\vu , \vv \rangle = c\langle \vu , \vv \rangle\) for all \(\vu\text{,}\) \(\vv\) in \(V\) and all scalars \(c\text{,}\)

  4. \(\langle \vu , \vu \rangle \geq 0\) for all \(\vu\) in \(V\) and \(\langle \vu , \vu \rangle = 0\) if and only if \(\vu = \vzero\text{.}\)

An inner product space is a vector space on which an inner product is defined.

Activity 35.2.

Consider the mapping \(\langle \ , \ \rangle\) from \(\pol_1 \times \pol_1\) to \(\R\) defined by

\begin{equation*} \langle p(t), q(t) \rangle = p'(0)q'(0)\text{.} \end{equation*}
(a)

Show that this mapping satisfies the second property of an inner product.

(b)

Although this mapping satisfies the first three properties of an inner product, show that this mapping does not satisfy the fourth property and so is not an inner product.

Since inner products in vector spaces are defined in the same way as inner products in \(\R^n\text{,}\) they will satisfy the same properties. Some of these properties are summarized in the following theorem.

One special inner product is indicated in Preview Activity 35.1. Recall that \(C[a,b]\) is the vector space of continuous functions on the closed interval \([a,b]\text{.}\) Let \(\langle \ , \ \rangle\) map from \(C[a,b] \times C[a,b]\) to \(\R\) be defined by

\begin{equation*} \langle f(x), g(x) \rangle = \int_a^b f(x)g(x) \, dx\text{.} \end{equation*}

The verification that this mapping is an inner product is left to the exercises.

Subsection The Length of a Vector

We can use inner products to define the length of any vector in an inner product space and the distance between two vectors in an inner product space. The idea comes right from the relationship between lengths of vectors in \(\R^n\) and inner products on \(\R^n\) (compare to Definition 23.5).

Definition 35.3.

Let \(\vv\) be a vector in an inner product space. The length of \(\vv\) is the real number

\begin{equation*} ||\vv|| = \sqrt{\langle \vv, \vv \rangle}\text{.} \end{equation*}

The length of a vector in a vector space is also called magnitude or norm. Just as with inner products on \(\R^n\) we can use the notion of length to define unit vectors in inner product spaces (compare to Definition 23.7).

Definition 35.4.

A vector \(\vv\) in an inner product space is a unit vector if \(||\vv|| = 1\text{.}\)

We can find a unit vector in the direction of a nonzero vector \(\vv\) in an inner product space by dividing by the norm of the vector. That is, the vector \(\ds \frac{\vv}{||\vv||}\) is a unit vector in the direction of the vector \(\vv\text{,}\) provided that \(\vv\) is not zero.

We define the distance between vectors \(\vu\) and \(\vv\) in an inner product space in the same way we defined distance using the dot product (compare to Definition 23.8).

Definition 35.5.

Let \(\vu\) and \(\vv\) be vectors in an inner product space. The distance between \(\vu\) and \(\vv\) is the length of the difference \(\vu - \vv\) or

\begin{equation*} || \vu - \vv ||\text{.} \end{equation*}

Activity 35.3.

The trace (see Definition 19.8) of an \(n \times n\) matrix \(A = [a_{ij}]\) is the sum of the diagonal entries of \(A\text{.}\) That is,

\begin{equation*} \trace(A) = a_{11} + a_{22} + \cdots + a_{nn}\text{.} \end{equation*}

If \(A\) and \(B\) are in the space \(\M_{n \times n}\) of \(n \times n\) matrices with real entries, we define the mapping \(\langle \ , \ \rangle\) from \(\M_{n \times n} \times \M_{n \times n}\) to \(\R\) by

\begin{equation*} \langle A, B \rangle = \trace\left(AB^{\tr}\right)\text{.} \end{equation*}

This mapping is an inner product on the space \(\M_{n \times n}\) called the Frobenius inner product (details are in the exercises). Let \(A = \left[ \begin{array}{cc} 1\amp 0\\2\amp 2 \end{array} \right]\) and \(B = \left[ \begin{array}{rc} -3\amp 4\\-2\amp 1 \end{array} \right]\) in \(\M_{2 \times 2}\text{.}\)

(a)

Find the length of the vectors \(A\) and \(B\) using the Frobenius inner product.

(b)

Find the distance between \(A\) and \(B\) using the Frobenius inner product.

Subsection Orthogonality in Inner Product Spaces

We defined orthogonality in \(\R^n\) using inner products in \(\R^n\) (see Definition 23.11) and the angle between vectors. We can extend those ideas to any inner product space.

If \(\vu\) and \(\vv\) are nonzero vectors in an inner product space, then the angle \(\theta\) between \(\vu\) and \(\vv\) is such that

\begin{equation*} \cos(\theta) = \frac{\langle \vu, \vv \rangle}{||\vu||\, ||\vv||}\text{.} \end{equation*}

and \(0\leq \theta \leq \pi\text{.}\) This angle is well-defined due to the Cauchy-Schwarz inequality \(|\langle \vu, \vv \rangle| \leq ||\vu||\, ||\vv||\) whose proof is left to the exercises.

With the angle between vectors in mind, we can define orthogonal vectors in an inner product space.

Definition 35.6.

Vectors \(\vu\) and \(\vv\) in an inner product space are orthogonal if

\begin{equation*} \langle \vu, \vv \rangle = 0\text{.} \end{equation*}

Note that this defines the zero vector to be orthogonal to every vector.

Activity 35.4.

In this activity we use the Frobenius inner product (see Activity 35.3). Let \(A = \left[ \begin{array}{cc} 0\amp 1\\1\amp 0 \end{array} \right]\) and \(B = \left[ \begin{array}{cc} 0\amp 1\\0\amp 0 \end{array} \right]\) in \(\M_{2 \times 2}\text{.}\)

(a)

Find a nonzero vector in \(\M_{2 \times 2}\) orthogonal to \(A\text{.}\)

(b)

Find the angle between \(A\) and \(B\text{.}\)

Using orthogonality we can generalize the notions of orthogonal sets and bases, orthonormal bases and orthogonal complements we defined in \(\R^n\) to all inner product spaces in a natural way.

Subsection Orthogonal and Orthonormal Bases in Inner Product Spaces

As we did with inner products in \(\R^n\text{,}\) we define an orthogonal set to be one in which all of the vectors in the set are orthogonal to each other (compare to Definition 24.1).

Definition 35.7.

A subset \(S\) of an inner product space for which \(\langle \vu, \vv \rangle = 0\) for all \(\vu \neq \vv\) in \(S\) is called an orthogonal set.

As in \(\R^n\text{,}\) an orthogonal set of nonzero vectors is always linearly independent. The proof is similar to that of Theorem 24.3 and is left to the exercises.

A basis that is also an orthogonal set is given a special name (compare to Definition 24.2).

Definition 35.9.

An orthogonal basis \(\CB\) for a subspace \(W\) of an inner product space is a basis of \(W\) that is also an orthogonal set.

Using inner products in \(\R^n\text{,}\) we saw that the representation of a vector as a linear combination of vectors in an orthogonal basis was quite elegant. The same is true in any inner product space. To see this, let \(\CB = \{\vv_1, \vv_2, \ldots, \vv_m\}\) be an orthogonal basis for a subspace \(W\) of an inner product space and let \(\vx\) be any vector in \(W\text{.}\) We know that

\begin{equation*} \vx = x_1\vv_1 + x_2\vv_2 + \cdots + x_m \vv_m \end{equation*}

for some scalars \(x_1\text{,}\) \(x_2\text{,}\) \(\ldots\text{,}\) \(x_m\text{.}\) If \(1\leq k\leq m\text{,}\) then, using inner product properties and the orthogonality of the vectors \(\vv_i\text{,}\) we have

\begin{equation*} \langle \vv_k, \vx \rangle = x_1 \langle \vv_k, \vv_1 \rangle + x_2 \langle \vv_k, \vv_2 \rangle + \cdots + x_m \langle \vv_k, \vv_m \rangle = x_k \langle \vv_k, \vv_k \rangle\text{.} \end{equation*}

So

\begin{equation*} x_k = \ds \frac{\langle \vx, \vv_k \rangle}{\langle \vv_k, \vv_k \rangle}\text{.} \end{equation*}

Thus, we can calculate each weight individually with two simple inner product calculations.

We summarize this discussion in the next theorem (compare to Theorem 24.4).

Activity 35.5.

Let \(p_1(t) = 1-t\text{,}\) \(p_2(t) = -2+4t+4t^2\text{,}\) and \(p_3(t) = 7-41t+40t^2\) be vectors in the inner product space \(\pol_2\) with inner product defined by \(\langle p(t), q(t) \rangle = \int_0^1 p(t)q(t) \ dt\text{.}\) Let \(\CB = \{p_1(t), p_2(t), p_3(t)\}\text{.}\) You may assume that \(\CB\) is an orthogonal basis for \(\pol_2\text{.}\) Let \(z(t) = 4-2t^2\text{.}\) Find the weight \(x_3\) so that \(z(t) = x_1p_1(t) + x_2 p_2(t) + x_3 p_3(t)\text{.}\) Use technology as appropriate to evaluate any integrals.

The decomposition (35.1) is even simpler if \(\langle \vv_k, \vv_k \rangle = 1\) for each \(k\text{.}\) Recall that

\begin{equation*} \langle \vv, \vv \rangle = || \vv ||^2\text{,} \end{equation*}

so the condition \(\langle \vv, \vv \rangle = 1\) implies that the vector \(\vv\) has norm 1. As with inner products in \(\R^n\text{,}\) an orthogonal basis with this additional condition is given a special name (compare to Definition 24.5).

Definition 35.11.

An orthonormal basis \(\CB = \{\vv_1, \vv_2, \ldots, \vv_m\}\) for a subspace \(W\) of an inner product space is an orthogonal basis such that \(|| \vv_k || = 1\) for \(1\leq k\leq m\text{.}\)

If \(\CB = \{\vv_1, \vv_2, \ldots, \vv_m\}\) is an orthonormal basis for a subspace \(W\) of an inner product space and \(\vx\) is a vector in \(W\text{,}\) then (35.1) becomes

\begin{equation} \vx = \langle \vx, \vv_1 \rangle \vv_1 + \langle \vx, \vv_2 \rangle \vv_2 + \cdots + \langle \vx, \vv_m \rangle \vv_m\text{.}\tag{35.2} \end{equation}

Recall that we can construct an orthonormal basis from an orthogonal basis by dividing each basis vector by its magnitude.

Subsection Orthogonal Projections onto Subspaces

In Section 25 we saw how to project a vector \(\vv\) in \(\R^n\) onto a subspace \(W\) of \(\R^n\text{.}\) The same process works for vectors in any inner product space.

Definition 35.12.

Let \(W\) be a subspace of an inner product space \(V\) and let \(\CB = \{\vw_1, \vw_2, \ldots, \vw_m\}\) be an orthogonal basis for \(W\text{.}\) For a vector \(\vv\) in \(V\text{,}\) the orthogonal projection of \(\vv\) onto \(W\) is the vector

\begin{equation*} \proj_W \vv = \frac{\langle \vv, \vw_1 \rangle }{\langle \vw_1, \vw_1 \rangle } \vw_1 + \frac{\langle \vv, \vw_2 \rangle }{\langle \vw_2, \vw_2 \rangle } \vw_2 + \cdots + \frac{\langle \vv, \vw_m \rangle}{\langle \vw_m, \vw_m \rangle} \vw_m\text{.} \end{equation*}

The projection of \(\vv\) orthogonal to \(W\) is the vector

\begin{equation*} \proj_{W^{\perp}} \vv = \vv - \proj_W \vv\text{.} \end{equation*}

The notation \(\proj_{W^{\perp}} \vv\) indicates that we expect this vector to be orthogonal to every vector in \(W\text{.}\)

Activity 35.6.

In Section 25 we showed that in the inner product space \(\R^n\) using the dot product as inner product, if \(W\) is a subspace of \(\R^n\) and \(\vv\) is in \(\R^n\text{,}\) then \(\proj_{W^{\perp}} \vv\) is orthogonal to every vector in \(W\text{.}\) In this activity we verify that same fact in an inner product space. That is, assume that \(\CB = \{\vw_1, \vw_2, \ldots, \vw_m\}\) is an orthogonal basis for a subspace \(W\) of an inner product space \(V\) and \(\vv\) is a vector in \(V\text{.}\) Follow the indicated steps to show that \(\proj_{W^{\perp}} \vv\) is orthogonal to every vector in \(\CB\text{.}\)

(a)

Let \(\vz\) be the projection of \(\vv\) onto \(W\text{.}\) Write \(\vz\) in terms of the basis vectors in \(\CB\text{.}\)

(b)

The vector \(\vv - \vz\) is the projection of \(\vv\) orthogonal to \(W\text{.}\) Let \(k\) be between \(1\) and \(m\text{.}\) Use the result of part (a) to show that \(\vv - \vz\) is orthogonal to \(\vw_k\text{.}\) Exercise 16 then shows that \(\vv - \vz\) is orthogonal to every vector in \(W\text{.}\)

Activity 35.6 shows that the vector \(\vv - \vw\) is orthogonal to vector for \(W\text{.}\) So, in fact, \(\proj_{W^\perp} \vv\) is the projection of \(\vv\) onto the orthogonal complement of \(W\text{,}\) which will be defined shortly.

Subsection Best Approximations in Inner Product Spaces

We have seen, e.g., linear regression to fit a line to a set of data, that we often want to find a vector in a subspace that “best” approximates a given vector in a vector space. As in \(\R^n\text{,}\) the projection of a vector onto a subspace has this important property. That is, \(\proj_W \vv\) is the vector in \(W\) closest to \(\vv\) and therefore the best approximation of \(\vv\) by a vector in \(W\text{.}\) To see that this is true in any inner product space, we first need a generalization of the Pythagorean Theorem that holds in inner product spaces.

Proof.

Let \(\vu\) and \(\vv\) be orthogonal vectors in an inner product space \(V\text{.}\) Then

\begin{align*} || \vu - \vv ||^2 \amp = \langle \vu-\vv, \vu-\vv \rangle\\ \amp = \langle \vu,\vu \rangle - 2 \langle \vu,\vv \rangle + \langle \vv, \vv \rangle\\ \amp = \langle \vu,\vu \rangle - 2 (0) + \langle \vv, \vv \rangle\\ \amp = ||\vu||^2 + ||\vv||^2\text{.} \end{align*}

Note that replacing \(\vv\) with \(-\vv\) in the theorem also shows that \(||\vu + \vv||^2 = ||\vu||^2 + ||\vv||^2\) if \(\vu\) and \(\vv\) are orthogonal.

Now we will prove that the projection of a vector \(\vu\) onto a subspace \(W\) of an inner product space \(V\) is the best approximation in \(W\) to the vector \(\vu\text{.}\)

Proof.

Let \(W\) be a subspace of an inner product space \(V\) and let \(\vu\) be a vector in \(V\text{.}\) Let \(\vx\) be a vector in \(W\text{.}\) Now

\begin{equation*} \vu - \vx = (\vu-\proj_W \vu) + (\proj_W \vu - \vx)\text{.} \end{equation*}

Since both \(\proj_W \vu\) and \(\vx\) are in \(W\text{,}\) we know that \(\proj_W \vu - \vx\) is in \(W\text{.}\) Since \(\proj_{W^{\perp}} \vu = \vu-\proj_W \vu\) is orthogonal to every vector in \(W\text{,}\) we have that \(\vu-\proj_W \vu\) is orthogonal to \(\proj_W \vu - \vx\text{.}\) We can now use the Generalized Pythagorean Theorem to conclude that

\begin{equation*} ||\vu - \vx||^2 = ||\vu-\proj_W \vu||^2 + ||\proj_W \vu - \vx||^2\text{.} \end{equation*}

Since \(\vx \neq \proj_W \vu\text{,}\) it follows that \(||\proj_W \vu - \vx||^2 > 0\) and

\begin{equation*} || \vu - \vx ||^2 > ||\vu - \proj_W \vu ||^2\text{.} \end{equation*}

Since norms are nonnegative, we can conclude that \(||\vu - \proj_W \vu || \lt || \vu - \vx ||\) as desired.

Theorem 35.14 shows that the distance from \(\proj_W \vv\) to \(\vv\) is less than the distance from any other vector in \(W\) to \(\vv\text{.}\) So \(\proj_W \vv\) is the best approximation to \(\vv\) of all the vectors in \(W\text{.}\)

In \(\R^n\) using the dot product as inner product, if \(\vv = [v_1 \ v_2 \ v_3 \ \ldots \ v_n]^{\tr}\) and \(\proj_W \vv = [w_1 \ w_2 \ w_3 \ \ldots \ w_n]^{\tr}\text{,}\) then the square of the error in approximating \(\vv\) by \(\proj_W \vv\) is given by

\begin{equation*} || \vv - \proj_W \vv ||^2 = \sum_{i=1}^n (v_i - w_i)^2\text{.} \end{equation*}

So \(\proj_W \vv\) minimizes this sum of squares over all vectors in \(W\text{.}\) As a result, we call \(\proj_W \vv\) the least squares approximation to \(\vv\text{.}\)

Activity 35.7.

The set \(\CB = \{1, t-\frac{1}{2}, t^3-\frac{9}{10}t+\frac{1}{5}\}\) is an orthogonal basis for a subspace \(W\) of the inner product space \(\pol_3\) using the inner product \(\langle p(t), q(t) \rangle = \int_0^1 p(t)q(t) \ dt\text{.}\) Find the polynomial in \(W\) that is closest to the polynomial \(r(t) = t^2\) and give a numeric estimate of how good this approximation is.

Subsection Orthogonal Complements

If we have a set of vectors \(S\) in an inner product space \(V\text{,}\) we can define the orthogonal complement of \(S\) as we did in \(\R^n\) (see Definition 23.14).

Definition 35.15.

The orthogonal complement of a subset \(S\) of an inner product space \(V\) is the set

\begin{equation*} S^{\perp} = \{\vv \in V : \langle \vv, \vu \rangle = 0 \text{ for all } \vu \in S\}\text{.} \end{equation*}

As we saw in \(\R^n\text{,}\) to show that a vector is in the orthogonal complement of a subspace, it is enough to show that the vector is orthogonal to every vector in a basis for that subspace. The same is true in any inner product space. The proof is left to the exercises.

Activity 35.8.

Consider \(\pol_2\) with the inner product \(\langle p(t), q(t) \rangle = \int_0^1 p(t)q(t) \ dt\text{.}\)

(a)

Find \(\langle p(t), 1-t \rangle\) where \(p(t)=a+bt+ct^2\) is in \(\pol_2\text{.}\)

(b)

Describe as best you can the orthogonal complement of \(\Span\{1-t\}\) in \(\pol_2\text{.}\) Is \(p(t)=1-2t-2t^2\) in this orthogonal complement? Is \(p(t)=1+t-t^2\text{?}\)

As was the case in \(\R^n\text{,}\) give a subspace \(W\) of an inner product space \(V\text{,}\) any vector in \(V\) can be written uniquely as a sum of a vector in \(W\) and a vector in \(W^{\perp}\text{.}\)

Activity 35.9.

Let \(V\) be an inner product space of dimension \(n\text{,}\) and let \(W\) be a subspace of \(V\text{.}\) Let \(\vx\) be any vector in \(V\text{.}\) We will demonstrate that \(\vx\) can be written uniquely as a sum of a vector in \(W\) and a vector in \(W^{\perp}\text{.}\)

(a)

Explain why \(\proj_W \vx\) is in \(W\text{.}\)

(b)

Explain why \(\proj_{W^{\perp}} \vx\) is in \(W^{\perp}\text{.}\)

(c)

Explain why \(\vx\) can be written as a sum of vectors, one in \(W\) and one in \(W^{\perp}\text{.}\)

(d)

Now we demonstrate the uniqueness of this decomposition. Suppose \(\vx = \vw+\vw_1\) and \(\vx = \vu+\vu_1\text{,}\) where \(\vw\) and \(\vu\) are in \(W\) and \(\vw_1\) and \(\vu_1\) are in \(W^{\perp}\text{.}\) Show that \(\vw=\vu\) and \(\vw_1 = \vu_1\text{,}\) so that the representation of \(\vx\) as a sum of a vector in \(W\) and a vector in \(W^{\perp}\) is unique. (Hint: What is \(W \cap W^{\perp}\text{?}\))

We summarize the result of Activity 35.9.

Theorem 35.17 is useful in many applications. For example, to compress an image using wavelets, we store the image as a collection of data, then rewrite the data using a succession of subspaces and their orthogonal complements. This new representation allows us to visualize the data in a way that compression is possible.

Subsection Examples

What follows are worked examples that use the concepts from this section.

Example 35.18.

Let \(V = \pol_3\) be the inner product space with inner product

\begin{equation*} \langle p(t), q(t) \rangle = \int_{-1}^1 p(t)q(t) \ dt\text{.} \end{equation*}

Let \(p_1(t) = 1+t\text{,}\) \(p_2(t) = 1-3t\text{,}\) \(p_3(t) = 3t-5t^3\text{,}\) and \(p_4(t) = 1-3t^2\text{.}\)

(a)

Show that the set \(\CB = \{p_1(t), p_2(t), p_3(t), p_4(t)\}\) is an orthogonal basis for \(V\text{.}\)

Solution.

All calculations are done by hand or with a computer algebra system, so we leave those details to the reader.

If we show that the set \(\CB\) is an orthogonal set, then Theorem 35.8 shows that \(\CB\) is linearly independent. Since \(\dim(\pol_3) = 4\text{,}\) the linearly independent set \(\CB\) that contains four vectors must be a basis for \(\pol_3\text{.}\) To determine if the set \(\CB\) is an orthogonal set, we must calculate the inner products of pairs of distinct vectors in \(\CB\text{.}\) Since \(\langle 1+t,1-3t \rangle = 0\text{,}\) \(\langle 1+t,3t-5t^3 \rangle = 0\text{,}\) \(\langle 1+t,1-3t^2 \rangle = 0\text{,}\) \(\langle 1-3t,3t-5t^3 \rangle = 0\text{,}\) \(\langle 1-3t,1-3t^2 \rangle = 0\text{,}\) and \(\langle 3t-5t^3,1-3t^2 \rangle = 0\text{,}\) we conclude that \(\CB\) is an orthogonal basis for \(\pol_3\text{.}\)

(b)

Use 35.10 to write the polynomial \(q(t) = t^2+t^3\) as a linear combination of the basis vectors in \(\CB\text{.}\)

Solution.

All calculations are done by hand or with a computer algebra system, so we leave those details to the reader.

We can write the polynomial \(q(t) = 1+t+t^2+t^3\) as a linear combination of the basis vectors in \(\CB\) as follows:

\begin{align*} q(t) = \frac{\langle q(t),p_1(t) \rangle }{\langle p_1(t),p_1(t) \rangle} p_1(t) \amp + \frac{\langle q(t),p_2(t) \rangle }{\langle p_2(t),p_2(t) \rangle} p_2(t)\\ \amp + \frac{\langle q(t),p_3(t) \rangle }{\langle p_3(t),p_3(t) \rangle} p_3(t) + \frac{\langle q(t),p_4(t) \rangle }{\langle p_4(t),p_4(t) \rangle} p_4(t)\text{.} \end{align*}

Now

\begin{equation*} \begin{array}{ccc} \langle q(t), p_1(t) \rangle = \frac{16}{15}, \amp \langle q(t), p_2(t) \rangle = -\frac{8}{15}, \amp \langle q(t), p_3(t) \rangle = -\frac{8}{35}, \\ \langle q(t), p_4(t) \rangle = -\frac{8}{15}, \amp \langle p_1(t), p_1(t)\rangle = \frac{8}{3}, \amp \langle p_2(t), p_2(t) \rangle = 8, \\ \langle p_3(t), p_3(t) \rangle = \frac{8}{7}, \amp \langle p_4(t), p_4(t) \rangle = \frac{8}{5} \amp \end{array} \end{equation*}

so

\begin{align*} q(t) \amp = \frac{ \frac{16}{15} }{ \frac{8}{3} } p_1(t) - \frac{ \frac{8}{15} }{ 8 } p_2(t) - \frac{ \frac{8}{35} }{ \frac{8}{7} } p_3(t) - \frac{ \frac{8}{15} }{ \frac{8}{5} } p_4(t)\\ \amp \frac{2}{5} p_1(t) - \frac{1}{15}p_2(t) - \frac{1}{5} p_3(t) - \frac{1}{3} p_4(t)\text{.} \end{align*}

Example 35.19.

Let \(V\) be the inner product space \(\R^4\) with inner product defined by

\begin{equation*} \langle [u_1 \ u_2 \ u_3 \ u_4]^{\tr}, [v_1 \ v_2 \ v_3 \ v_4]^{\tr} \rangle = u_1v_1 + 2u_2v_2 + 3u_3v_3 + 4u_4v_4\text{.} \end{equation*}
(a)

Let \(W\) be the plane spanned by \([-1 \ 1\ 0 \ 1]^{\tr}\) and \([6 \ 1 \ 7 \ 1]^{\tr}\) in \(V\text{.}\) Find the vector in \(W\) that is closest to the vector \([2 \ 0 \ -1 \ 3]^{\tr}\text{.}\) Exactly how close is your best approximation to the vector \([2 \ 0 \ -1 \ 3]^{\tr}\text{?}\)

Solution.

The vector we're looking for is the projection of \([2 \ 0 \ -1 \ 3]^{\tr}\) onto the plane. A spanning set for the plane is \(\CB = \{[-1 \ 1 \ 0 \ 1]^{\tr}, [6 \ 1 \ 7 \ 1]^{\tr}\}\text{.}\) Neither vector in \(\CB\) is a scalar multiple of the other, so \(\CB\) is a basis for the plane. Since

\begin{equation*} \langle [-1 \ 1 \ 0 \ 1]^{\tr}, [6 \ 1 \ 7 \ 1]^{\tr} \rangle = -6 + 2 + 0 + 4 = 0\text{,} \end{equation*}

the set \(\CB\) is an orthogonal basis for the plane. The projection of the vector \(\vv = [2 \ 0 \ -1 \ 3]^{\tr}\) onto the plane spanned by \(\vw_1 = [-1 \ 1 \ 0 \ 1]^{\tr}\) and \(\vw_2 = [6 \ 1 \ 7 \ 1]^{\tr}\) is given by

\begin{align*} \frac{\langle \vv, \vw_1\rangle}{\langle \vw_1, \vw_1\rangle } \vw_1 + \frac{\langle \vv, \vw_2 \rangle }{\langle \vw_2, \vw_2 \rangle}\vw_2 \amp = \frac{10}{7} [-1 \ 1\ 0 \ 1]^{\tr} + \frac{3}{189} [6 \ 1 \ 7 \ 1]^{\tr}\\ \amp = \frac{1}{189}[-252 \ 273 \ 21 \ 273]{\tr}\\ \amp = \left[ -\frac{4}{3} \ \frac{13}{9} \ \frac{1}{9} \ \frac{13}{9} \right]\text{.} \end{align*}

To measure how close close \(\left[ -\frac{4}{3} \ \frac{13}{9} \ \frac{1}{9} \ \frac{13}{9} \right]\) is to \([2 \ 0 \ -1 \ 3]^{\tr}\text{,}\) we calculate

\begin{align*} \left|\left| \left[ -\frac{4}{3} \ \frac{13}{9} \ \frac{1}{9} \ \frac{13}{9} \right] - [2 \ 0 \ -1 \ 3]^{\tr} \right|\right| \amp = \left|\left| \left[-\frac{10}{3} \ \frac{13}{9} \ \frac{10}{9} \ -\frac{14}{9} \right] \right| \right|\\ \amp = \sqrt{ \frac{100}{9} + \frac{338}{81} + \frac{300}{81} + \frac{784}{81}}\\ \amp = \frac{1}{9} \sqrt{2322}\\ \amp \approx 5.35\text{.} \end{align*}
(b)

Express the vector \([2 \ 0 \ -1 \ 3]^{\tr}\) as the sum of a vector in \(W\) and a vector orthogonal to \(W\text{.}\)

If \(\vv = [2 \ 0 \ -1 \ 3]^{\tr}\text{,}\) then \(\proj_{W} \vv\) is in \(W\) and

\begin{equation*} \proj_{W^{\perp}} \vv = \vv - \proj_{W} \vv = \left[-\frac{10}{3} \ \frac{13}{9} \ \frac{10}{9} \ -\frac{14}{9} \right] \end{equation*}

is in \(W^{\perp}\text{,}\) and \(\vv = \proj_{W} \vv + \proj_{W^{\perp}} \vv\text{.}\)

Subsection Summary

  • An inner product \(\langle \ , \ \rangle\) on a vector space \(V\) is a mapping from \(V \times V \to \R\) satisfying

    1. \(\langle \vu , \vv \rangle = \langle \vv , \vu \rangle\) for all \(\vu\) and \(\vv\) in \(V\text{,}\)

    2. \(\langle \vu + \vv , \vw \rangle = \langle \vu , \vw \rangle + \langle \vv , \vw \rangle\) for all \(\vu\text{,}\) \(\vv\text{,}\) and \(\vw\) in \(V\text{,}\)

    3. \(\langle c\vu , \vv \rangle = c\langle \vu , \vv \rangle\) for all \(\vu\text{,}\) \(\vv\) in \(V\) and \(c \in \R\text{,}\)

    4. \(\langle \vu , \vu \rangle \geq 0\) for all \(\vu\) in \(V\) and \(\langle \vu , \vu \rangle = 0\) if and only if \(\vu = \vzero\text{.}\)

  • An inner product space is a pair \(V\text{,}\) \(\langle \ , \ \rangle\) where \(V\) is a vector space and \(\langle \ , \ \rangle\) is an inner product on \(V\text{.}\)

  • The length of a vector \(\vv\) in an inner product space \(V\) is defined to be the real number \(||\vv|| = \sqrt{\langle \vv, \vv \rangle}\text{.}\)

  • The distance between two vectors \(\vu\) and \(\vv\) in an inner product space \(V\) is the scalar \(|| \vu - \vv ||\text{.}\)

  • The angle \(\theta\) between two vectors \(\vu\) and \(\vv\) is the angle which satisfies \(0\leq \theta \leq \pi\) and

    \begin{equation*} \cos(\theta) = \frac{\langle \vu, \vv \rangle}{||\vu|| ||\vv||} \,\text{.} \end{equation*}
  • Two vectors \(\vu\) and \(\vv\) in an inner product space \(V\) are orthogonal if \(\langle \vu, \vv \rangle = 0\text{.}\)

  • A subset \(S\) of an inner product space is an orthogonal set if \(\langle \vu, \vv \rangle = 0\) for all \(\vu \neq \vv\) in \(S\text{.}\)

  • A basis for a subspace of an inner product space is an orthogonal basis if the basis is also an orthogonal set.

  • Let \(\CB = \{\vv_1, \vv_2, \ldots, \vv_m\}\) be an orthogonal basis for a subspace of an inner product space \(V\text{.}\) Let \(\vx\) be a vector in \(W\text{.}\) Then

    \begin{equation*} \vx = \sum_{i=1}^m c_i \vv_i\text{,} \end{equation*}

    where

    \begin{equation*} c_i = \frac{\langle \vx, \vv_i \rangle}{\langle \vv_i, \vv_i \rangle} \end{equation*}

    for each \(i\text{.}\)

  • An orthogonal basis \(\CB = \{\vv_1, \vv_2, \ldots, \vv_m\}\) for a subspace \(W\) of an inner product space \(V\) is an orthonormal basis if \(|| \vv_k || = 1\) for each \(k\) from 1 to \(m\text{.}\)

  • If \(\CB = \{\vw_1, \vw_2, \ldots, \vw_m\}\) is an orthogonal basis for \(V\) and \(\vx \in V\text{,}\) then

    \begin{equation*} [\vx]_{\CB} = \left[ \begin{array}{c} \frac{\langle \vx, \vw_1 \rangle}{\langle \vw_1, \vw_1 \rangle} \\ \frac{\langle \vx, \vw_2 \rangle}{\langle \vw_2, \vw_2 \rangle} \\ \vdots \\ \frac{\langle \vx, \vw_m \rangle}{\langle \vw_m, \vw_m \rangle} \end{array} \right]\text{.} \end{equation*}
  • The projection of the vector \(\vv\) in an inner product space \(V\) onto a subspace \(W\) of \(V\) is the vector

    \begin{equation*} \proj_W \vv = \frac{\langle \vv, \vw_1 \rangle }{\langle \vw_1, \vw_1 \rangle } \vw_1 + \frac{\langle \vv, \vw_2 \rangle }{\langle \vw_2, \vw_2 \rangle } \vw_2 + \cdots + \frac{\langle \vv, \vw_m \rangle}{\langle \vw_m, \vw_m \rangle} \vw_m\text{,} \end{equation*}

    where \(\{\vw_1, \vw_2, \ldots, \vw_m\}\) is an orthogonal basis of \(W\text{.}\) Projections are important in that \(\proj_W \vv\) is the best approximation of the vector \(\vv\) by a vector in \(W\) in the least squares sense.

  • With \(W\) as in (a), the projection of \(\vv\) orthogonal to \(W\) is the vector

    \begin{equation*} \proj_{W^{\perp}} \vv = \vv - \proj_W \vv\text{.} \end{equation*}

    The norm of \(\proj_{W^{\perp}} \vv\) provides a measure of how well \(\proj_W \vv\) approximates the vector \(\vv\text{.}\)

  • The orthogonal complement of a subset \(S\) of an inner product space \(V\) is the set

    \begin{equation*} S^{\perp} = \{\vv \in V : \langle \vv, \vu \rangle = 0 \text{ for all } \vu \in S\}\text{.} \end{equation*}

Exercises Exercises

1.

Let \(C[a,b]\) be the set of all continuous real valued functions on the interval \([a,b]\text{.}\) If \(f\) is in \(C[a,b]\text{,}\) we can extend \(f\) to a continuous function from \(\R\) to \(\R\) by letting \(F\) be the function defined by

\begin{equation*} F(x) = \begin{cases}f(a) \amp \text{ if } x \lt a \\ f(x) \amp \text{ if } a \leq x \leq b \\ f(b) \amp \text{ if } b \lt x \end{cases}\text{.} \end{equation*}

In this way we can view \(C[a,b]\) as a subset of \(\F\text{,}\) the vector space of all functions from \(\R\) to \(\R\text{.}\) Verify that \(C[a,b]\) is a vector space.

Hint.

Use properties of continuous functions.

2.

Use the definition of an inner product to determine which of the following defines an inner product on the indicated space. Verify your answers.

(a)

\(\langle \vu, \vv \rangle = u_1v_1 - u_2v_1 - u_1v_2 + 3u_2v_2\) for \(\vu = [u_1 \ u_2]^{\tr}\) and \(\vv = [v_1 \ v_2]^{\tr}\) in \(\R^2\)

(b)

\(\langle f, g \rangle = \int_a^b f(x)g(x) \ dx\) for \(f,g \in C[a,b]\) (where \(C[a,b]\) is the vector space of all continuous functions on the interval \([a,b]\))

(c)

\(\langle f, g \rangle = f'(0)g'(0)\) for \(f,g \in D(-1,1)\) (where \(D(a,b)\) is the vector space of all differentiable functions on the interval \((a,b)\))

(d)

\(\langle \vu, \vv \rangle = (A\vu) \cdot (A\vv)\) for \(\vu, \vv \in \R^n\) and \(A\) an invertible \(n \times n\) matrix

3.

We can sometimes visualize an inner product in \(\R^2\) or \(\R^3\) (or other spaces) by describing the unit circle \(S^1\text{,}\) where

\begin{equation*} S^1 = \{ \vv \in V : || \vv || = 1\} \end{equation*}

in that inner product space. For example, in the inner product space \(\R^2\) with the dot product as inner product, the unit circle is just our standard unit circle. Inner products, however, can distort this familiar picture of the unit circle. Describe the points on the unit circle \(S^1\) in the inner product space \(\R^2\) with inner product \(\langle [u_1 \ u_2], [v_1 \ v_2] \rangle = 2u_1v_1 + 3u_2v_2\) using the following steps.

(a)

Let \(\vx = [x \ y] \in \R^2\text{.}\) Set up an equation in \(x\) and \(y\) that is equivalent to the vector equation \(|| \vx || = 1\text{.}\)

(b)

Describe the graph of the equation you found in \(\R^2\text{.}\) It should have a familiar form. Draw a picture to illustrate. What do you think of calling this graph a “circle”?

4.

Define \(\langle \ , \ \rangle\) on \(\R^2\) by \(\langle [u_1 \ u_2]^\tr , [v_1 \ v_2]^\tr \rangle = 4u_1v_1+2u_2v_2\text{.}\)

(a)

Show that \(\langle \ , \ \rangle\) is an inner product.

(b)

The inner product \(\langle \ , \ \rangle\) can be represented as a matrix transformation \(\langle \vu, \vv \rangle = \vu^{\tr} A \vv\text{,}\) where \(\vu\) and \(\vv\) are written as column vectors. Find a matrix \(A\) that represents this inner product.

5.

This exercise is a generalization of Exercise 4. Define \(\langle \ , \ \rangle\) on \(\R^n\) by

\begin{equation*} \langle [u_1 \ u_2 \ \cdots \ u_n]^{\tr}, [v_1 \ v_2 \ \cdots \ v_n]^{\tr} \rangle = a_1u_1v_1+a_2u_2v_2+ \cdots + a_nu_nv_n \end{equation*}

for some positive scalars \(a_1\text{,}\) \(a_2\text{,}\) \(\ldots\text{,}\) \(a_n\text{.}\)

(a)

Show that \(\langle \ , \ \rangle\) is an inner product.

(b)

The inner product \(\langle \ , \ \rangle\) can be represented as a matrix transformation \(\langle \vu, \vv \rangle = \vu^{\tr} A \vv\text{,}\) where \(\vu\) and \(\vv\) are written as column vectors. Find a matrix \(A\) that represents this inner product.

6.

Is the sum of two inner products on an inner product space \(V\) an inner product on \(V\text{?}\) If yes, prove it. If no, provide a counterexample. (By the sum of inner products we mean a function \(\langle \ , \ \rangle\) satisfying

\begin{equation*} \langle \vu, \vv \rangle = \langle \vu, \vv \rangle_1 + \langle \vu, \vv \rangle_2 \end{equation*}

for all \(\vu\) and \(\vv\) in \(V\text{,}\) where \(\langle \ , \ \rangle_1\) and \(\langle \ , \ \rangle_2\) are inner products on \(V\text{.}\))

7.

(a)

Does \(\langle \vu, \vv \rangle = \vu^{\tr}A\vv\) define an inner product on \(\R^n\) for every \(n \times n\) matrix \(A\text{?}\) Verify your answer.

(b)

If your answer to part (a) is no, are there any types of matrices for which \(\langle \vu, \vv \rangle = \vu^{\tr}A\vv\) defines an inner product?

8.

The trace of an \(n \times n\) matrix \(A = [a_{ij}]\) has some useful properties.

(a)

Show that \(\trace(A+B) = \trace(A) + \trace(B)\) for any \(n \times n\) matrices \(A\) and \(B\text{.}\)

(b)

Show that \(\trace(cA) = c \trace(A)\) for any \(n \times n\) matrix \(A\) and any scalar \(c\text{.}\)

(c)

Show that \(\trace\left(A^{\tr}\right) = \trace(A)\) for any \(n \times n\) matrix.

9.

Let \(V\) be an inner product space and \(\vu, \vv\) be two vectors in \(V\text{.}\)

(a)

Check that if \(\vv=\vzero\text{,}\) the Cauchy-Schwarz inequality

\begin{equation*} |\langle \vu, \vv \rangle | \leq ||\vu || ||\vv || \end{equation*}

holds.

Hint.

Evaluate each side of the inequality.

(b)

Assume \(\vv \neq \vzero\text{.}\) Let \(\lambda= \langle \vu, \vv \rangle / ||\vv||^2\) and \(\vw=\vu - \lambda \vv\text{.}\) Use the fact that \(||\vw||^2 \geq 0\) to conclude the Cauchy-Schwarz inequality in this case.

Hint.

Write \(||\vw||^2\) as an inner product and expand.

10.

The Frobenius inner product is defined as

\begin{equation*} \langle A, B \rangle = \trace\left(AB^{\tr}\right)\text{.} \end{equation*}

for \(n \times n\) matrices \(A\) and \(B\text{.}\) Verify that \(\langle A, B \rangle\) defines an inner product on \(\M_{n \times n}\text{.}\)

11.

Let \(A = [a_{ij}]\) and \(B = [b_{ij}]\) be two \(n \times n\) matrices.

(a)

Show that if \(n=2\text{,}\) then the Frobenius inner product (see Exercise 10) of \(A\) and \(B\) is

\begin{equation*} \langle A, B \rangle = a_{11}b_{11} + a_{12}b_{12} + a_{21}b_{21} + a_{22}b_{22}\text{.} \end{equation*}
Hint.

Expand the inner product.

(b)

Extend part (a) to the general case. That is, show that for an arbitrary \(n\text{,}\)

\begin{equation*} \langle A, B \rangle = \sum_{i=1}^n \sum_{j=1}^n a_{ij}b_{ij}\text{.} \end{equation*}
Hint.

Expand the inner product.

(c)

Compare the Frobenius inner product to the scalar product of two vectors.

Hint.

Convert \(A\) and \(B\) to vectors in \(\R^{n^2}\) whose entries are the entries in the first row followed by the entries in the second row and so on.

12.

Let \(\CB = \{[1 \ 1 \ 1]^{\tr}, [1 \ -1 \ 0]^{\tr}\}\) and let \(W = \Span \ \CB\) in \(\R^3\text{.}\)

(a)

Show that \(\CB\) is an orthogonal basis for \(W\text{,}\) using the dot product as inner product.

(b)

Explain why the vector \(\vv = [0 \ 2 \ 2]^{\tr}\) is not in \(W\text{.}\)

(c)

Find the vector in \(W\) that is closest to \(\vv\text{.}\) How close is this vector to \(\vv\text{?}\)

13.

Let \(\R^3\) be the inner product space with inner product

\begin{equation*} \langle [u_1 \ u_2 \ u_3]^{\tr}, [v_1 \ v_2 \ v_3]^{\tr}\rangle = u_1v_1 + 2u_2v_2 + u_3v_3\text{.} \end{equation*}

Let \(\CB = \{[1 \ 1 \ 1]^{\tr}, [1 \ -1 \ 1]^{\tr}\}\) and let \(W = \Span \ \CB\) in \(\R^3\text{.}\)

(a)

Show that \(\CB\) is an orthogonal basis for \(W\text{,}\) using the given inner product.

(b)

Explain why the vector \(\vv = [0 \ 2 \ 2]^{\tr}\) is not in \(W\text{.}\)

Hint.

Try to write \(\vv\) in terms of the basis vectors for \(W\text{.}\)

(c)

Find the vector in \(W\) that is closest to \(\vv\text{.}\) How close is this vector to \(\vv\text{?}\)

14.

Let \(\pol_2\) be the inner product space with inner product

\begin{equation*} \langle p(t), q(t) \rangle = \int_0^1 p(t)q(t) \ dt\text{.} \end{equation*}

Let \(\CB = \{1, 1-2t\}\) and let \(W = \Span \ \CB\) in \(\pol_2\text{.}\)

(a)

Show that \(\CB\) is an orthogonal basis for \(W\text{,}\) using the given inner product.

(b)

Explain why the polynomial \(q(t) = t^2\) is not in \(W\text{.}\)

(c)

Find the vector in \(W\) that is closest to \(q(t)\text{.}\) How close is this vector to \(q(t)\text{?}\)

15.

Prove the remaining properties of Theorem 35.2. That is, if \(\langle \ , \ \rangle\) is an inner product on a vector space \(V\) and \(\vu, \vv\text{,}\) and \(\vw\) are vectors in \(V\) and \(c\) is any scalar, then

(a)

\(\langle \vzero , \vv \rangle = \langle \vv , \vzero \rangle = 0\)

Hint.

Use the fact that \(\vzero = \vzero + \vzero\text{.}\)

(b)

\(\langle \vu , c\vv \rangle = c\langle \vu , \vv \rangle\)

Hint.

Use the fact that \(\langle \vu, \vv \rangle = \langle \vv, \vu \rangle\text{.}\)

(c)

\(\langle \vv+\vw , \vu \rangle = \langle \vv , \vu \rangle + \langle \vw , \vu \rangle\)

Hint.

Same hint as part (b).

(d)

\(\langle \vu - \vv, \vw \rangle = \langle \vw, \vu - \vv \rangle= \langle \vu , \vw \rangle - \langle \vv , \vw \rangle= \langle \vw, \vu \rangle - \langle \vw, \vv \rangle\)

Hint.

Use the fact that \(\vu - \vv = \vu + (-\vv)\text{.}\)

16.

Prove the following theorem referenced in Activity 35.6.

18.

Let \(V\) be a vector space with basis \(\{\vv_1, \vv_2, \ldots, \vv_n\}\text{.}\) Define \(\langle \ , \ \rangle\) as follows:

\begin{equation*} \langle \vu, \vw \rangle = \sum_{i=1}^n u_iw_i \end{equation*}

if \(\vu = \sum_{i=1}^n u_i \vv_i\) and \(\vw = \sum_{i=1}^n w_i \vv_i\) in \(V\text{.}\) (Since the representation of a vector as a linear combination of basis elements is unique, this mapping is well-defined.) Show that \(\langle \ , \ \rangle\) is an inner product on \(V\) and conclude that any finite dimensional vector space can be made into an inner product space.

19.

Label each of the following statements as True or False. Provide justification for your response.

(a) True/False.

An inner product on a vector space \(V\) is a function from \(V\) to the real numbers.

(b) True/False.

If \(\langle \ , \ \rangle\) is an inner product on a vector space \(V\text{,}\) and if \(\vv\) is a vector in \(V\text{,}\) then the set \(W = \{\vx \in V : \langle \vx,\vv \rangle = 0\}\) is a subspace of \(V\text{.}\)

(c) True/False.

There is exactly one inner product on each inner product space.

(d) True/False.

If \(\vx\text{,}\) \(\vy\text{,}\) and \(\vz\) are vectors in an inner product space with \(\langle \vx, \vz \rangle = \langle \vy, \vz \rangle\text{,}\) then \(\vx = \vy\text{.}\)

(e) True/False.

If \(\langle \vx, \vy \rangle = 0\) for all vectors \(\vy\) in an inner product space \(V\text{,}\) then \(\vx = \vzero\text{.}\)

(f) True/False.

If \(\vu\) and \(\vv\) are vectors in an inner product space and the distance from \(\vu\) to \(\vv\) is the same as the distance from \(\vu\) to \(-\vv\text{,}\) then \(\vu\) and \(\vv\) are orthogonal.

(g) True/False.

If \(W\) is a subspace of an inner product space and a vector \(\vv\) is orthogonal to every vector in a basis of \(W\text{,}\) then \(\vv\) is in \(W^{\perp}\text{.}\)

(h) True/False.

If \(\{\vv_1, \vv_2, \vv_3\}\) is an orthogonal basis for an inner product space \(V\text{,}\) then so is \(\{c\vv_1, \vv_2, \vv_3\}\) for any nonzero scalar \(c\text{.}\)

(i) True/False.

An inner product \(\langle \vu, \vv \rangle\) in an inner product space \(V\) results in another vector in \(V\text{.}\)

(j) True/False.

An inner product in an inner product space \(V\) is a function that maps pairs of vectors in \(V\) to the set of non-negative real numbers.

(k) True/False.

The vector space of all \(n \times n\) matrices can be made into an inner product space.

(l) True/False.

Any non-zero multiple of an inner product on space \(V\) is also an inner product on \(V\text{.}\)

(m) True/False.

Every set of \(k\) non-zero orthogonal vectors in a vector space \(V\) of dimension \(k\) is a basis for \(V\text{.}\)

(n) True/False.

For any finite-dimensional inner product space \(V\) and a subspace \(W\) of \(V\text{,}\) \(W\) is a subspace of \((W^\perp)^\perp\text{.}\)

(o) True/False.

If \(W\) is a subspace of an inner product space, then \(W\cap W^\perp = \{\vzero\}\text{.}\)

Subsection Project: Fourier Series and Musical Tones

Joseph Fourier first studied trigonometric polynomials to understand the flow of heat in metallic plates and rods. The resulting series, called Fourier series, now have applications in a variety of areas including electrical engineering, vibration analysis, acoustics, optics, signal processing, image processing, geology, quantum mechanics, and many more. For our purposes, we will focus on synthesized music.

Pure musical tones are periodic sine waves. Simple electronic circuits can be designed to generate alternating current. Alternating current is current that is periodic, and hence is described by a combination of \(\sin(kx)\) and \(\cos(kx)\) for integer values of \(k\text{.}\) To synthesize an instrument like a violin, we can project the instrument's tones onto trigonometric polynomials — and then we can produce them electronically. As we will see, these projections are least squares approximations onto certain vector spaces. The website falstad.com/fourier/ provides a tool for hearing sounds digitally created by certain functions. For example, you can listen to the sound generated by a sawtooth function \(f\) of the form

\begin{equation*} f(x) = \begin{cases}x \amp \text{ if } -\pi \lt x \leq \pi, \\ f(x-2\pi), \amp \text{ if } \pi \lt x, \\ f(x+2\pi), \amp \text{ if } x \leq -\pi. \end{cases} \end{equation*}

Try out some of the tones on this website (click on the Sound button to hear the tones). You can also alter the tones by clicking on any one of the white dots and moving it up or down. and play with the buttons. We will learn much about what this website does in this project.

Pure tones are periodic and so are modeled by trigonometric functions. In general, trigonometric polynomials can be used to produce good approximations to periodic phenomena. A trigonometric polynomial is an object of the form

\begin{align*} c_0 + c_1 \cos(x) + d_1\sin(x) \amp + c_2\cos(2x) + d_2\sin(2x) + \cdots\\ \amp + c_n \cos(nx) + d_n \sin(nx) + \cdots\text{,} \end{align*}

where the \(c_i\) and \(d_j\) are real constants. With judicious choices of these constants, we can approximate periodic and other behavior with trigonometric polynomials. The first step for us will be to understand the relationships between the summands of these trigonometric polynomials in the inner product space \(C[-\pi, \pi]\) 61  of continuous functions from \([\pi, \pi]\) to \(\R\) with the inner product

\begin{equation} \langle f,g \rangle = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)g(x) \ dx\text{.}\tag{35.3} \end{equation}

Our first order of business is to verify that (35.3) is, in fact, an inner product.

Project Activity 35.10.

Let \(C[a,b]\) be the set of continuous real-valued functions on the interval \([a,b]\text{.}\) In Exercise 1 in Section 35 we are asked to show that \(C[a,b]\) is a vector space, while Exercise 2 in Section 35 asks us to show that \(\langle f,g \rangle = \int_a^b f(x)g(x) \, dx\) defines an inner product on \(C[a,b]\text{.}\) However, (36.2) is slightly different than this inner product. Show that any positive scalar multiple of an inner product is an inner product, and conclude that (35.3) defines an inner product on \(C[-\pi,\pi]\text{.}\) (We will see why we introduce the factor of \(\frac{1}{\pi}\) later.)

Now we return to our inner product space \(C[-\pi,\pi]\) with inner product (35.3). Given a function \(g\) in \(C[-\pi,\pi]\text{,}\) we approximate \(g\) using only a finite number of the terms in a trigonometric polynomial. Let \(W_n\) be the subspace of \(C[-\pi,\pi]\) spanned by the functions

\begin{equation*} 1, \cos(x), \sin(x), \cos(2x), \sin(2x), \ldots, \cos(nx), \sin(nx)\text{.} \end{equation*}

One thing we need to know is the dimension of \(W_n\text{.}\)

Project Activity 35.11.

We start with the initial case of \(W_1\text{.}\)

(a)

Show directly that the functions \(1\text{,}\) \(\cos(x)\text{,}\) and \(\sin(x)\) are orthogonal.

(b)

What is the dimension of \(W_1\text{?}\) Explain.

Now we need to see if what happened in Project Activity 35.11 happens in general. A few tables of integrals and some basic facts from trigonometry can help.

Project Activity 35.12.

A table of integrals shows the following for \(k \neq m\) (up to a constant):

\begin{align} \int \cos(mx)\cos(kx) \ dx \amp = \frac{1}{2} \left( \frac{\sin((k-m)x)}{k-m} + \frac{\sin((k+m)x)}{k+m} \right)\tag{35.4}\\ \int \sin(mx)\sin(kx) \ dx \amp = \frac{1}{2} \left( \frac{\sin((k-m)x)}{k-m} - \frac{\sin((k+m)x)}{k+m} \right)\tag{35.5}\\ \int \cos(mx)\sin(kx) \ dx \amp = \frac{1}{2} \left( \frac{\cos((m-k)x)}{m-k} - \frac{\sin((m+k)x)}{m+k} \right)\tag{35.6}\\ \int \cos(mx)\sin(mx) \ dx \amp = -\frac{1}{2m} \cos^2(mx)\tag{35.7} \end{align}
(a)

Use (35.4) to show that \(\cos(mx)\) and \(\cos(kx)\) are orthogonal in \(C[-\pi,\pi]\) if \(k \neq m\text{.}\)

(b)

Use (35.5) to show that \(\sin(mx)\) and \(\sin(kx)\) are orthogonal in \(C[-\pi,\pi]\) if \(k \neq m\text{.}\)

(c)

Use (35.6) to show that \(\cos(mx)\) and \(\sin(kx)\) are orthogonal in \(C[-\pi,\pi]\) if \(k \neq m\text{.}\)

(d)

Use (35.7) to show that \(\cos(mx)\) and \(\sin(mx)\) are orthogonal in \(C[-\pi,\pi]\text{.}\)

(e)

What is \(\dim(W_n)\text{?}\) Explain.

Once we have an orthogonal basis for \(W_n\text{,}\) we might want to create an orthonormal basis for \(W_n\text{.}\) Throughout the remainder of this project, unless otherwise specified, you should use a table of integrals or any appropriate technological tool to find integrals for any functions you need.

Project Activity 35.13.

Show that the set

\begin{equation*} \CB_n = \left\{\frac{1}{\sqrt{2}}, \cos(x), \cos(2x), \ldots, \cos(nx), \sin(x), \sin(2x), \ldots, \sin(nx)\right\} \end{equation*}

is an orthonormal basis for \(W_n\text{.}\) Use the fact that the norm of a vector \(\vv\) in an inner product space with inner product \(\langle \ , \ \rangle\) is defined to be \(\sqrt{\langle \vv, \vv \rangle}\text{.}\) (This is where the factor of \(\frac{1}{\pi}\) will be helpful.)

Now we need to recall how to find the best approximation to a vector by a vector in a subspace, and apply that idea to approximate an arbitrary function \(g\) with a trigonometric polynomial in \(W_n\text{.}\) Recall that the best approximation of a function \(g\) in \(C[-\pi,\pi]\) is the projection of \(g\) onto \(W_n\text{.}\) If we have an orthonormal basis \(\{h_0, h_1, h_2, \ldots, h_{2n}\}\) of \(W_n\text{,}\) then the projection of \(g\) onto \(W_n\) is

\begin{equation*} \proj_{W_n} g = \langle g,h_0 \rangle h_0 + \langle g,h_1 \rangle h_1 + \langle g,h_2 \rangle h_2 + \ldots + \langle g,h_{2n} \rangle h_{2n}\text{.} \end{equation*}

With this idea, we can find formulas for the coefficients when we project an arbitrary function onto \(W_n\text{.}\)

Project Activity 35.14.

If \(g\) is an arbitrary function in \(C[-\pi,\pi]\text{,}\) we will write the projection of \(g\) onto \(W_n\) as

\begin{align*} a_0\left(\frac{1}{\sqrt{2}}\right) + a_1 \cos(x) + b_1\sin(x) + a_2 \cos(2x) \amp + b_2 \sin(2x) + \cdots\\ \amp + a_n \cos(nx) + b_n \sin(nx)\text{.} \end{align*}

The \(a_i\) and \(b_j\) are the Fourier coefficients for \(f\text{.}\) The expression \(a_n\cos(nx)+b_n\sin(nx)\) is called the \(n\)th harmonic of \(g\text{.}\) The first harmonic is called the fundamental frequency. The human ear cannot hear tones whose frequencies exceed 20000 Hz, so we only hear finitely many harmonics (the projections onto \(W_n\) for some \(n\)).

(a)

Show that

\begin{equation} a_0 = \frac{1}{\sqrt{2}\pi}\int_{-\pi}^{\pi} g(x) \ dx\text{.}\tag{35.8} \end{equation}

Explain why \(\frac{a_0}{\sqrt{2}}\) gives the average value of \(g\) on \([-\pi,\pi]\text{.}\) You may want to go back and review average value from calculus. This is saying that the best constant approximation of \(g\) on \([-\pi,\pi]\) is its average value, which makes sense.

(b)

Show that for \(m \geq 1\text{,}\)

\begin{equation} a_m = \frac{1}{\pi}\int_{-\pi}^{\pi} g(x) \cos(mx) \ dx\text{.}\tag{35.9} \end{equation}
(c)

Show that for \(m \geq 1\text{,}\)

\begin{equation} b_m = \frac{1}{\pi}\int_{-\pi}^{\pi} g(x) \sin(mx) \ dx\text{.}\tag{35.10} \end{equation}

Let us return to the sawtooth function defined earlier and find its Fourier coefficients.

Project Activity 35.15.

Let \(f\) be defined by \(f(x) = x\) on \([-\pi,\pi]\) and repeated periodically afterwards with period \(2\pi\text{.}\) Let \(p_n\) be the projection of \(f\) onto \(W_n\text{.}\)

(a)

Evaluate the integrals to find the projection \(p_1\text{.}\)

(b)

Use appropriate technology to find the projections \(p_{10}\text{,}\) \(p_{20}\text{,}\) and \(p_{30}\) for the sawtooth function \(f\text{.}\) Draw pictures of these approximations against \(f\) and explain what you see.

(c)

Now we find formulas for all the Fourier coefficients. Use the fact that \(x \cos(mx)\) is an odd function to explain why \(a_m = 0\) for each \(m\text{.}\) Then show that \(b_m = (-1)^{m+1}\frac{2}{m}\) for each \(m\text{.}\)

(d)

Go back to the website falstad.com/fourier/ and replay the sawtooth tone. Explain what the white buttons represent.

Project Activity 35.16.

This activity is not connected to the idea of musical tones, so can be safely ignored if so desired. We conclude with a derivation of a very fascinating formula that you may have seen for \(\ds \sum_{n=1}^{\infty} \frac{1}{n^2}\text{.}\) To do so, we need to analyze the error in approximating a function \(g\) with a function in \(W_n\text{.}\)

Let \(p_n\) be the projection of \(g\) onto \(W_n\text{.}\) Notice that \(p_n\) is also in \(W_{n+1}\text{.}\) It is beyond the scope of this project, but in “nice” situations we have \(||g - p_n|| \to 0\) as \(n \to \infty\text{.}\) Now \(g - p_n\) is orthogonal to \(p_n\text{,}\) so the Pythagorean theorem shows that

\begin{equation*} ||g-p_n||^2 + ||p_n||^2 = ||g||^2\text{.} \end{equation*}

Since \(||g-p_n||^2 \to 0\) as \(n \to \infty\text{,}\) we can conclude that

\begin{equation} \lim_{n \to \infty} ||p_n||^2 = ||g||^2\text{.}\tag{35.11} \end{equation}

We use these ideas to derive a formula for \(\ds \sum_{n=1}^{\infty} \frac{1}{n^2}\text{.}\)

(a)

Use the fact that \(\CB_n\) is an orthonormal basis to show that

\begin{equation*} ||p_n||^2 = a_0^2 +a_1^2 + b_1^2 + \cdots + a_n^2 + b_n^2\text{.} \end{equation*}

Conclude that

\begin{equation} ||g||^2 = a_0^2 +a_1^2 + b_1^2 + \cdots + a_n^2 + b_n^2 + \cdots\text{.}\tag{35.12} \end{equation}
(b)

For the remainder of this activity, let \(f\) be the sawtooth function defined by \(f(x) = x\) on \([-\pi,\pi]\) and repeated periodically afterwards. We determined the Fourier coefficients \(a_i\) and \(b_j\) of this function in Project Activity 35.15.

(i)

Show that

\begin{equation*} a_0^2 +a_1^2 + b_1^2 + \cdots + a_n^2 + b_n^2 + \cdots = 4\sum_{n=1}^{\infty} \frac{1}{n^2}\text{.} \end{equation*}
(ii)

Calculate \(||f||^2\) using the inner product and compare to (35.12) to find a surprising formula for \(\sum_{n=1}^{\infty} \frac{1}{n^2}\text{.}\)

With suitable adjustments, we can work over any interval that is convenient, but for the sake of simplicity in this project, we will restrict ourselves to the interval \([-\pi, \pi]\text{.}\)