Python Notes for mca i year students osmania university.docx
Vectors 1.pdf
1. VECTORS
Dr. Gabriel Obed Fosu
Department of Mathematics
Kwame Nkrumah University of Science and Technology
Google Scholar: https://scholar.google.com/citations?user=ZJfCMyQAAAAJ&hl=en&oi=ao
ResearchGate ID: https://www.researchgate.net/profile/Gabriel_Fosu2
Dr. Gabby (KNUST-Maths) Vectors 1 / 38
2. Lecture Outline
1 Introduction To Vectors
Introduction
Vectors in Rn
2 Vector Products
Dot Product
Dr. Gabby (KNUST-Maths) Vectors 2 / 38
3. Introduction To Vectors
Outline of Presentation
1 Introduction To Vectors
Introduction
Vectors in Rn
2 Vector Products
Dot Product
Dr. Gabby (KNUST-Maths) Vectors 3 / 38
4. Introduction To Vectors Introduction
Introduction To Vectors
Definition (Vector)
A vector is an object that has both a magnitude and a direction.
Dr. Gabby (KNUST-Maths) Vectors 4 / 38
5. Introduction To Vectors Introduction
Introduction To Vectors
Definition (Vector)
A vector is an object that has both a magnitude and a direction.
1 An example of a vector quantity is velocity. This is speed, in a particular direction. An
example of velocity might be 60 mph due north.
Dr. Gabby (KNUST-Maths) Vectors 4 / 38
6. Introduction To Vectors Introduction
Introduction To Vectors
Definition (Vector)
A vector is an object that has both a magnitude and a direction.
1 An example of a vector quantity is velocity. This is speed, in a particular direction. An
example of velocity might be 60 mph due north.
2 A quantity with magnitude alone, but no direction, is not a vector. It is called a scalar
instead. One example of a scalar is distance.
Dr. Gabby (KNUST-Maths) Vectors 4 / 38
7. Introduction To Vectors Introduction
Geometric representation
Definition (Geometric representation)
A vector v is represented by a directed line segment denoted by
−
→
AB.
A
B
v =
−
→
AB
1 A is the initial point/origin/tail and B is the terminal point/endpoint/tip.
2 The length of the segment is the magnitude of v and is denoted by ∥v∥.
3 A and B are any points in space.
Vectors are represented with arrows on top (⃗
v or
−
−
→
OP) or as boldface v.
Dr. Gabby (KNUST-Maths) Vectors 5 / 38
8. Introduction To Vectors Introduction
Definition
Two vectors are equal if they have the same magnitude and direction.
Dr. Gabby (KNUST-Maths) Vectors 6 / 38
9. Introduction To Vectors Introduction
Definition
Two vectors are equal if they have the same magnitude and direction.
Example
A
B
C
D
−
→
AB = u =
−
−
→
DC
u
u
u
Dr. Gabby (KNUST-Maths) Vectors 6 / 38
10. Introduction To Vectors Introduction
Addition of Vectors
Theorem (Parallelogram law)
Vector u+v is the diagonal of the parallelogram formed by u and v.
Addition Laws
A
B
u
C
v
D
u + v
(a) Parallelogram law of vector addition: The tail
of u and v coincide.
Dr. Gabby (KNUST-Maths) Vectors 7 / 38
11. Introduction To Vectors Introduction
Addition of Vectors
Theorem (Parallelogram law)
Vector u+v is the diagonal of the parallelogram formed by u and v.
Addition Laws
A
B
u
C
v
D
u + v
(a) Parallelogram law of vector addition: The tail
of u and v coincide.
A
B
u v
D
u + v
(b) Triangle law of vector addition: The tip of u
coincides with the tail of v. (Also called head to
tail rule)
Dr. Gabby (KNUST-Maths) Vectors 7 / 38
12. Introduction To Vectors Introduction
Addition
If the two vectors do not have a common point, we can always coincide them by shifting one of the
vectors.
By observing that
−
→
AB +
−
−
→
BD =
−
−
→
AD (1)
Dr. Gabby (KNUST-Maths) Vectors 8 / 38
13. Introduction To Vectors Introduction
Addition
If the two vectors do not have a common point, we can always coincide them by shifting one of the
vectors.
By observing that
−
→
AB +
−
−
→
BD =
−
−
→
AD (1)
Zero Vector
1
−
→
AB +
−
→
B A =
−
−
→
AA. This is the zero vector. It has zero magnitude and is denoted by 0 or
−
→
0 . Its
origin is equal to its endpoint.
2 For any vector w,w+0 = w [if we let w =
−
−
→
MN and 0 =
−
−
→
NN then w+0 =
−
−
→
MN +
−
−
→
NN =
−
−
→
MN = w.]
Dr. Gabby (KNUST-Maths) Vectors 8 / 38
14. Introduction To Vectors Introduction
Addition
If the two vectors do not have a common point, we can always coincide them by shifting one of the
vectors.
By observing that
−
→
AB +
−
−
→
BD =
−
−
→
AD (1)
Zero Vector
1
−
→
AB +
−
→
B A =
−
−
→
AA. This is the zero vector. It has zero magnitude and is denoted by 0 or
−
→
0 . Its
origin is equal to its endpoint.
2 For any vector w,w+0 = w [if we let w =
−
−
→
MN and 0 =
−
−
→
NN then w+0 =
−
−
→
MN +
−
−
→
NN =
−
−
→
MN = w.]
Negative vector
−
→
B A and
−
→
AB have the same magnitude but opposite directions and satisfy
−
→
AB +
−
→
B A =
−
−
→
AA =⃗
0.
−
→
B A is
the negative of
−
→
AB i.e.
−
→
B A = −
−
→
AB.
Dr. Gabby (KNUST-Maths) Vectors 8 / 38
15. Introduction To Vectors Introduction
1 In general, we have k
−
→
AB. For instance
−
→
AB +
−
→
AB +···+
−
→
AB
| {z }
k
= k
−
→
AB if k ∈ Z. The coefficient
k is a scalar and the product between a scalar and a vector is called scalar
multiplication.
Dr. Gabby (KNUST-Maths) Vectors 9 / 38
16. Introduction To Vectors Introduction
1 In general, we have k
−
→
AB. For instance
−
→
AB +
−
→
AB +···+
−
→
AB
| {z }
k
= k
−
→
AB if k ∈ Z. The coefficient
k is a scalar and the product between a scalar and a vector is called scalar
multiplication.
2 w and kw are said to be parallel; they have the same direction if k > 0 and opposite
direction if k < 0.
Dr. Gabby (KNUST-Maths) Vectors 9 / 38
17. Introduction To Vectors Introduction
Position Vectors
Definition (Position Vectors)
While vectors can exist anywhere in space, a point is always defined relative to the origin,
O. Vectors defined from the origin are called Position Vectors
−
→
AB =
−
−
→
AO +
−
−
→
OB (2)
= [−⃗
a]+⃗
b (3)
=⃗
b −⃗
a (4)
=
−
−
→
OB −
−
−
→
OA (5)
Dr. Gabby (KNUST-Maths) Vectors 10 / 38
18. Introduction To Vectors Introduction
It is natural to represent position vectors using
coordinates. For example, in A = (3,2) and we
write the vector ⃗
a =
−
−
→
OA = [3,2] using square
brackets. Similarly, ⃗
b = [−1,3] and ⃗
c = [2,−1]
Dr. Gabby (KNUST-Maths) Vectors 11 / 38
19. Introduction To Vectors Introduction
It is natural to represent position vectors using
coordinates. For example, in A = (3,2) and we
write the vector ⃗
a =
−
−
→
OA = [3,2] using square
brackets. Similarly, ⃗
b = [−1,3] and ⃗
c = [2,−1]
1 The individual coordinates [3 and 2 in the case of ⃗
a] are called the components of the
vector.
Dr. Gabby (KNUST-Maths) Vectors 11 / 38
20. Introduction To Vectors Introduction
It is natural to represent position vectors using
coordinates. For example, in A = (3,2) and we
write the vector ⃗
a =
−
−
→
OA = [3,2] using square
brackets. Similarly, ⃗
b = [−1,3] and ⃗
c = [2,−1]
1 The individual coordinates [3 and 2 in the case of ⃗
a] are called the components of the
vector.
2 A vector is sometimes said to be an ordered pair of real numbers. That is
[3,2] ̸= [2,3] (6)
Dr. Gabby (KNUST-Maths) Vectors 11 / 38
21. Introduction To Vectors Introduction
It is natural to represent position vectors using
coordinates. For example, in A = (3,2) and we
write the vector ⃗
a =
−
−
→
OA = [3,2] using square
brackets. Similarly, ⃗
b = [−1,3] and ⃗
c = [2,−1]
1 The individual coordinates [3 and 2 in the case of ⃗
a] are called the components of the
vector.
2 A vector is sometimes said to be an ordered pair of real numbers. That is
[3,2] ̸= [2,3] (6)
3 Vectors can be represented either as row vector [a,b,c] of a column vector
a
b
c
Dr. Gabby (KNUST-Maths) Vectors 11 / 38
22. Introduction To Vectors Introduction
Some 2D Properties
Given u = [u1,u2] and v = [v1,v2] then
1 Addition
u+v = [u1 + v1,u2 + v2] (7)
Dr. Gabby (KNUST-Maths) Vectors 12 / 38
23. Introduction To Vectors Introduction
Some 2D Properties
Given u = [u1,u2] and v = [v1,v2] then
1 Addition
u+v = [u1 + v1,u2 + v2] (7)
2 Subtraction
u−v = [u1 − v1,u2 − v2] (8)
Dr. Gabby (KNUST-Maths) Vectors 12 / 38
24. Introduction To Vectors Introduction
Some 2D Properties
Given u = [u1,u2] and v = [v1,v2] then
1 Addition
u+v = [u1 + v1,u2 + v2] (7)
2 Subtraction
u−v = [u1 − v1,u2 − v2] (8)
3 Scalar multiplication
ku = [ku1,ku2] (9)
Dr. Gabby (KNUST-Maths) Vectors 12 / 38
25. Introduction To Vectors Introduction
Some 2D Properties
Given u = [u1,u2] and v = [v1,v2] then
1 Addition
u+v = [u1 + v1,u2 + v2] (7)
2 Subtraction
u−v = [u1 − v1,u2 − v2] (8)
3 Scalar multiplication
ku = [ku1,ku2] (9)
4 Magnitude / Length / Norm
∥u∥ = ||u|| =
q
u2
1 +u2
2 (10)
Dr. Gabby (KNUST-Maths) Vectors 12 / 38
26. Introduction To Vectors Introduction
Standard Basis Vectors
Let ⃗
i = [1, 0] and ⃗
j = [0, 1] , the i, j are called standard basis vectors in R2
.
Each vector have length 1 and point in the directions of the positive x, and y−axes
respectively.
Dr. Gabby (KNUST-Maths) Vectors 13 / 38
27. Introduction To Vectors Introduction
Standard Basis Vectors
Let ⃗
i = [1, 0] and ⃗
j = [0, 1] , the i, j are called standard basis vectors in R2
.
Each vector have length 1 and point in the directions of the positive x, and y−axes
respectively.
Similarly, in the three-dimensional plane, the vectors ⃗
i = [1,0,0],⃗
j = [0,1,0] and ⃗
k = [0,0,1]
are also called the standard basis vectors.
Again they have length 1 and point in the directions of the positive x, y, and z−axes.
Dr. Gabby (KNUST-Maths) Vectors 13 / 38
28. Introduction To Vectors Introduction
Standard Basis Vectors
Dr. Gabby (KNUST-Maths) Vectors 14 / 38
29. Introduction To Vectors Introduction
Unit Vector
Definition
1 A vector of magnitude 1 is called a unit vector.
In the Cartesian coordinate system, i and j are
reserved for the unit vector along the positive x-
axis and y-axis respectively.
2 The Cartesian coordinate system is therefore
defined by three reference points (O,I, J) such
that the origin O has coordinates (0,0),i =
−
→
OI and
j =
−
→
OJ, and any vector w =
−
−
→
OM can be expressed
as w = w1i+ w2j. w1 and w2 are the coordinates of
w.
Dr. Gabby (KNUST-Maths) Vectors 15 / 38
30. Introduction To Vectors Introduction
Example
Given the points E = (2,7) and F = (3,−1), then the vector
−
→
EF is given as
−
→
EF =
−
−
→
OF −
−
−
→
OE (11)
= [(3,−1)−(2,7)] (12)
= [1,−8] (13)
Dr. Gabby (KNUST-Maths) Vectors 16 / 38
31. Introduction To Vectors Introduction
Example
Calculate the magnitude of vector a = λ1a1 −λ2a2 −λ3a3 in case a1 = [2,−3],a2 = [−3,0],a3 =
[−1,−1] and λ1 = 2,λ2 = −1,λ3 = 3.
Dr. Gabby (KNUST-Maths) Vectors 17 / 38
32. Introduction To Vectors Introduction
Example
Calculate the magnitude of vector a = λ1a1 −λ2a2 −λ3a3 in case a1 = [2,−3],a2 = [−3,0],a3 =
[−1,−1] and λ1 = 2,λ2 = −1,λ3 = 3.
a = λ1a1 −λ2a2 −λ3a3 (14)
= 2[2,−3]−[−1][−3,0]−3[−1,−1] (15)
= [4,−6]+[−3,0]+[3,3] (16)
= [4,−3] (17)
Thus
Dr. Gabby (KNUST-Maths) Vectors 17 / 38
33. Introduction To Vectors Introduction
Example
Calculate the magnitude of vector a = λ1a1 −λ2a2 −λ3a3 in case a1 = [2,−3],a2 = [−3,0],a3 =
[−1,−1] and λ1 = 2,λ2 = −1,λ3 = 3.
a = λ1a1 −λ2a2 −λ3a3 (14)
= 2[2,−3]−[−1][−3,0]−3[−1,−1] (15)
= [4,−6]+[−3,0]+[3,3] (16)
= [4,−3] (17)
Thus
|a| =
p
42 +[−3]2 =
p
25 = 5 (18)
Dr. Gabby (KNUST-Maths) Vectors 17 / 38
34. Introduction To Vectors Introduction
Example
A car is pulled by four men. The components of the four forces are F1 = [20,25],F2 =
[15,5],F3 = [25,−5] and F4 = [30,−15]. Find the resultant force R.
Dr. Gabby (KNUST-Maths) Vectors 18 / 38
35. Introduction To Vectors Introduction
Example
A car is pulled by four men. The components of the four forces are F1 = [20,25],F2 =
[15,5],F3 = [25,−5] and F4 = [30,−15]. Find the resultant force R.
The resultant force
F = F1 +F2 +F3 +F4 (19)
= [20,25]+[15,5]+[25,−5]+[30,−15] (20)
= [90,10] (21)
Dr. Gabby (KNUST-Maths) Vectors 18 / 38
36. Introduction To Vectors Vectors in Rn
Definition
1 If v1,v2,...,vn are n real numbers:
2 v = [v1,v2] is a two dimension vector. It belongs to R2
.
3 v = [v1,v2,v3] is a three dimension vector. It belongs to R3
.
4 v = [v1,v2,...,vn] is an n dimension vector. It belongs to Rn
. We may use e1,e2,...en to
denote the unit vectors of the coordinate system.
Dr. Gabby (KNUST-Maths) Vectors 19 / 38
37. Introduction To Vectors Vectors in Rn
Definition
1 If v1,v2,...,vn are n real numbers:
2 v = [v1,v2] is a two dimension vector. It belongs to R2
.
3 v = [v1,v2,v3] is a three dimension vector. It belongs to R3
.
4 v = [v1,v2,...,vn] is an n dimension vector. It belongs to Rn
. We may use e1,e2,...en to
denote the unit vectors of the coordinate system.
1 i = [1,0,0],j = [0,1,0] and k = [0,0,1] are three dimension vectors; i,j,k ∈ R3
.u = [3,−1,5] =
3i−j+5k is a vector in R3
.
Dr. Gabby (KNUST-Maths) Vectors 19 / 38
38. Introduction To Vectors Vectors in Rn
Definition
1 If v1,v2,...,vn are n real numbers:
2 v = [v1,v2] is a two dimension vector. It belongs to R2
.
3 v = [v1,v2,v3] is a three dimension vector. It belongs to R3
.
4 v = [v1,v2,...,vn] is an n dimension vector. It belongs to Rn
. We may use e1,e2,...en to
denote the unit vectors of the coordinate system.
1 i = [1,0,0],j = [0,1,0] and k = [0,0,1] are three dimension vectors; i,j,k ∈ R3
.u = [3,−1,5] =
3i−j+5k is a vector in R3
.
2 v = [3,−1,5,0,4] = 3e1 −e2 +5e3 +4e5 is a five dimension vector; v ∈ R5
.
Dr. Gabby (KNUST-Maths) Vectors 19 / 38
39. Introduction To Vectors Vectors in Rn
Definition
1 If v1,v2,...,vn are n real numbers:
2 v = [v1,v2] is a two dimension vector. It belongs to R2
.
3 v = [v1,v2,v3] is a three dimension vector. It belongs to R3
.
4 v = [v1,v2,...,vn] is an n dimension vector. It belongs to Rn
. We may use e1,e2,...en to
denote the unit vectors of the coordinate system.
1 i = [1,0,0],j = [0,1,0] and k = [0,0,1] are three dimension vectors; i,j,k ∈ R3
.u = [3,−1,5] =
3i−j+5k is a vector in R3
.
2 v = [3,−1,5,0,4] = 3e1 −e2 +5e3 +4e5 is a five dimension vector; v ∈ R5
.
3 The coordinate system is defined by e1 = [1,0,0,0,0], e2 = [0,1,0,0,0], e3 = [0,0,1,0,0],
e4 = [0,0,0,1,0], and e5 = [0,0,0,0,1].
Dr. Gabby (KNUST-Maths) Vectors 19 / 38
40. Introduction To Vectors Vectors in Rn
u = [u1,u2,...,un], and v = [v1,v2,...,vn] then
1 Addition
u+v = [u1 + v1,u2 + v2,...,un + vn] (22)
Dr. Gabby (KNUST-Maths) Vectors 20 / 38
41. Introduction To Vectors Vectors in Rn
u = [u1,u2,...,un], and v = [v1,v2,...,vn] then
1 Addition
u+v = [u1 + v1,u2 + v2,...,un + vn] (22)
2 Subtraction
u−v = [u1 − v1,u2 − v2,...,un − vn] (23)
Dr. Gabby (KNUST-Maths) Vectors 20 / 38
42. Introduction To Vectors Vectors in Rn
u = [u1,u2,...,un], and v = [v1,v2,...,vn] then
1 Addition
u+v = [u1 + v1,u2 + v2,...,un + vn] (22)
2 Subtraction
u−v = [u1 − v1,u2 − v2,...,un − vn] (23)
3 Scalar multiplication
ku = [ku1,ku2,...,kun] (24)
Dr. Gabby (KNUST-Maths) Vectors 20 / 38
43. Introduction To Vectors Vectors in Rn
u = [u1,u2,...,un], and v = [v1,v2,...,vn] then
1 Addition
u+v = [u1 + v1,u2 + v2,...,un + vn] (22)
2 Subtraction
u−v = [u1 − v1,u2 − v2,...,un − vn] (23)
3 Scalar multiplication
ku = [ku1,ku2,...,kun] (24)
4 Magnitude
∥u∥ =
q
u2
1 +u2
2 +...+u2
n (25)
Dr. Gabby (KNUST-Maths) Vectors 20 / 38
44. Introduction To Vectors Vectors in Rn
u = [u1,u2,...,un], and v = [v1,v2,...,vn] then
1 Addition
u+v = [u1 + v1,u2 + v2,...,un + vn] (22)
2 Subtraction
u−v = [u1 − v1,u2 − v2,...,un − vn] (23)
3 Scalar multiplication
ku = [ku1,ku2,...,kun] (24)
4 Magnitude
∥u∥ =
q
u2
1 +u2
2 +...+u2
n (25)
5 Unit vector in the direction of u
eu =
u
∥u∥
=
µ
u1
∥u∥
,
u2
∥u∥
,...,
un
∥u∥
¶
(26)
Dr. Gabby (KNUST-Maths) Vectors 20 / 38
45. Introduction To Vectors Vectors in Rn
Example
If a = [4,0,3] and b = [−2,1,5], find ∥a−b∥ and the unit vector e in the direction of a.
Dr. Gabby (KNUST-Maths) Vectors 21 / 38
46. Introduction To Vectors Vectors in Rn
Example
If a = [4,0,3] and b = [−2,1,5], find ∥a−b∥ and the unit vector e in the direction of a.
⃗
a −⃗
b = [4,0,3]−[−2,1,5] (27)
= [6,−1,−2] (28)
and
|⃗
a −⃗
b| =
p
62 +[−1]2 +[−2]2 =
p
41 (29)
Dr. Gabby (KNUST-Maths) Vectors 21 / 38
47. Introduction To Vectors Vectors in Rn
Example
If a = [4,0,3] and b = [−2,1,5], find ∥a−b∥ and the unit vector e in the direction of a.
⃗
a −⃗
b = [4,0,3]−[−2,1,5] (27)
= [6,−1,−2] (28)
and
|⃗
a −⃗
b| =
p
62 +[−1]2 +[−2]2 =
p
41 (29)
The unit in the direction of a is
e =
1
p
42 +02 +32
[4,0,3] (30)
=
1
5
[4,0,3] (31)
=
·
4
5
,0,
3
5
¸
(32)
Dr. Gabby (KNUST-Maths) Vectors 21 / 38
48. Introduction To Vectors Vectors in Rn
Properties of vectors
For any vectors u,v,w ∈ Rn
and any scalars k,k′
∈ R,
1
Closure u+v ∈ Rn
Dr. Gabby (KNUST-Maths) Vectors 22 / 38
49. Introduction To Vectors Vectors in Rn
Properties of vectors
For any vectors u,v,w ∈ Rn
and any scalars k,k′
∈ R,
1
Closure u+v ∈ Rn
2
Additive inverse u+[−u] = 0
Dr. Gabby (KNUST-Maths) Vectors 22 / 38
50. Introduction To Vectors Vectors in Rn
Properties of vectors
For any vectors u,v,w ∈ Rn
and any scalars k,k′
∈ R,
1
Closure u+v ∈ Rn
2
Additive inverse u+[−u] = 0
3
Commutative u+v = v+u
Dr. Gabby (KNUST-Maths) Vectors 22 / 38
51. Introduction To Vectors Vectors in Rn
Properties of vectors
For any vectors u,v,w ∈ Rn
and any scalars k,k′
∈ R,
1
Closure u+v ∈ Rn
2
Additive inverse u+[−u] = 0
3
Commutative u+v = v+u
4
Additive identity u+0 = u
Dr. Gabby (KNUST-Maths) Vectors 22 / 38
52. Introduction To Vectors Vectors in Rn
Properties of vectors
For any vectors u,v,w ∈ Rn
and any scalars k,k′
∈ R,
1
Closure u+v ∈ Rn
2
Additive inverse u+[−u] = 0
3
Commutative u+v = v+u
4
Additive identity u+0 = u
5
Multiplicative identity 1u = u
Dr. Gabby (KNUST-Maths) Vectors 22 / 38
53. Introduction To Vectors Vectors in Rn
Properties of vectors
For any vectors u,v,w ∈ Rn
and any scalars k,k′
∈ R,
1
Closure u+v ∈ Rn
2
Additive inverse u+[−u] = 0
3
Commutative u+v = v+u
4
Additive identity u+0 = u
5
Multiplicative identity 1u = u
6
Associative [u+v]+w = u+[v+w]
Dr. Gabby (KNUST-Maths) Vectors 22 / 38
54. Introduction To Vectors Vectors in Rn
Properties of vectors
For any vectors u,v,w ∈ Rn
and any scalars k,k′
∈ R,
1
Closure u+v ∈ Rn
2
Additive inverse u+[−u] = 0
3
Commutative u+v = v+u
4
Additive identity u+0 = u
5
Multiplicative identity 1u = u
6
Associative [u+v]+w = u+[v+w]
7
Scalar Multiplication k[u+v] = ku+kv
Dr. Gabby (KNUST-Maths) Vectors 22 / 38
55. Introduction To Vectors Vectors in Rn
Properties of vectors
For any vectors u,v,w ∈ Rn
and any scalars k,k′
∈ R,
1
Closure u+v ∈ Rn
2
Additive inverse u+[−u] = 0
3
Commutative u+v = v+u
4
Additive identity u+0 = u
5
Multiplicative identity 1u = u
6
Associative [u+v]+w = u+[v+w]
7
Scalar Multiplication k[u+v] = ku+kv
8
Scalar Multiplication [k +k′
]u = ku+k′
u
Dr. Gabby (KNUST-Maths) Vectors 22 / 38
56. Introduction To Vectors Vectors in Rn
Definition (Linear Combination)
A vector v is a linear combination of vectors v1,v2,··· ,vn if there are scalars k1,k2,··· ,kn
such that
v = k1v1 +k2v2 +···+knvn (33)
The scalars k1,k2,··· ,kn are called the coefficients of the linear combination.
Dr. Gabby (KNUST-Maths) Vectors 23 / 38
57. Introduction To Vectors Vectors in Rn
Definition (Linear Combination)
A vector v is a linear combination of vectors v1,v2,··· ,vn if there are scalars k1,k2,··· ,kn
such that
v = k1v1 +k2v2 +···+knvn (33)
The scalars k1,k2,··· ,kn are called the coefficients of the linear combination.
Example
The vectors
2
−2
−1
is a linear combination of
1
0
−1
,
2
−3
1
and
5
−4
0
Since
3
1
0
−1
+2
2
−3
1
−
5
−4
0
=
2
−2
−1
(34)
Dr. Gabby (KNUST-Maths) Vectors 23 / 38
58. Introduction To Vectors Vectors in Rn
Exercise
1 If ⃗
i,⃗
j,⃗
k ∈ R3
, then ⃗
j ·⃗
k =
2 If ⃗
i,⃗
j,⃗
k ∈ R2
, then −⃗
j ·⃗
i =
3 If ⃗
i,⃗
j,⃗
k ∈ R2
, then −⃗
k +⃗
j = is ?
4 If ⃗
i,⃗
j,⃗
k ∈ R3
, then the modulus of −⃗
k +⃗
j = is ?
5 Find a unit vector that has the same direction as
a. u = 8i−j+k
b. v = [−2,1,2].
Dr. Gabby (KNUST-Maths) Vectors 24 / 38
59. Vector Products
Outline of Presentation
1 Introduction To Vectors
Introduction
Vectors in Rn
2 Vector Products
Dot Product
Dr. Gabby (KNUST-Maths) Vectors 25 / 38
60. Vector Products Dot Product
Dot Product
For u and v in Rn
,
1 If
u = [u1,u2,...,un], and v = [v1,v2,...,vn]
then
〈u, v〉 = u·v = u1v1 +u2v2 +...+unvn (35)
is the dot product of the two vectors.
2 The dot product is also called inner or scalar product.
Dr. Gabby (KNUST-Maths) Vectors 26 / 38
61. Vector Products Dot Product
Dot Product
For u and v in Rn
,
1 If
u = [u1,u2,...,un], and v = [v1,v2,...,vn]
then
〈u, v〉 = u·v = u1v1 +u2v2 +...+unvn (35)
is the dot product of the two vectors.
2 The dot product is also called inner or scalar product.
Example
[1,2,3]·[−1,0,1] = 1(−1)+2(0)+3(1) = 2.
Dr. Gabby (KNUST-Maths) Vectors 26 / 38
62. Vector Products Dot Product
Dot Product
For u and v in Rn
,
1 If
u = [u1,u2,...,un], and v = [v1,v2,...,vn]
then
〈u, v〉 = u·v = u1v1 +u2v2 +...+unvn (35)
is the dot product of the two vectors.
2 The dot product is also called inner or scalar product.
Example
[1,2,3]·[−1,0,1] = 1(−1)+2(0)+3(1) = 2.
Example
[i+2j−3k]·[2j−k] = 0+4+3 = 7.
Dr. Gabby (KNUST-Maths) Vectors 26 / 38
63. Vector Products Dot Product
Example
In R3
,i = [1,0,0],j = [0,1,0] and k = [0,0,1] so that
· i j k
i 1 0 0
j 0 1 0
k 0 0 1
Dr. Gabby (KNUST-Maths) Vectors 27 / 38
64. Vector Products Dot Product
Properties
For any vectors u,v,w ∈ Rn
and any scalar k ∈ R :
1
u·v ∈ R
Dr. Gabby (KNUST-Maths) Vectors 28 / 38
65. Vector Products Dot Product
Properties
For any vectors u,v,w ∈ Rn
and any scalar k ∈ R :
1
u·v ∈ R
2
0·u = 0.
Dr. Gabby (KNUST-Maths) Vectors 28 / 38
66. Vector Products Dot Product
Properties
For any vectors u,v,w ∈ Rn
and any scalar k ∈ R :
1
u·v ∈ R
2
0·u = 0.
3
u·v = v·u
Dr. Gabby (KNUST-Maths) Vectors 28 / 38
67. Vector Products Dot Product
Properties
For any vectors u,v,w ∈ Rn
and any scalar k ∈ R :
1
u·v ∈ R
2
0·u = 0.
3
u·v = v·u
4
u·u = ∥u∥2
≥ 0 and u·u = 0 iff u = 0.
Dr. Gabby (KNUST-Maths) Vectors 28 / 38
68. Vector Products Dot Product
Properties
For any vectors u,v,w ∈ Rn
and any scalar k ∈ R :
1
u·v ∈ R
2
0·u = 0.
3
u·v = v·u
4
u·u = ∥u∥2
≥ 0 and u·u = 0 iff u = 0.
5
[ku]·v = k[u·v]
Dr. Gabby (KNUST-Maths) Vectors 28 / 38
69. Vector Products Dot Product
Properties
For any vectors u,v,w ∈ Rn
and any scalar k ∈ R :
1
u·v ∈ R
2
0·u = 0.
3
u·v = v·u
4
u·u = ∥u∥2
≥ 0 and u·u = 0 iff u = 0.
5
[ku]·v = k[u·v]
6
u·[v+w] = u·v+u·w.
Dr. Gabby (KNUST-Maths) Vectors 28 / 38
70. Vector Products Dot Product
Angles
The dot product can also be used to calculate the angle between a pair of vectors. In R2
or R3
, the angle between the nonzero vectors u and v will refer to the angle θ determined
by these vectors that satisfies 0 ≤ θ ≤ 180.
Dr. Gabby (KNUST-Maths) Vectors 29 / 38
71. Vector Products Dot Product
Definition
For nonzero vectors u and v in Rn
cosθ =
u·v
||u|| ||v||
(36)
This implies that
u·v = ||u|| ||v||cosθ (37)
0 ≤ θ ≤ π is the internal angle.
Dr. Gabby (KNUST-Maths) Vectors 30 / 38
72. Vector Products Dot Product
Definition
For nonzero vectors u and v in Rn
cosθ =
u·v
||u|| ||v||
(36)
This implies that
u·v = ||u|| ||v||cosθ (37)
0 ≤ θ ≤ π is the internal angle.
Orthogonal vectors
Two nonzero vectors u and v are said to be orthogonal or perpendicular if
u·v = 0 (38)
Dr. Gabby (KNUST-Maths) Vectors 30 / 38
73. Vector Products Dot Product
Example
Let u = i−2j+3k, v = i−k and w = 2i+7j+4k be three vectors of R3
. Show that u and w are
orthogonal but u and v are not. Find the angle θ between the direction of u and v.
Dr. Gabby (KNUST-Maths) Vectors 31 / 38
74. Vector Products Dot Product
Example
Let u = i−2j+3k, v = i−k and w = 2i+7j+4k be three vectors of R3
. Show that u and w are
orthogonal but u and v are not. Find the angle θ between the direction of u and v.
u·v = [1,−2,3]·[1,0,−1] (39)
= 1+0−3 = −2 Not orthogonal (40)
Dr. Gabby (KNUST-Maths) Vectors 31 / 38
75. Vector Products Dot Product
Example
Let u = i−2j+3k, v = i−k and w = 2i+7j+4k be three vectors of R3
. Show that u and w are
orthogonal but u and v are not. Find the angle θ between the direction of u and v.
u·v = [1,−2,3]·[1,0,−1] (39)
= 1+0−3 = −2 Not orthogonal (40)
u·w = [1,−2,3]·[2,7,4] (41)
= 2−14+12 = 0 orthogonal (42)
Dr. Gabby (KNUST-Maths) Vectors 31 / 38
76. Vector Products Dot Product
Example
Let u = i−2j+3k, v = i−k and w = 2i+7j+4k be three vectors of R3
. Show that u and w are
orthogonal but u and v are not. Find the angle θ between the direction of u and v.
u·v = [1,−2,3]·[1,0,−1] (39)
= 1+0−3 = −2 Not orthogonal (40)
u·w = [1,−2,3]·[2,7,4] (41)
= 2−14+12 = 0 orthogonal (42)
cosθ =
u·v
||u|| ||v||
=
−2
p
14×
p
2
=
−1
p
7
(43)
θ = 112.2078 (44)
Dr. Gabby (KNUST-Maths) Vectors 31 / 38
77. Vector Products Dot Product
Example
Find k so that u = [1,k,−3,1] and v = [1,k,k,1] are orthogonal.
Dr. Gabby (KNUST-Maths) Vectors 32 / 38
78. Vector Products Dot Product
Example
Find k so that u = [1,k,−3,1] and v = [1,k,k,1] are orthogonal.
For orthogonal
u·v = 0 (45)
[1,k,−3,1]·[1,k,k,1] = 0 (46)
1+k2
−3k +1 = 0 (47)
k2
−3k +2 = 0 (48)
[k −2][k −1] = 0 (49)
Hence k = 2 or k = 1
Dr. Gabby (KNUST-Maths) Vectors 32 / 38
79. Vector Products Dot Product
Theorem
For any two vectors a and b
1 Schwartz’s inequality:
∥a·b∥ ≤ ∥a∥∥b∥ (50)
2 Triangle inequality:
∥a+b∥ ≤ ∥a∥+∥b∥ (51)
Dr. Gabby (KNUST-Maths) Vectors 33 / 38
80. Vector Products Dot Product
Theorem
For any two vectors a and b
1 Schwartz’s inequality:
∥a·b∥ ≤ ∥a∥∥b∥ (50)
2 Triangle inequality:
∥a+b∥ ≤ ∥a∥+∥b∥ (51)
Definition
The distance between a and b is
d(a,b) = ∥a−b∥ (52)
Dr. Gabby (KNUST-Maths) Vectors 33 / 38
81. Vector Products Dot Product
Theorem (Pythagoras)
For all vectors u and v in Rn
,
∥u+v∥2
= ∥u∥2
+∥v∥2
(53)
if and only if u and v are orthogonal.
Note
∥u+v∥2
= ∥u∥2
+∥v∥2
+2u·v (54)
For orthogonal u·v = 0
Dr. Gabby (KNUST-Maths) Vectors 34 / 38
82. Vector Products Dot Product
Projection of v onto u
Consider two nonzero vectors u and v. Let p be the vector obtained by dropping a perpendicular
from the head of v onto u and let θ be the angle between u and v
Scaler Projection
The scalar projection of a vector v onto a
nonzero vector u is defined and denoted
by the scalar
compuv =
u·v
∥u∥
(55)
Dr. Gabby (KNUST-Maths) Vectors 35 / 38
83. Vector Products Dot Product
Projection of v onto u
Consider two nonzero vectors u and v. Let p be the vector obtained by dropping a perpendicular
from the head of v onto u and let θ be the angle between u and v
Scaler Projection
The scalar projection of a vector v onto a
nonzero vector u is defined and denoted
by the scalar
compuv =
u·v
∥u∥
(55)
Vector Projection
The [vector] projection of v onto u is
pro juv =
u·v
∥u∥
u
∥u∥
= compuv
u
∥u∥
(56)
Dr. Gabby (KNUST-Maths) Vectors 35 / 38
84. Vector Products Dot Product
Example
Find the projection of v onto u if u = [2,1] and v = [−1,3]
Dr. Gabby (KNUST-Maths) Vectors 36 / 38
85. Vector Products Dot Product
Example
Find the projection of v onto u if u = [2,1] and v = [−1,3]
u·v = −2+3 = 1 (57)
||u||·||u|| =
p
5(
p
5) = 5 (58)
Dr. Gabby (KNUST-Maths) Vectors 36 / 38
86. Vector Products Dot Product
Example
Find the projection of v onto u if u = [2,1] and v = [−1,3]
u·v = −2+3 = 1 (57)
||u||·||u|| =
p
5(
p
5) = 5 (58)
pro juv =
u·v
∥u∥
u
∥u∥
=
1
5
u (59)
=
1
5
[2,1] (60)
=
·
2
5
,
1
5
¸
(61)
Dr. Gabby (KNUST-Maths) Vectors 36 / 38
87. Vector Products Dot Product
Exercise
1 For what values of b will make ⃗
u = [b,3,] and ⃗
v = [2,6] orthogonal?
2 For what values of b will make ⃗
u = [b,3,−3,1,4] and ⃗
v = [b,b,6,1,9] orthogonal?
3 Find the vector projection of v onto u
1 u = [−1, 1], v = [−2, 4]
2 u = [3/5, −4/5], v = [1, 2]
3 u = [1/2, −1/4,/−1/2], v = [2, 2,/−2]
Dr. Gabby (KNUST-Maths) Vectors 37 / 38