This module is part of the collection, A First Course in Electrical and Computer Engineering. The LaTeX source files for this collection were created using an optical character recognition technology, and because of this process there may be more errors than usual. Please contact us if you discover any errors.
The inner product (x,y)(x,y) between vectors
x
x and
y
y is a scalar consisting
of the following sum of products:
(x,y)=x1y1+x2y2+x3y3+⋯+xnyn.(x,y)=x1y1+x2y2+x3y3+⋯+xnyn.
(1)This definition seems so arbitrary that we wonder what uses it could possibly have. We will show that the inner product has three main uses:
- computing length or “norm”,
- finding angles between vectors and checking for “orthogonality”, and
- computing the “component of one vector along another” (projection).
Since the inner product is so useful, we need to know what algebraic operations are permitted when we are working with inner products. The following are some properties of the inner product. Given x,y,z∈Rnx,y,z∈Rn and a∈Ra∈R,
- (x,y)=(y,x)(x,y)=(y,x);
- (ax,y)=a(x,y)=(x,ay)(ax,y)=a(x,y)=(x,ay); and
- (x,y+z)=(x,y)+(x,z)(x,y+z)=(x,y)+(x,z).
Prove the three preceding properties by using the definition of
inner product. Is the equation x(y,z)=(x,y)zx(y,z)=(x,y)z also a true property? Prove
or give a counterexample.
Euclidean Norm. Sometimes we want to measure the length of a
vector, namely, the distance from the origin to the point specified by the
vector's coordinates. A vector's length is called the norm of the vector. Recall
from Euclidean geometry that the distance between two points is the square
root of the sum of the squares of the distances in each dimension. Since we
are measuring from the origin, this implies that the norm of the vector x is
∥
x
∥
=
x
1
2
+
x
2
2
+
+
x
n
2
.
∥
x
∥
=
x
1
2
+
x
2
2
+
+
x
n
2
.
(2)
Notice the use of the double vertical bars to indicate the norm. An
equivalent definition of the norm, and of the norm squared, can be given in
terms of the inner product:
∥
x
∥
=
(
x
,
x
)
∥
x
∥
=
(
x
,
x
)
(3)or
∥
x
∥
2
=
(
x
,
x
)
.
∥
x
∥
2
=
(
x
,
x
)
.
(4)
The Euclidean norm of the vector
x
=
1
3
5
-
2
,
x
=
1
3
5
-
2
,
(5)is ∥x∥=12+32+52+(-2)2=39.∥x∥=12+32+52+(-2)2=39.
An important property of the norm and scalar product is that, for any
x∈Rnx∈Rn and a∈Ra∈R,
||ax||=|a|||x||.||ax||=|a|||x||.
(6)So we can take a scalar multiplier outside of the norm if we take its absolute
value.
Cauchy-Schwarz Inequality. Inequalities can be useful engineering
tools. They can often be used to find the best possible performance of a
system, thereby telling you when to quit trying to make improvements (or
proving to your boss that it can't be done any better). The most fundamental
inequality in linear algebra is the Cauchy-Schwarz inequality. This inequality
says that the inner product between two vectors
x
x and
y
y is less than or equal
(in absolute value) to the norm of
x
x times the norm of
y
y, with equality if and
only if y=αxy=αx:
|(x,y)|≤||x||||y||.|(x,y)|≤||x||||y||.
(7)To prove this theorem, we construct a third vector z=λx-yz=λx-y and measure
its norm squared:
|
|
λ
x
-
y
|
|
2
=
(
λ
x
-
y
,
λ
x
-
y
)
=
λ
2
|
|
x
|
|
2
-
2
λ
(
x
,
y
)
+
|
|
y
|
|
2
≥
0
.
|
|
λ
x
-
y
|
|
2
=
(
λ
x
-
y
,
λ
x
-
y
)
=
λ
2
|
|
x
|
|
2
-
2
λ
(
x
,
y
)
+
|
|
y
|
|
2
≥
0
.
(8)
So we have a polynomial in
λ
λ that is always greater than or equal to 0 (because
every norm squared is greater than or equal to 0). Let's assume that
x
x and
y
y
are given and minimize this norm squared with respect to
λ
λ. To do this, we
take the derivative with respect to
λ
λ and equate it to 0:
2λ||x||2-2(x,y)=0⇒λ=(x,y)||x||22λ||x||2-2(x,y)=0⇒λ=(x,y)||x||2
(9)When this solution is substituted into the formula for the norm squared in Equation 8, we obtain
[
(
x
,
y
)
|
|
x
|
|
2
]
2
|
|
x
|
|
2
-
2
(
x
,
y
)
|
|
x
|
|
2
(
x
,
y
)
+
|
|
y
|
|
2
≥
0
,
[
(
x
,
y
)
|
|
x
|
|
2
]
2
|
|
x
|
|
2
-
2
(
x
,
y
)
|
|
x
|
|
2
(
x
,
y
)
+
|
|
y
|
|
2
≥
0
,
(10)
which simplifies to
-(x,y)2||x||2+||y||2≥0⇒(x,y)2≤||x||2||y||2.-(x,y)2||x||2+||y||2≥0⇒(x,y)2≤||x||2||y||2.
(11)The proof of the Cauchy-Schwarz inequality is completed by taking the positive square root on both sides of Equation 11. When y=αxy=αx, then
(
x
,
y
)
2
=
(
x
,
α
x
)
2
=
[
|
α
|
(
x
,
x
)
]
2
=
(
|
α
|
|
|
x
|
|
2
)
2
=
(
|
α
|
2
|
|
x
|
|
2
)
|
|
x
|
|
2
=
(
α
x
,
α
x
)
|
|
x
|
|
2
=
(
y
,
y
)
|
|
x
|
|
2
=
|
|
y
|
|
2
|
|
x
|
|
2
,
(
x
,
y
)
2
=
(
x
,
α
x
)
2
=
[
|
α
|
(
x
,
x
)
]
2
=
(
|
α
|
|
|
x
|
|
2
)
2
=
(
|
α
|
2
|
|
x
|
|
2
)
|
|
x
|
|
2
=
(
α
x
,
α
x
)
|
|
x
|
|
2
=
(
y
,
y
)
|
|
x
|
|
2
=
|
|
y
|
|
2
|
|
x
|
|
2
,
(12)
which shows that equality holds in Equation 7 when
y
y is a scalar multiple of
x
x.
Use the Cauchy-Schwarz inequality to prove the triangle inequality, which states
|
|
x
+
y
|
|
≤
|
|
x
|
|
+
|
|
y
|
|
.
|
|
x
+
y
|
|
≤
|
|
x
|
|
+
|
|
y
|
|
.
(13)
Explain why this is called the triangle inequality.
"Reviewer's Comments: 'I recommend this book as a "required primary textbook." This text attempts to lower the barriers for students that take courses such as Principles of Electrical Engineering, […]"