0% found this document useful (0 votes)
91 views62 pages

3.2 Norm, Dot Product, Distance

This document discusses the dot product and properties of vectors in linear algebra. It defines the dot product of two vectors and provides examples of computing dot products. It also outlines properties of the dot product, including commutativity, distributivity, and how scalars affect the dot product.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views62 pages

3.2 Norm, Dot Product, Distance

This document discusses the dot product and properties of vectors in linear algebra. It defines the dot product of two vectors and provides examples of computing dot products. It also outlines properties of the dot product, including commutativity, distributivity, and how scalars affect the dot product.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Section 3.

2: Norm; Dot Product; Distance in Rn


Department of Mathematics and Applied Mathematics
University of Johannesburg

MATEAA2 : ENGINEERING LINEAR ALGEBRA

Norm; Dot Product; Distance in Rn


Contents

The Dot Product


Length (or norm)
Unit vectors
Normalizing a vector
Standard unit vectors
Cauchy-Swartz Inequality and Triangle Inequality
Distance between vectors
Angles between vectors

Norm; Dot Product; Distance in Rn


The Dot Product

Definition
If u = (u1 , u2 , . . . , un ) and v = (v1 , v2 , . . . , vn ) then the dot
product u • v of u and v is defined by

u • v = u1 v1 + u2 v2 + . . . + un vn

Take note:
To be able to take the dot product of two vectors u and v ,
the vectors u and v must have the same number of
components.
The dot product u • v is a number, not a vector.
The dot product of vectors u and v can be viewed as
matrix multiplication: u • v = u T v = v T u.

Norm; Dot Product; Distance in Rn


The Dot Product

Definition
If u = (u1 , u2 , . . . , un ) and v = (v1 , v2 , . . . , vn ) then the dot
product u • v of u and v is defined by

u • v = u1 v1 + u2 v2 + . . . + un vn

Take note:
To be able to take the dot product of two vectors u and v ,
the vectors u and v must have the same number of
components.
The dot product u • v is a number, not a vector.
The dot product of vectors u and v can be viewed as
matrix multiplication: u • v = u T v = v T u.

Norm; Dot Product; Distance in Rn


The Dot Product

Definition
If u = (u1 , u2 , . . . , un ) and v = (v1 , v2 , . . . , vn ) then the dot
product u • v of u and v is defined by

u • v = u1 v1 + u2 v2 + . . . + un vn

Take note:
To be able to take the dot product of two vectors u and v ,
the vectors u and v must have the same number of
components.
The dot product u • v is a number, not a vector.
The dot product of vectors u and v can be viewed as
matrix multiplication: u • v = u T v = v T u.

Norm; Dot Product; Distance in Rn


The Dot Product

Definition
If u = (u1 , u2 , . . . , un ) and v = (v1 , v2 , . . . , vn ) then the dot
product u • v of u and v is defined by

u • v = u1 v1 + u2 v2 + . . . + un vn

Take note:
To be able to take the dot product of two vectors u and v ,
the vectors u and v must have the same number of
components.
The dot product u • v is a number, not a vector.
The dot product of vectors u and v can be viewed as
matrix multiplication: u • v = u T v = v T u.

Norm; Dot Product; Distance in Rn


Examples
Example
1 Compute (3, −2) • (2, 1). 4
2 Compute (1, 2, 0) • (1, −3, −1). −5
√ √ √
3 Compute (1, 2, 3, 0) • (4, − 2, 0, −5). 2
4 Compute (1, −2, 3) • (1, −2, 3). 14
5 Compute (1, 2, 0) • (1, 3, −1).

Note that if u = (u1 , u2 , . . . , un ) then


u • u = u12 + u22 + . . . + un2 .

Solution for Example 3


√ √ √
(1, 2, 3,√0) • (4,√
− 2, 0,√−5) =
(1 × 4) + ( 2 × − 2) + ( 3 × 0) + (0 × −5)
= 4 − 2 = 2.
Norm; Dot Product; Distance in Rn
Examples
Example
1 Compute (3, −2) • (2, 1). 4
2 Compute (1, 2, 0) • (1, −3, −1). −5
√ √ √
3 Compute (1, 2, 3, 0) • (4, − 2, 0, −5). 2
4 Compute (1, −2, 3) • (1, −2, 3). 14
5 Compute (1, 2, 0) • (1, 3, −1).

Note that if u = (u1 , u2 , . . . , un ) then


u • u = u12 + u22 + . . . + un2 .

Solution for Example 3


√ √ √
(1, 2, 3,√0) • (4,√
− 2, 0,√−5) =
(1 × 4) + ( 2 × − 2) + ( 3 × 0) + (0 × −5)
= 4 − 2 = 2.
Norm; Dot Product; Distance in Rn
Examples
Example
1 Compute (3, −2) • (2, 1). 4
2 Compute (1, 2, 0) • (1, −3, −1). −5
√ √ √
3 Compute (1, 2, 3, 0) • (4, − 2, 0, −5). 2
4 Compute (1, −2, 3) • (1, −2, 3). 14
5 Compute (1, 2, 0) • (1, 3, −1).

Note that if u = (u1 , u2 , . . . , un ) then


u • u = u12 + u22 + . . . + un2 .

Solution for Example 3


√ √ √
(1, 2, 3,√0) • (4,√
− 2, 0,√−5) =
(1 × 4) + ( 2 × − 2) + ( 3 × 0) + (0 × −5)
= 4 − 2 = 2.
Norm; Dot Product; Distance in Rn
Examples
Example
1 Compute (3, −2) • (2, 1). 4
2 Compute (1, 2, 0) • (1, −3, −1). −5
√ √ √
3 Compute (1, 2, 3, 0) • (4, − 2, 0, −5). 2
4 Compute (1, −2, 3) • (1, −2, 3). 14
5 Compute (1, 2, 0) • (1, 3, −1).

Note that if u = (u1 , u2 , . . . , un ) then


u • u = u12 + u22 + . . . + un2 .

Solution for Example 3


√ √ √
(1, 2, 3,√0) • (4,√
− 2, 0,√−5) =
(1 × 4) + ( 2 × − 2) + ( 3 × 0) + (0 × −5)
= 4 − 2 = 2.
Norm; Dot Product; Distance in Rn
Examples
Example
1 Compute (3, −2) • (2, 1). 4
2 Compute (1, 2, 0) • (1, −3, −1). −5
√ √ √
3 Compute (1, 2, 3, 0) • (4, − 2, 0, −5). 2
4 Compute (1, −2, 3) • (1, −2, 3). 14
5 Compute (1, 2, 0) • (1, 3, −1).

Note that if u = (u1 , u2 , . . . , un ) then


u • u = u12 + u22 + . . . + un2 .

Solution for Example 3


√ √ √
(1, 2, 3,√0) • (4,√
− 2, 0,√−5) =
(1 × 4) + ( 2 × − 2) + ( 3 × 0) + (0 × −5)
= 4 − 2 = 2.
Norm; Dot Product; Distance in Rn
Examples
Example
1 Compute (3, −2) • (2, 1). 4
2 Compute (1, 2, 0) • (1, −3, −1). −5
√ √ √
3 Compute (1, 2, 3, 0) • (4, − 2, 0, −5). 2
4 Compute (1, −2, 3) • (1, −2, 3). 14
5 Compute (1, 2, 0) • (1, 3, −1).

Note that if u = (u1 , u2 , . . . , un ) then


u • u = u12 + u22 + . . . + un2 .

Solution for Example 3


√ √ √
(1, 2, 3,√0) • (4,√
− 2, 0,√−5) =
(1 × 4) + ( 2 × − 2) + ( 3 × 0) + (0 × −5)
= 4 − 2 = 2.
Norm; Dot Product; Distance in Rn
Examples
Example
1 Compute (3, −2) • (2, 1). 4
2 Compute (1, 2, 0) • (1, −3, −1). −5
√ √ √
3 Compute (1, 2, 3, 0) • (4, − 2, 0, −5). 2
4 Compute (1, −2, 3) • (1, −2, 3). 14
5 Compute (1, 2, 0) • (1, 3, −1).

Note that if u = (u1 , u2 , . . . , un ) then


u • u = u12 + u22 + . . . + un2 .

Solution for Example 3


√ √ √
(1, 2, 3,√0) • (4,√
− 2, 0,√−5) =
(1 × 4) + ( 2 × − 2) + ( 3 × 0) + (0 × −5)
= 4 − 2 = 2.
Norm; Dot Product; Distance in Rn
Properties of the dot product
Theorem (Theorem 3.2.2)
Let u, v and w be vectors in Rn and let c be a scalar. Then
1 u•v =v •u Commutativity
2 u • (v + w) = u • v + u • w Distributivity
3 (cu) • v = c(u • v )
4 u • u ≥ 0 and u • u = 0 if and only if u = 0.

Theorem (Theorem 3.2.3)


If u, v and w are vectors in Rn , and if k is a scalar, then:
1 0•v =v •0=0
2 (u + v ) • w = u • w + v • w
3 u • (v − w) = u • v − u • w
4 (u − v ) • w = u • w − v • w
5 k (u • v ) = u • (k v )
Norm; Dot Product; Distance in Rn
Properties of the dot product
Theorem (Theorem 3.2.2)
Let u, v and w be vectors in Rn and let c be a scalar. Then
1 u•v =v •u Commutativity
2 u • (v + w) = u • v + u • w Distributivity
3 (cu) • v = c(u • v )
4 u • u ≥ 0 and u • u = 0 if and only if u = 0.

Theorem (Theorem 3.2.3)


If u, v and w are vectors in Rn , and if k is a scalar, then:
1 0•v =v •0=0
2 (u + v ) • w = u • w + v • w
3 u • (v − w) = u • v − u • w
4 (u − v ) • w = u • w − v • w
5 k (u • v ) = u • (k v )
Norm; Dot Product; Distance in Rn
Properties of the dot product
Theorem (Theorem 3.2.2)
Let u, v and w be vectors in Rn and let c be a scalar. Then
1 u•v =v •u Commutativity
2 u • (v + w) = u • v + u • w Distributivity
3 (cu) • v = c(u • v )
4 u • u ≥ 0 and u • u = 0 if and only if u = 0.

Theorem (Theorem 3.2.3)


If u, v and w are vectors in Rn , and if k is a scalar, then:
1 0•v =v •0=0
2 (u + v ) • w = u • w + v • w
3 u • (v − w) = u • v − u • w
4 (u − v ) • w = u • w − v • w
5 k (u • v ) = u • (k v )
Norm; Dot Product; Distance in Rn
Properties of the dot product
Theorem (Theorem 3.2.2)
Let u, v and w be vectors in Rn and let c be a scalar. Then
1 u•v =v •u Commutativity
2 u • (v + w) = u • v + u • w Distributivity
3 (cu) • v = c(u • v )
4 u • u ≥ 0 and u • u = 0 if and only if u = 0.

Theorem (Theorem 3.2.3)


If u, v and w are vectors in Rn , and if k is a scalar, then:
1 0•v =v •0=0
2 (u + v ) • w = u • w + v • w
3 u • (v − w) = u • v − u • w
4 (u − v ) • w = u • w − v • w
5 k (u • v ) = u • (k v )
Norm; Dot Product; Distance in Rn
Properties of the dot product
Theorem (Theorem 3.2.2)
Let u, v and w be vectors in Rn and let c be a scalar. Then
1 u•v =v •u Commutativity
2 u • (v + w) = u • v + u • w Distributivity
3 (cu) • v = c(u • v )
4 u • u ≥ 0 and u • u = 0 if and only if u = 0.

Theorem (Theorem 3.2.3)


If u, v and w are vectors in Rn , and if k is a scalar, then:
1 0•v =v •0=0
2 (u + v ) • w = u • w + v • w
3 u • (v − w) = u • v − u • w
4 (u − v ) • w = u • w − v • w
5 k (u • v ) = u • (k v )
Norm; Dot Product; Distance in Rn
Length

Definition
The length (or norm) of a vector

v = (v1 , v2 , . . . , vn )

in Rn is the nonnegative scalar ||v || defined by


√ q
||v || = v • v = v12 + v22 + . . . + vn2

Theorem (Theorem 3.2.1)


Let v be a vector in Rn and let c be a scalar. Then
1 kv k ≥ 0
2 ||v || = 0 if and only if v = 0
3 ||cv || = |c|||v ||

Norm; Dot Product; Distance in Rn


Length

Definition
The length (or norm) of a vector

v = (v1 , v2 , . . . , vn )

in Rn is the nonnegative scalar ||v || defined by


√ q
||v || = v • v = v12 + v22 + . . . + vn2

Theorem (Theorem 3.2.1)


Let v be a vector in Rn and let c be a scalar. Then
1 kv k ≥ 0
2 ||v || = 0 if and only if v = 0
3 ||cv || = |c|||v ||

Norm; Dot Product; Distance in Rn


Examples

Example
Find ||u|| if

1 u = (−1, 6) 37

2 u = (3, 0, −2) 13

Solution for Example 2


q √
k(3, 0, −2)k = (3)2 + (0)2 + (−2)2 = 13.

Norm; Dot Product; Distance in Rn


Examples

Example
Find ||u|| if

1 u = (−1, 6) 37

2 u = (3, 0, −2) 13

Solution for Example 2


q √
k(3, 0, −2)k = (3)2 + (0)2 + (−2)2 = 13.

Norm; Dot Product; Distance in Rn


Examples

Example
Find ||u|| if

1 u = (−1, 6) 37

2 u = (3, 0, −2) 13

Solution for Example 2


q √
k(3, 0, −2)k = (3)2 + (0)2 + (−2)2 = 13.

Norm; Dot Product; Distance in Rn


Examples

Example
Find ||u|| if

1 u = (−1, 6) 37

2 u = (3, 0, −2) 13

Solution for Example 2


q √
k(3, 0, −2)k = (3)2 + (0)2 + (−2)2 = 13.

Norm; Dot Product; Distance in Rn


Example
If u, v and w are vectors in Rn , n ≥ 2, and c is a scalar, explain
why the following expressions make no sense:
1 ||u • v || u • v is a scalar, not a vector.
2 u•v +w u • v is a scalar, not a vector.
3 u • (v • w) v • w is a scalar, not a vector.
4 c • (u + w) c is a scalar, not a vector.

Norm; Dot Product; Distance in Rn


Example
If u, v and w are vectors in Rn , n ≥ 2, and c is a scalar, explain
why the following expressions make no sense:
1 ||u • v || u • v is a scalar, not a vector.
2 u•v +w u • v is a scalar, not a vector.
3 u • (v • w) v • w is a scalar, not a vector.
4 c • (u + w) c is a scalar, not a vector.

Norm; Dot Product; Distance in Rn


Example
If u, v and w are vectors in Rn , n ≥ 2, and c is a scalar, explain
why the following expressions make no sense:
1 ||u • v || u • v is a scalar, not a vector.
2 u•v +w u • v is a scalar, not a vector.
3 u • (v • w) v • w is a scalar, not a vector.
4 c • (u + w) c is a scalar, not a vector.

Norm; Dot Product; Distance in Rn


Example
If u, v and w are vectors in Rn , n ≥ 2, and c is a scalar, explain
why the following expressions make no sense:
1 ||u • v || u • v is a scalar, not a vector.
2 u•v +w u • v is a scalar, not a vector.
3 u • (v • w) v • w is a scalar, not a vector.
4 c • (u + w) c is a scalar, not a vector.

Norm; Dot Product; Distance in Rn


Example
If u, v and w are vectors in Rn , n ≥ 2, and c is a scalar, explain
why the following expressions make no sense:
1 ||u • v || u • v is a scalar, not a vector.
2 u•v +w u • v is a scalar, not a vector.
3 u • (v • w) v • w is a scalar, not a vector.
4 c • (u + w) c is a scalar, not a vector.

Norm; Dot Product; Distance in Rn


Example
If u, v and w are vectors in Rn , n ≥ 2, and c is a scalar, explain
why the following expressions make no sense:
1 ||u • v || u • v is a scalar, not a vector.
2 u•v +w u • v is a scalar, not a vector.
3 u • (v • w) v • w is a scalar, not a vector.
4 c • (u + w) c is a scalar, not a vector.

Norm; Dot Product; Distance in Rn


Example
If u, v and w are vectors in Rn , n ≥ 2, and c is a scalar, explain
why the following expressions make no sense:
1 ||u • v || u • v is a scalar, not a vector.
2 u•v +w u • v is a scalar, not a vector.
3 u • (v • w) v • w is a scalar, not a vector.
4 c • (u + w) c is a scalar, not a vector.

Norm; Dot Product; Distance in Rn


Example
If u, v and w are vectors in Rn , n ≥ 2, and c is a scalar, explain
why the following expressions make no sense:
1 ||u • v || u • v is a scalar, not a vector.
2 u•v +w u • v is a scalar, not a vector.
3 u • (v • w) v • w is a scalar, not a vector.
4 c • (u + w) c is a scalar, not a vector.

Norm; Dot Product; Distance in Rn


Unit vectors

Definition
A vector of length 1 is called a unit vector.
Finding a unit vector in the same direction as a vector is called
normalizing a vector. This is done by factoring a vector by its
length i.e. kv1k v

Example
1 Give a unit vector in the direction of u if u = (1, 0, 3, 4).
√1 (1, 0, 3, 4)
26
2 Give a unit vector that is oppositely directed to u if
u = (−1, 2, 0, 3).
− √114 (−1, 2, 0, 3)
3 Give a unit vector in the direction of u if
u = (4, −2, 1)

Norm; Dot Product; Distance in Rn


Unit vectors

Definition
A vector of length 1 is called a unit vector.
Finding a unit vector in the same direction as a vector is called
normalizing a vector. This is done by factoring a vector by its
length i.e. kv1k v

Example
1 Give a unit vector in the direction of u if u = (1, 0, 3, 4).
√1 (1, 0, 3, 4)
26
2 Give a unit vector that is oppositely directed to u if
u = (−1, 2, 0, 3).
− √114 (−1, 2, 0, 3)
3 Give a unit vector in the direction of u if
u = (4, −2, 1)

Norm; Dot Product; Distance in Rn


Unit vectors

Definition
A vector of length 1 is called a unit vector.
Finding a unit vector in the same direction as a vector is called
normalizing a vector. This is done by factoring a vector by its
length i.e. kv1k v

Example
1 Give a unit vector in the direction of u if u = (1, 0, 3, 4).
√1 (1, 0, 3, 4)
26
2 Give a unit vector that is oppositely directed to u if
u = (−1, 2, 0, 3).
− √114 (−1, 2, 0, 3)
3 Give a unit vector in the direction of u if
u = (4, −2, 1)

Norm; Dot Product; Distance in Rn


Unit vectors

Definition
A vector of length 1 is called a unit vector.
Finding a unit vector in the same direction as a vector is called
normalizing a vector. This is done by factoring a vector by its
length i.e. kv1k v

Example
1 Give a unit vector in the direction of u if u = (1, 0, 3, 4).
√1 (1, 0, 3, 4)
26
2 Give a unit vector that is oppositely directed to u if
u = (−1, 2, 0, 3).
− √114 (−1, 2, 0, 3)
3 Give a unit vector in the direction of u if
u = (4, −2, 1)

Norm; Dot Product; Distance in Rn


Unit vectors

Definition
A vector of length 1 is called a unit vector.
Finding a unit vector in the same direction as a vector is called
normalizing a vector. This is done by factoring a vector by its
length i.e. kv1k v

Example
1 Give a unit vector in the direction of u if u = (1, 0, 3, 4).
√1 (1, 0, 3, 4)
26
2 Give a unit vector that is oppositely directed to u if
u = (−1, 2, 0, 3).
− √114 (−1, 2, 0, 3)
3 Give a unit vector in the direction of u if
u = (4, −2, 1)

Norm; Dot Product; Distance in Rn


Standard unit vectors

The standard unit vectors in R2 are

i = (1, 0), j = (0, 1);

and the standard unit vectors in R3 are

i = (1, 0, 0), j = (0, 1, 0), k = (0, 0, 1).

Every vector can easily be expressed as a linear combination


of the standard unit vectors:

v = (v1 , v2 , v3 )
= v1 (1, 0, 0) + v2 (0, 1, 0) + v3 (0, 0, 1)
= v1 i + v2 j + v3 k .

Norm; Dot Product; Distance in Rn


Standard unit vectors

The standard unit vectors in R2 are

i = (1, 0), j = (0, 1);

and the standard unit vectors in R3 are

i = (1, 0, 0), j = (0, 1, 0), k = (0, 0, 1).

Every vector can easily be expressed as a linear combination


of the standard unit vectors:

v = (v1 , v2 , v3 )
= v1 (1, 0, 0) + v2 (0, 1, 0) + v3 (0, 0, 1)
= v1 i + v2 j + v3 k .

Norm; Dot Product; Distance in Rn


Standard unit vectors

The standard unit vectors in R2 are

i = (1, 0), j = (0, 1);

and the standard unit vectors in R3 are

i = (1, 0, 0), j = (0, 1, 0), k = (0, 0, 1).

Every vector can easily be expressed as a linear combination


of the standard unit vectors:

v = (v1 , v2 , v3 )
= v1 (1, 0, 0) + v2 (0, 1, 0) + v3 (0, 0, 1)
= v1 i + v2 j + v3 k .

Norm; Dot Product; Distance in Rn


Theorem (The Cauchy-Schwarz Inequality)
For all vectors u and v in Rn ,

|u • v | ≤ ||u||||v ||

Theorem (The Triangle Inequality)


For all vectors u and v in Rn ,

||u + v || ≤ ||u|| + ||v ||

Example
Is it possible to have ||u + v || = ||u|| + ||v ||? Explain your
reasoning.
Yes, for example u or v could be 0.

Norm; Dot Product; Distance in Rn


Theorem (The Cauchy-Schwarz Inequality)
For all vectors u and v in Rn ,

|u • v | ≤ ||u||||v ||

Theorem (The Triangle Inequality)


For all vectors u and v in Rn ,

||u + v || ≤ ||u|| + ||v ||

Example
Is it possible to have ||u + v || = ||u|| + ||v ||? Explain your
reasoning.
Yes, for example u or v could be 0.

Norm; Dot Product; Distance in Rn


Theorem (The Cauchy-Schwarz Inequality)
For all vectors u and v in Rn ,

|u • v | ≤ ||u||||v ||

Theorem (The Triangle Inequality)


For all vectors u and v in Rn ,

||u + v || ≤ ||u|| + ||v ||

Example
Is it possible to have ||u + v || = ||u|| + ||v ||? Explain your
reasoning.
Yes, for example u or v could be 0.

Norm; Dot Product; Distance in Rn


Theorem (The Cauchy-Schwarz Inequality)
For all vectors u and v in Rn ,

|u • v | ≤ ||u||||v ||

Theorem (The Triangle Inequality)


For all vectors u and v in Rn ,

||u + v || ≤ ||u|| + ||v ||

Example
Is it possible to have ||u + v || = ||u|| + ||v ||? Explain your
reasoning.
Yes, for example u or v could be 0.

Norm; Dot Product; Distance in Rn


Geometry in Rn

Theorem (Parallelogram Equation for vectors)


If u and v are vectors in Rn , then

||u + v ||2 + ||u − v ||2 = 2(||u||2 + ||v ||2 )

Theorem (Theorem 3.2.7)


If u and v are vectors in Rn with the Euclidean inner product
(dot product), then

1 1
u•v = ||u + v ||2 − ||u − v ||2
4 4

Norm; Dot Product; Distance in Rn


Geometry in Rn

Theorem (Parallelogram Equation for vectors)


If u and v are vectors in Rn , then

||u + v ||2 + ||u − v ||2 = 2(||u||2 + ||v ||2 )

Theorem (Theorem 3.2.7)


If u and v are vectors in Rn with the Euclidean inner product
(dot product), then

1 1
u•v = ||u + v ||2 − ||u − v ||2
4 4

Norm; Dot Product; Distance in Rn


Distance

Definition
The distance d(u, v ) between vectors u and v in Rn is defined
by
d(u, v ) = ||u − v ||

Example
1 Find the distance between u = (−3, 2) and v = (−1, 4).

2 2
2 Find the distance between u = (1, 2, 3) and v = (2, 3, 1).

6

Norm; Dot Product; Distance in Rn


Distance

Definition
The distance d(u, v ) between vectors u and v in Rn is defined
by
d(u, v ) = ||u − v ||

Example
1 Find the distance between u = (−3, 2) and v = (−1, 4).

2 2
2 Find the distance between u = (1, 2, 3) and v = (2, 3, 1).

6

Norm; Dot Product; Distance in Rn


Distance

Definition
The distance d(u, v ) between vectors u and v in Rn is defined
by
d(u, v ) = ||u − v ||

Example
1 Find the distance between u = (−3, 2) and v = (−1, 4).

2 2
2 Find the distance between u = (1, 2, 3) and v = (2, 3, 1).

6

Norm; Dot Product; Distance in Rn


Distance

Definition
The distance d(u, v ) between vectors u and v in Rn is defined
by
d(u, v ) = ||u − v ||

Example
1 Find the distance between u = (−3, 2) and v = (−1, 4).

2 2
2 Find the distance between u = (1, 2, 3) and v = (2, 3, 1).

6

Norm; Dot Product; Distance in Rn


Distance

Definition
The distance d(u, v ) between vectors u and v in Rn is defined
by
d(u, v ) = ||u − v ||

Example
1 Find the distance between u = (−3, 2) and v = (−1, 4).

2 2
2 Find the distance between u = (1, 2, 3) and v = (2, 3, 1).

6

Norm; Dot Product; Distance in Rn


Example
Find the distance between u = (1, 2, 3) and v = (2, 3, 1).
Solution:
For u = (1, 2, 3) and v = (2, 3, 1):

d(u, v ) = ku − v k = k(1, 2, 3) − (2, 3, 1)k


√ √
= k(−1, −1, 2)k = 1 + 1 + 4 = 6.

Example
Find the distance between u = (−3, 2, 0) and v = (−1, 4, 1).

Theorem (Triangle inequality for distances)


If u, v and w are vectors in Rn , then

d(u, v ) ≤ d(u, w) + d(w, v ).

Norm; Dot Product; Distance in Rn


Example
Find the distance between u = (1, 2, 3) and v = (2, 3, 1).
Solution:
For u = (1, 2, 3) and v = (2, 3, 1):

d(u, v ) = ku − v k = k(1, 2, 3) − (2, 3, 1)k


√ √
= k(−1, −1, 2)k = 1 + 1 + 4 = 6.

Example
Find the distance between u = (−3, 2, 0) and v = (−1, 4, 1).

Theorem (Triangle inequality for distances)


If u, v and w are vectors in Rn , then

d(u, v ) ≤ d(u, w) + d(w, v ).

Norm; Dot Product; Distance in Rn


Example
Find the distance between u = (1, 2, 3) and v = (2, 3, 1).
Solution:
For u = (1, 2, 3) and v = (2, 3, 1):

d(u, v ) = ku − v k = k(1, 2, 3) − (2, 3, 1)k


√ √
= k(−1, −1, 2)k = 1 + 1 + 4 = 6.

Example
Find the distance between u = (−3, 2, 0) and v = (−1, 4, 1).

Theorem (Triangle inequality for distances)


If u, v and w are vectors in Rn , then

d(u, v ) ≤ d(u, w) + d(w, v ).

Norm; Dot Product; Distance in Rn


Example
Find the distance between u = (1, 2, 3) and v = (2, 3, 1).
Solution:
For u = (1, 2, 3) and v = (2, 3, 1):

d(u, v ) = ku − v k = k(1, 2, 3) − (2, 3, 1)k


√ √
= k(−1, −1, 2)k = 1 + 1 + 4 = 6.

Example
Find the distance between u = (−3, 2, 0) and v = (−1, 4, 1).

Theorem (Triangle inequality for distances)


If u, v and w are vectors in Rn , then

d(u, v ) ≤ d(u, w) + d(w, v ).

Norm; Dot Product; Distance in Rn


Angles

Definition
For nonzero vectors u and v in Rn ,
u•v
cos θ =
||u||||v ||

Example
Find the angle between u = (3, 0) and v = (−2, 2).
θ = 43 π

Norm; Dot Product; Distance in Rn


Angles

Definition
For nonzero vectors u and v in Rn ,
u•v
cos θ =
||u||||v ||

Example
Find the angle between u = (3, 0) and v = (−2, 2).
θ = 34 π

Norm; Dot Product; Distance in Rn


Angles

Definition
For nonzero vectors u and v in Rn ,
u•v
cos θ =
||u||||v ||

Example
Find the angle between u = (3, 0) and v = (−2, 2).
θ = 34 π

Norm; Dot Product; Distance in Rn


Matrix Multiplication

If u and v are column vectors in Rn then

u • v = u T v = v T u.
Moreover, if A is an n × n matrix and u and v are n × 1 vectors
then
Au • v = v T (Au) = u • AT v
and
u • Av = (Av )T u = AT u • v .

Norm; Dot Product; Distance in Rn


In conclusion: Do you know these concepts?

Angle between two


vectors in Rn
Norm (or length or
magnitude) of a vector. Dot product (or
Euclidean inner product)
Unit vector
of two vectors in Rn
Normalize vector
Cauchy-Schwarz
Standard unit vectors inequality
Distance between points Triangle Inequality
in Rn
Parallelogram equation
of vectors

Norm; Dot Product; Distance in Rn


Can you?

Compute the norm of a vector in Rn .


Determine whether a given vector in Rn is a unit vector.
Normalize a nonzero vector in Rn .
Compute the dot product of two vectors in Rn .
Compute the angle between two nonzero vectors in Rn .
Prove basic properties pertaining to norms and dot
products.

Norm; Dot Product; Distance in Rn


Extra Exercises
Example
1 If u 6= 0, does u • v = u • w imply that v = w? Prove or
disprove.
2 If u • v = 0, does that imply that u = 0 or v = 0? Prove or
disprove.
3 Prove of disprove the following claim: For all vectors
u, v , w ∈ Rn we have

||u + v + w|| ≤ ||u|| + ||v || + ||w||.

4 If ||v || = 2 and ||w|| = 3, what are the largest and smallest


possible values for ||v − w||? Give a geometric explanation
of your results.
5 Let u = (2, k ) and v = (3, 5). Find k such that
1 u and v are parallel.
2 u and v are orthogonal.
Norm; Dot Product; Distance in Rn

You might also like