You are on page 1of 24

Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

MATH 4A - Linear Algebra with Applications


Lecture 24: Finishing up complex eigenvalues, starting on inner
products, length and distance

29 May 2019

Reading: §6.1-6.2
Recommended problems from §6.1: 1-19 odd, 20, 29
Announcement: please fill out online evaluations!
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Lecture plan

1 Finishing up with complex eigenvalues

2 Inner product, length, distance

3 Angles between vectors


Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Recall from last time: to fully exploit eigenvectors of


matrices over R, sometimes we have to look inside Cn

While we won’t have time to develop this story, I can ruin the
ending for you.

If A is an n × n matrix with entries in R that has a complex


eigenvalue λ, then it’s easy to show that the complex conjugate λ
is also an eigenvalue of A. While neither λ nor λ has an
eigenvector in Rn (although they do have eigenvectors in Cn ...), with some more
work, you can show there is always a 2-dimensional subspace H of
Rn upon which A affects some nontrivial rotation. In fact, the
converse is also true.

Morale of the story: anytime an n × n matrix A over R has a


complex eigenvalue λ, it is because there is some “rotational
component” of A on some 2-dimensional plane inside Rn .
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Example
Consider the linear transformation T of R3 that sends e1 to 2e2 ,
e2 to 2e3 , and e3 to 2e1 . The standard matrix of T is
 
0 0 2
A = 2 0 0 
0 2 0

and the characteristic polynomial of A is


 
−λ 0 2
det(A − λI ) = det  2 −λ 0 
0 2 −λ
= −λ(λ2 − 2 · 0) + 2(2 · 2 + 0 · λ)
= −λ3 + 8 = −(λ − 2)(λ + 2λ + 4)
√ √
= −(λ − 2)(λ − −3 + 1)(λ + −3 − 1)
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

You should visualize T as simultaneously rotating R3 around the


line x = y = z while also stretching everything by a factor of 2.
With this intuition, we can guess that

w 1 = e1 + e2 + e3

is an eigenvector with eigenvalue 2. Indeed:

Aw1 = Ae1 +Ae2 +Ae3 = 2e2 +2e3 +2e1 = 2(e1 +e2 +e3 ) = 2w1 .

Because the other two eigenvalues of A are both complex, we


shouldn’t look for any more eigenvectors in R3 . But we should
look for a 2-dimensional subspace that is preserved by T .
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Finding the plane of rotation


We can use our geometric intuition to guess that any vector in the
plane x + y + z = 0 maps back into this plane. Indeed, we can
easily show the subspace x + y + z = 0 is spanned by
   
1 0
w2 = −1
  and w3 =  1 ,
0 −1
and we can compute
    
0 0 2 1 0
T (w2 ) = Aw2 = 2
 0 0 −1 =
  2  = 2w3
0 2 0 0 −2
    
0 0 2 0 −2
T (w3 ) = Aw3 = 2 0 0  1  =  0  = −2w2 − 2w3
0 2 0 −1 2
See board for picture.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Another cool example

cos π4 0 sin − π4
 

A= 0 2 0 
sin π4 0 cos π4
Note that
cos − π4 sin π4
 
0
A−1 = 0 1
2 0 
sin − π4 0 cos − π4
and
cos kπ sin − kπ
 
4 0 4
Ak =  0 2k 0 
sin kπ
4 0 cos kπ
4
for any integer k
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Motivation
In this class so far, we haven’t used any geometry. We’ve discussed
linear algebraic things like planes and lines and hyperplanes, but we
haven’t discussed more geometric things like distance or length or
angles.

Having a notion of distance between two vectors turns out to be


one of the most useful ideas when applying linear algebra to the
real world. If we can make sense of what it means for two vectors
to be “close” to one another, then we can discuss “approximate
solutions” to linear systems.

In many science applications, the coefficients and constants of a


linear system are only approximations to some “actual” quantity,
so one is forced to understand approximate solutions. Better yet,
in business, often all one needs is an approximate solution, and
algorithms for finding approximate solutions are often much faster.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Inner product (aka dot product)

While “distance” and “length” are hopefully familiar to you (at


least informally), there is a more fundamental mathematical
operation called “inner product.”

Let u and v be two vectors in Rn . The inner product (or dot


product) of u and v is the real number uT v. We often write it u · v.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

More explicitly

Suppose    
u1 v1
u2  v2 
u=. and v =  .  .
   
 ..   .. 
un vn
Then
 
v1
 v2 

u · v = uT v = u1 u2 · · · un  .  = u1 v1 + u2 v2 + · · · + un vn .

 .. 
vn
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

iClicker 1

Let   
3 8
u = −1 v = −2 .
2 −1
What is u · v? How is it related to v · u?
(a) 24, v · u = −u · v
(b) 28, v · u = u · v
(c) −24, v · u = −u · v
(d) 24, v · u = u · v
(e) 20, v · u = u · v
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Properties of inner product

Theorem
Let u, v and w be vectors in Rn , and let c be a scalar. Then
a. u · v = v · u
b. (u + v) · w = u · w + v · w
c. (cu) · v = c(u · v) = u · (cv)
d. u · u ≥ 0, and u · u = 0 if and only if u = 0.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Length of a vector

Because v · v ≥ 0, it makes sense to take the square root of v · v.


(Note: we will always take the positive square root.)

The length (or norm) of u is the nonnegative scalar kvk defined by


√ q
kvk = v · v = v12 + v22 + · · · + vn2
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

We basically define “length” of a vector so the


Pythagorean theorem is true

See board.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Example

The length of  
3
v = 4
5
is p √ √
kvk = 32 + 42 + 52 = 50 = 5 2.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

How do lengths behave under scalar multiples?

Let v be a vector and c a scalar. Then


p q √  √ 
kcvk = (cv) · (cv) = c 2 (v · v) = c2 v · v = |c|kvk.

In words: scalar multiplying by c scales the length by |c|. Of


course, this is exactly how we expect length to work.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Unit vectors and normalizing

Any vector in Rn with length 1 is called a unit vector.

Given any nonzero vector v, we can always find another vector that
points in the same direction as v but is a unit vector, namely:
1
v.
kvk

The process of getting (1/kvk)v from v is called normalizing v.


Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Example

The normalization of  
3
v = 4
5
is  
3
1 1  
v= √ 4 .
kvk 5 2 5
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Distance in Rn

For u and v in Rn , the distance between u and v, written d(u, v)


or dist(u, v), is the length of the vector u − v. That is,
q
d(u, v) = ku − vk = (u1 − v1 )2 + (u2 − v2 )2 + · · · + (un − vn )2 .

Two remarks:
1 this generalizes the usual notion of distance in R, R2 , and R3 .
2 the distance between v and 0 is simply the length of v.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Example

See board.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Recall: law of cosines

Consider a triangle, with side lengths a, b and c, such that c is


opposite an angle θ. The law of cosines says

c 2 = a2 + b 2 − 2ab cos θ.

(You don’t need to remember this.)


Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Applying the law of cosines to vectors

Let u and v be two nonzero vectors in Rn . Consider the triangle


with vertices determined by u, v and 0. The lengths of the sides of
this triangle are kuk, kvk and ku − vk, and, by the law of cosines,
the angle θ between u and v satisfies

ku − vk2 = kuk2 + kvk2 − 2kukkvk cos θ.


Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

Rearranging and simplifying

We can rearrange

ku − vk2 = kuk2 + kvk2 − 2kukkvk cos θ

and then simplify:


1
kuk2 + kvk2 − ku − vk2

kukkvk cos θ =
2
1 2
u1 + · · · + un2 + v12 + · · · + vn2 − (u1 − v1 )2 − · · · − (un − vn )2

=
2
= u1 v1 + · · · + un vn = u · v.
Finishing up with complex eigenvalues Inner product, length, distance Angles between vectors

The angle between two nonzero vectors vectors

We conclude that the angle θ between two vectors u and v in Rn


satisfies
kukkvk cos θ = u · v.
Since kuk =
6 0 6= kvk,
 
−1 u·v
θ = cos .
kukkvk

Note: there’s still some ambiguity because cos θ is not a one-to-one


function. We usually resolve this by requiring 0 ≤ θ ≤ π.

You might also like