← Back to Math 010

6.1 Inner Products: Class Notes

Definition

An inner product on a real vector space V is a function that associates a real number ⟨𝐮,𝐯⟩ with each pair of vectors in V in such a way that the following axioms are satisfied for all vectors 𝐮, 𝐯, and 𝐰 in V and all scalars k.

  1. ⟨𝐮,𝐯⟩=⟨𝐯,𝐮⟩ (symmetry axiom)
  2. ⟨𝐮+𝐯,𝐰⟩=⟨𝐮,𝐰⟩+⟨𝐯,𝐰⟩ (additivity axiom)
  3. ⟨k𝐮,𝐯⟩=k⟨𝐮,𝐯⟩ (homogeneity axiom)
  4. ⟨𝐯,𝐯⟩≥0 and ⟨𝐯,𝐯⟩=0 if and only if 𝐯=𝟎 (positivity axiom)

Definition

A real vector space with an inner product is called a real inner product space.

Note that an inner product is a category of operation that is performed on vectors in a vector space. As long as an operation satisfies these four axioms, it is an inner product.

Building up the structures:

Examples of Inner Products

Tip: For the evaluation inner product, it helps to make a table with columns for x, p(x), and q(x) (one row for each point x0,x1,…,xn), then multiply across each row and add the products (see #16).

#10

Compute the standard inner product on M22 of the given matrices.

U=[12−35],V=[4608]

Solution

The standard inner product on M22 is ⟨𝐮,𝐯⟩=tr⁡(UTV).

UTV=[1−325][4608]=[4−18852]⟨𝐮,𝐯⟩=tr⁡(UTV)=4+52=56

Answer: ⟨𝐮,𝐯⟩=56

Note that the order doesn’t matter (symmetry axiom):

⟨𝐯,𝐮⟩=tr⁡(VTU)=tr⁡([4068][12−35])=tr⁡[48−1852]=56

Why the trace works like a dot product. Let

A=[a1a2a3a4],B=[b1b2b3b4]

ATB=[a1a3a2a4][b1b2b3b4]=[a1b1+a3b3a1b2+a3b4a2b1+a4b3a2b2+a4b4]

The trace adds only the diagonal entries:

tr⁡(ATB)=a1b1+a2b2+a3b3+a4b4

So tr⁡(ATB) multiplies matching entries of A and B and adds the products: it is basically a dot product of the entries. For #10, pair each entry of U with the entry in the same position of V:

⟨𝐮,𝐯⟩=1(4)+2(6)+(−3)(0)+5(8)=4+12+0+40=56

#11

Find the standard inner product on P2 of the given polynomials.

𝐩=−2+x+3x2, 𝐪=4−7x2

Solution

For 𝐩=a0+a1x+a2x2 and 𝐪=b0+b1x+b2x2, ⟨𝐩,𝐪⟩=a0b0+a1b1+a2b2. The polynomial 𝐪 has no x term, so b1=0.

⟨𝐩,𝐪⟩=−2(4)+1(0)+3(−7)=−8+0−21=−29

Answer: ⟨𝐩,𝐪⟩=−29

#16

A sequence of sample points is given. Use the evaluation inner product on P3 at those sample points to find ⟨𝐩,𝐪⟩ for the polynomials 𝐩=x+x3 and 𝐪=1+x2.

x0=−1, x1=0, x2=1, x3=2

Solution

⟨𝐩,𝐪⟩=p(x0)q(x0)+p(x1)q(x1)+p(x2)q(x2)+p(x3)q(x3)

Evaluate both polynomials at each sample point, then multiply the two values at each point:

Values of p and q at the sample points
xp(x)q(x)p(x)q(x)
−1−22−4
0010
1224
210550

Add the products:

⟨𝐩,𝐪⟩=−2(2)+0(1)+2(2)+10(5)=−4+0+4+50=50

Answer: ⟨𝐩,𝐪⟩=50

#8

Use the inner product on R2 generated by the matrix A to find ⟨𝐮,𝐯⟩ for the vectors 𝐮=(0,−3) and 𝐯=(6,2).

A=[21−13]

Solution

The inner product generated by A is ⟨𝐮,𝐯⟩=A𝐮·A𝐯. Write the vectors as columns and multiply:

A𝐮=[21−13][0−3]=[−3−9],A𝐯=[21−13][62]=[140]

⟨𝐮,𝐯⟩=(−3,−9)·(14,0)=−3(14)+(−9)(0)=−42

Answer: ⟨𝐮,𝐯⟩=−42

In general, since 𝐮·𝐯=𝐯T𝐮 (see Table 1 in Section 3.2), we have

⟨𝐮,𝐯⟩=A𝐮·A𝐯=(A𝐯)TA𝐮=𝐯TATA𝐮

Example: A weighted Euclidean inner product

For this class, homework is worth 10%, exams 60%, and the final 30% of the grade. Suppose we have 4 exams, each with 100 points possible. The final has 100 points possible, and the total possible homework points is 320.

Scores for Student A
CategoryStudent ATotal possible
HW265320
Exams350400
Final85100

𝐮=(265,350,85) is the points earned, and 𝐯=(1320,1400,1100) is the base for each category.

The Euclidean inner product ⟨𝐮,𝐯⟩=𝐮·𝐯 does not factor in the category weights. Instead, define

⟨𝐮,𝐯⟩=10u1v1+60u2v2+30u3v3

Then

⟨𝐮,𝐯⟩=10(265320)+60(350400)+30(85100)≈86

so Student A has about 86% in the class. This is a weighted Euclidean inner product with weights w1=10, w2=60, and w3=30.

Considering a matrix inner product, a weighted Euclidean inner product is generated by

A=[w10⋯00w2⋯0⋮⋮⋱⋮00⋯wn]so thatATA=[w10⋯00w2⋯0⋮⋮⋱⋮00⋯wn]

Then 𝐯TATA𝐮=w1u1v1+w2u2v2+…+wnunvn.

Definition

If V is a real inner product space, then the norm or length of a vector 𝐯 in V is denoted by ‖𝐯‖ and is defined by ‖𝐯‖=⟨𝐯,𝐯⟩ and the distance between two vectors is denoted by d(𝐮,𝐯) and is defined by d(𝐮,𝐯)=‖𝐮−𝐯‖=⟨𝐮−𝐯,𝐮−𝐯⟩. A vector of norm 1 is called a unit vector.

#1

Let R2 have the weighted Euclidean inner product ⟨𝐮,𝐯⟩=2u1v1+3u2v2 and let 𝐮=(1,1), 𝐯=(3,2), 𝐰=(0,−1), and k=3. Compute the stated quantities.

a. ⟨𝐮,𝐯⟩  b. ⟨k𝐮,𝐯⟩  c. ⟨𝐮+𝐯,𝐰⟩  d. ‖𝐯‖  e. d(𝐮,𝐯)  f. ‖𝐮−k𝐯‖

Solution

a. ⟨𝐮,𝐯⟩=2(1)(3)+3(1)(2)=6+6=12

Answer: ⟨𝐮,𝐯⟩=12

b. Here k𝐮=3(1,1)=(3,3), so

⟨k𝐮,𝐯⟩=2(3)(3)+3(3)(2)=18+18=36

Answer: ⟨k𝐮,𝐯⟩=36

Note: ⟨3𝐮,𝐯⟩=3⟨𝐮,𝐯⟩=3(12)=36, as the homogeneity axiom says.

c. Here 𝐮+𝐯=(1+3,1+2)=(4,3), so

⟨𝐮+𝐯,𝐰⟩=2(4)(0)+3(3)(−1)=0−9=−9

Answer: ⟨𝐮+𝐯,𝐰⟩=−9

Note: ⟨𝐮,𝐰⟩=2(1)(0)+3(1)(−1)=−3 and ⟨𝐯,𝐰⟩=2(3)(0)+3(2)(−1)=−6, and −3+(−6)=−9, as the additivity axiom says.

d.

‖𝐯‖=⟨𝐯,𝐯⟩=2(3)(3)+3(2)(2)=18+12=30

Answer: ‖𝐯‖=30

e. d(𝐮,𝐯)=⟨𝐮−𝐯,𝐮−𝐯⟩, where 𝐮−𝐯=(1,1)−(3,2)=(−2,−1).

d(𝐮,𝐯)=2(−2)2+3(−1)2=8+3=11

Answer: d(𝐮,𝐯)=11

f. Here 𝐮−k𝐯=(1,1)−3(3,2) =(1,1)−(9,6)=(−8,−5), so

‖𝐮−k𝐯‖=⟨𝐮−k𝐯,𝐮−k𝐯⟩=2(−8)2+3(−5)2=128+75=203

Answer: ‖𝐮−k𝐯‖=203

Theorem 6.1.1 Norms and Distances in Inner Product Spaces

If 𝐮 and 𝐯 are vectors in a real inner product space V, and if k is a scalar, then:

a) ‖𝐯‖≥0 with equality if and only if 𝐯=𝟎 (analogous to Theorem 3.2.1 (a) and (b)).

b) ‖k𝐯‖=|k|‖𝐯‖ (analogous to Theorem 3.2.1 (c)).

c) d(𝐮,𝐯)=d(𝐯,𝐮) (analogous to Theorem 3.2.2 (d)).

d) d(𝐮,𝐯)≥0 with equality if and only if 𝐮=𝐯 (ibid).

#37

Let the vector space P2 have the inner product ⟨𝐩,𝐪⟩=∫−11p(x)q(x)dx. Find the following for 𝐩=1 and 𝐪=x2.

a. ⟨𝐩,𝐪⟩  b. d(𝐩,𝐪)  c. ‖𝐩‖  d. ‖𝐪‖

Solution

a.

⟨𝐩,𝐪⟩=∫−111·x2dx=13x3|−11=13−(−13)=23

Answer: ⟨𝐩,𝐪⟩=23

b.

d(𝐩,𝐪)=⟨𝐩−𝐪,𝐩−𝐪⟩=(∫−11(1−x2)2dx)1/2=(∫−11(1−2x2+x4)dx)1/2

The integrand is even, so the integral from −1 to 1 is twice the integral from 0 to 1:

d(𝐩,𝐪)=(2∫01(1−2x2+x4)dx)1/2=(2(x−23x3+15x5)|01)1/2=(2(1−23+15))1/2=1615=415

Answer: d(𝐩,𝐪)=415

c.

‖𝐩‖=⟨𝐩,𝐩⟩=(∫−111dx)1/2=2

Answer: ‖𝐩‖=2

d. Here 𝐪=x2, so q(x)q(x)=x4.

‖𝐪‖=(∫−11x4dx)1/2=(15x5|−11)1/2=25

Answer: ‖𝐪‖=25

Definition

If V is an inner product space, then the set of points in V that satisfy ‖𝐮‖=1 is called the unit sphere in V (or the unit circle in the case where V=R2).

The Euclidean inner product in R2 gives us the unit circle. A weighted Euclidean inner product in R2 gives us a distorted circle, also known as an ellipse.

In the case of the integral inner product, like in #37, the unit sphere consists of all functions f∈C[a,b] such that

∫ab[f(x)]2dx=1

Examples:

∫−1112dx=1⇒f(x)=12 is on the unit sphere in C[−1,1]

∫0π/2sin⁡xdx=1⇒f(x)=sin⁡x is on the unit sphere in C[0,π/2]

Theorem 6.1.2 Algebraic Properties of Inner Products (generalization of Theorem 3.2.3)

If 𝐮, 𝐯 and 𝐰 are vectors in a real inner product space V, and if k is a scalar, then:

a) ⟨𝟎,𝐯⟩=⟨𝐯,𝟎⟩=0

b) ⟨𝐮,𝐯+𝐰⟩=⟨𝐮,𝐯⟩+⟨𝐮,𝐰⟩

c) ⟨𝐮,𝐯−𝐰⟩=⟨𝐮,𝐯⟩−⟨𝐮,𝐰⟩

d) ⟨𝐮−𝐯,𝐰⟩=⟨𝐮,𝐰⟩−⟨𝐯,𝐰⟩

e) k⟨𝐮,𝐯⟩=⟨𝐮,k𝐯⟩

Proving these is a good practice exercise.