Professional Documents
Culture Documents
Vectors 1
Vectors 1
4 Vectors in Rn
6 Vector Products
Dot Product
7 Angles
Introduction To Vectors
Definition (Vector)
A vector is an object that has both a magnitude and a direction.
Geometric representation
−−→
Vectors are represented with arrows on top (⃗
v or OP ) or as boldface v.
Definition
Two vectors are equal if they have the same magnitude and direction.
Example
D
B u
u
C u
−→ −−→
AB = u = DC
Addition of Vectors
Theorem (Parallelogram law)
Vector u + v is the diagonal of the parallelogram formed by u and v.
Addition Laws
B
u
A u+v D B
u v
v A u+v
D
C
(b) Triangle law of vector addition: The tip of u
(a) Parallelogram law of vector addition: The tail coincides with the tail of v. (Also called head to
of u and v coincide. tail rule)
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 + B D = AD (1)
Zero Vector
−→ −→ −−→ →
−
1 AB + B A = A A. 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 = M N and 0 = N N then w + 0 = M N + N N = M N = w.]
Negative vector
−→ −→ −→ −→ −−→ −→
B A and AB have the same magnitude but opposite directions and satisfy AB + B A = A A = ⃗0. B A is
−→ −→ −→
the negative of AB i.e. B A = − AB .
−→ −→ −→ −→ −→
1 + · · · + AB} = k AB if k ∈ Z. The coefficient
In general, we have k AB . For instance |AB + AB{z
k
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.
Position Vectors
−→ −−→ −−→
AB = AO + OB (2)
a ] +⃗
= [−⃗ b (3)
=⃗b −⃗
a (4)
−−→ −−→
= OB − O A (5)
a
3 Vectors can be represented either as row vector [a, b, c] of a column vector b
c
Dr. Gabby (KNUST-Maths) Vectors 12 / 43
Addition, Subtraction and Scaler Multiplication
Some 2D Properties
Given u = [u 1 , u 2 ] and v = [v 1 , v 2 ] then
1 Addition
u + v = [u 1 + v 1 , u 2 + v 2 ] (7)
2 Subtraction
u − v = [u 1 − v 1 , u 2 − v 2 ] (8)
3 Scalar multiplication
ku = [ku 1 , ku 2 ] (9)
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.
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 = O J , and any vector w = OM can be expressed
as w = w 1 i + w 2 j. w 1 and w 2 are the coordinates of
w.
Example
−→
Given the points E = (2, 7) and F = (3, −1), then the vector E F is given as
−→ −−→ −−→
E F = OF − OE (11)
= [(3, −1) − (2, 7)] (12)
= [1, −8] (13)
Example
Calculate the magnitude of vector a = λ1 a1 − λ2 a2 − λ3 a3 in case a1 = [2, −3], a2 = [−3, 0], a3 =
[−1, −1] and λ1 = 2, λ2 = −1, λ3 = 3.
a = λ1 a1 − λ2 a2 − λ3 a3 (14)
= 2[2, −3] − [−1][−3, 0] − 3[−1, −1] (15)
= [4, −6] + [−3, 0] + [3, 3] (16)
= [4, −3] (17)
Thus
p p
|a| = 42 + [−3]2 = 25 = 5 (18)
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.
F = F1 + F2 + F3 + F4 (19)
= [20, 25] + [15, 5] + [25, −5] + [30, −15] (20)
= [90, 10] (21)
Definition
1 If v 1 , v 2 , . . . , v n are n real numbers:
2 v = [v 1 , v 2 ] is a two dimension vector. It belongs to R2 .
3 v = [v 1 , v 2 , v 3 ] is a three dimension vector. It belongs to R3 .
4 v = [v 1 , v 2 , . . . , v n ] 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].
u = [u 1 , u 2 , . . . , u n ], and v = [v 1 , v 2 , . . . , v n ] then
1 Addition
u + v = [u 1 + v 1 , u 2 + v 2 , . . . , u n + v n ] (22)
2 Subtraction
u − v = [u 1 − v 1 , u 2 − v 2 , . . . , u n − v n ] (23)
3 Scalar multiplication
ku = [ku 1 , ku 2 , . . . , ku n ] (24)
4 Magnitude q
∥u∥ = u 12 + u 22 + . . . + u n
2 (25)
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 p
a −⃗
p
|⃗ b| = 62 + [−1]2 + [−2]2 = 41 (29)
The unit in the direction of a is
1
e= p [4, 0, 3] (30)
4 + 02 + 32
2
1
= [4, 0, 3] (31)
·5 ¸
4 3
= , 0, (32)
5 5
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 25 / 43
Linear Combination of Vectors
Example
2 1 2 5
1 2 5 2
3 0 + 2 −3 − −4 = −2
(34)
−1 1 0 −1
Dot Product
For u and v in Rn ,
1 If
u = [u 1 , u 2 , . . . , u n ], and v = [v 1 , v 2 , . . . , v n ]
then
〈u, v〉 = u · v = u 1 v 1 + u 2 v 2 + . . . + u n v n (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.
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
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.
Exercise
1 If ⃗i , ⃗j ,⃗ j ·⃗
k ∈ R3 , then ⃗ 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].
Angles
The dot product can also be used to calculate the angle between a pair of vectors. In R 2
or R 3 , the angle between the nonzero vectors u and v will refer to the angle θ determined
by these vectors that satisfies 0 ≤ θ ≤ 180.
Definition
For nonzero vectors u and v in R n
u·v
cos θ = (36)
||u|| ||v||
Orthogonal vectors
Two nonzero vectors u and v are said to be orthogonal or perpendicular if
u·v = 0 (38)
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 −2 −1
cos θ = =p p =p (43)
||u|| ||v|| 14 × 2 7
θ = 112.2078 (44)
Dr. Gabby (KNUST-Maths) Vectors 36 / 43
Angles
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)
2
1 + k − 3k + 1 = 0 (47)
k 2 − 3k + 2 = 0 (48)
[k − 2][k − 1] = 0 (49)
Hence k = 2 or k = 1
Theorem
For any two vectors a and b
1 Schwartz’s inequality:
∥a · b∥ ≤ ∥a∥∥b∥ (50)
2 Triangle inequality:
Definition
The distance between a and b is
d (a, b) = ∥a − b∥ (52)
Theorem (Pythagoras)
For all vectors u and v in R n ,
∥u + v∥2 = ∥u∥2 + ∥v∥2 (53)
if and only if u and v are orthogonal.
Note
For orthogonal u · v = 0
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
u·v
comp u v = (55)
∥u∥
Vector Projection
The [vector] projection of v onto u is
u·v u u
pr o j u v = = comp u v (56)
∥u∥ ∥u∥ ∥u∥
Dr. Gabby (KNUST-Maths) Vectors 40 / 43
Angles
Example
Find the projection of v onto u if u = [2, 1] and v = [−1, 3]
u · v = −2 + 3 = 1 (57)
p p
||u|| · ||u|| = 5( 5) = 5 (58)
u·v u 1
pr o j u v = = u (59)
∥u∥ ∥u∥ 5
1
= [2, 1] (60)
·5 ¸
2 1
= , (61)
5 5
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]