You are on page 1of 8

LINEAR ALGEBRA

W W L CHEN


c W W L Chen, 1982, 2008.
This chapter originates from material used by the author at Imperial College, University of London, between 1981 and 1990.
It is available free to all individuals, on the understanding that it is not to be used for financial gain,
and may be downloaded and/or photocopied, with or without permission from the author.
However, this document may not be kept on any information storage and retrieval system without permission
from the author, unless such system is not accessible to any individuals other than its owners.

Chapter 4
VECTORS

4.1. Introduction

A vector is an object which has magnitude and direction.

Example 4.1.1. We may be travelling north-east at 50 kph. In this case, the direction of the velocity
is north-east and the magnitude of the velocity is 50 kph. We can describe our velocity in kph as
 
50 50
√ ,√ ,
2 2

where the first coordinate describes the speed with which we are moving east and the second coordinate
describes the speed with which we are moving north.

Example 4.1.2. An object in the sky may be 100 metres away in the south-east direction 45 degrees
upwards. In this case, the direction of its position is south-eastand 45 degrees upwards and the magnitude
of its distance is 100 metres. We can describe the position of the object in metres as
 
100
50, −50, √ ,
2

where the first coordinate describes the distance east, the second coordinate describes the distance north
and the third coordinate describes the distance up.

The purpose of this chapter is to study some relationship between algebra and geometry. We shall
first study some algebra which is motivated by geometric considerations. We then use the algebra later
to better understand some problems in geometry.

Chapter 4 : Vectors < 01 > page 1 of 24


< 02 >
Linear Algebra 
c W W L Chen, 1982, 2008

4.2. Vectors in R2

A vector on the plane R2 can be described as an ordered pair u = (u1 , u2 ), where u1 , u2 ∈ R.

Definition. Two vectors u = (u1 , u2 ) and v = (v1 , v2 ) in R2 are said to be equal, denoted by u = v, if
u1 = v1 and u2 = v2 .

Definition. For any two vectors u = (u1 , u2 ) and v = (v1 , v2 ) in R2 , we define their sum to be

u + v = (u1 , u2 ) + (v1 , v2 ) = (u1 + v1 , u2 + v2 ).

−−→ −−→
Geometrically, if we represent the two vectors u and v by AB and BC respectively, then the sum
−→
u + v is represented by AC as shown in the diagram below:

u+v
v

A u B

The next diagram demonstrates geometrically that u + v = v + u:

u
D C

v u+v
v

A u B

PROPOSITION 4A. (VECTOR ADDITION)


(a) For every u, v ∈ R2 , we have u + v ∈ R2 .
(b) For every u, v, w ∈ R2 , we have u + (v + w) = (u + v) + w.
(c) For every u ∈ R2 , we have u + 0 = u, where 0 = (0, 0) ∈ R2 .
(d) For every u ∈ R2 , there exists v ∈ R2 such that u + v = 0.
(e) For every u, v ∈ R2 , we have u + v = v + u.

Proof. Write u = (u1 , u2 ), v = (v1 , v2 ) and w = (w1 , w2 ), where u1 , u2 , v1 , v2 , w1 , w2 ∈ R. To check


part (a), simply note that u1 + v1 , u2 + v2 ∈ R. To check part (b), note that

u + (v + w) = (u1 , u2 ) + (v1 + w1 , v2 + w2 ) = (u1 + (v1 + w1 ), u2 + (v2 + w2 ))


= ((u1 + v1 ) + w1 , (u2 + v2 ) + w2 ) = (u1 + v1 , u2 + v2 ) + (w1 , w2 )
= (u + v) + w.

Part (c) is trivial. Next, if v = (−u1 , −u2 ), then u + v = 0, giving part (d). To check part (e), note
that u + v = (u1 + v1 , u2 + v2 ) = (v1 + u1 , v2 + u2 ) = v + u. 

Chapter 4 : Vectors page 2 of 24


< 03 >
Linear Algebra 
c W W L Chen, 1982, 2008

Definition. For any vector u = (u1 , u2 ) in R2 and any scalar c ∈ R, we define the scalar multiple to be

cu = c(u1 , u2 ) = (cu1 , cu2 ).

Example 4.2.1. Suppose that u = (2, 1). Then −2u = (−4, 2). Geometrically, if we represent the two
−→ −−→
vectors u and −2u by OA and OB respectively, then we have the diagram below:

A
u

−2u

PROPOSITION 4B. (SCALAR MULTIPLICATION)


(a) For every c ∈ R and u ∈ R2 , we have cu ∈ R2 .
(b) For every c ∈ R and u, v ∈ R2 , we have c(u + v) = cu + cv.
(c) For every a, b ∈ R and u ∈ R2 , we have (a + b)u = au + bu.
(d) For every a, b ∈ R and u ∈ R2 , we have (ab)u = a(bu).
(e) For every u ∈ R2 , we have 1u = u.

Proof. Write u = (u1 , u2 ) and v = (v1 , v2 ), where u1 , u2 , v1 , v2 ∈ R. To check part (a), simply note
that cu1 , cu2 ∈ R. To check part (b), note that

c(u + v) = c(u1 + v1 , u2 + v2 ) = (c(u1 + v1 ), c(u2 + v2 ))


= (cu1 + cv1 , cu2 + cv2 ) = (cu1 , cu2 ) + (cv1 , cv2 ) = cu + cv.

To check part (c), note that

(a + b)u = ((a + b)u1 , (a + b)u2 ) = (au1 + bu1 , au2 + bu2 )


= (au1 , au2 ) + (bu1 , bu2 ) = au + bu.

To check part (d), note that

(ab)u = ((ab)u1 , (ab)u2 ) = (a(bu1 ), a(bu2 )) = a(bu1 , bu2 ) = a(bu).

Finally, to check part (e), note that 1u = (1u1 , 1u2 ) = (u1 , u2 ) = u. 

Definition. For any vector u = (u1 , u2 ) in R2 , we define the norm of u to be the non-negative real
number

u = u21 + u22 .

Remarks. (1) The norm of a vector is simply its magnitude or length. The definition follows from the
famous theorem of Pythagoras.

(2) Suppose that P (u1 , u2 ) and Q(v1 , v2 ) are two points on the plane R2 . To calculate the distance
d(P, Q) between the two points, we can first find a vector from P to Q. This is given by (v1 −u1 , v2 −u2 ).
The distance d(P, Q) is then the norm of this vector, so that

d(P, Q) = (v1 − u1 )2 + (v2 − u2 )2 .

Chapter 4 : Vectors page 3 of 24


< 04 >
Linear Algebra 
c W W L Chen, 1982, 2008

(3) It is not difficult to see that for any vector u ∈ R2 and any scalar c ∈ R, we have cu = |c|u.

Definition. Any vector u ∈ R2 satisfying u = 1 is called a unit vector.

Example 4.2.2. The vector (3, 4) has norm 5.



Example 4.2.3. The distance between the points (6, 3) and (9, 7) is (9 − 6)2 + (7 − 3)2 = 5.

Example 4.2.4. The vectors (1, 0) and (0, −1) are unit vectors in R2 .
√ √
Example 4.2.5. The unit vector in the direction of the vector (1, 1) is (1/ 2, 1/ 2).

Example 4.2.6. In fact, all unit vectors in R2 are of the form (cos θ, sin θ), where θ ∈ R.

Quite often, we may want to find the angle between two vectors. The scalar product of the two vectors
then comes in handy. We shall define the scalar product in two ways, one in terms of the angle between
the two vectors and the other not in terms of this angle, and show that the two definitions are in fact
equivalent.

Definition. Suppose that u = (u1 , u2 ) and v = (v1 , v2 ) are vectors in R2 , and that θ ∈ [0, π] represents
the angle between them. We define the scalar product u · v of u and v by

u·v = uv cos θ if u = 0 and v = 0, (1)
0 if u = 0 or v = 0.
Alternatively, we write

u · v = u1 v1 + u2 v2 . (2)

The definitions (1) and (2) are clearly equivalent if u = 0 or v = 0. On the other hand, we have the
following result.

PROPOSITION 4C. Suppose that u = (u1 , u2 ) and v = (v1 , v2 ) are non-zero vectors in R2 , and that
θ ∈ [0, π] represents the angle between them. Then

uv cos θ = u1 v1 + u2 v2 .

−→ −−→
Proof. Geometrically, if we represent the two vectors u and v by OA and OB respectively, then the
−−→
difference v − u is represented by AB as shown in the diagram below:

v−u

A
u
θ
O

By the Law of cosines, we have


2 2 2
AB = OA + OB − 2OA OB cos θ;

Chapter 4 : Vectors page 4 of 24


< 05 >
Linear Algebra 
c W W L Chen, 1982, 2008

in other words, we have

v − u2 = u2 + v2 − 2uv cos θ,

so that

uv cos θ = 12 (u2 + v2 − v − u2 )


= 12 (u21 + u22 + v12 + v22 − (v1 − u1 )2 − (v2 − u2 )2 )
= u1 v1 + u2 v2

as required. 

Remarks. (1) We say that two non-zero vectors in R2 are orthogonal if the angle between them is π/2.
It follows immediately from the definition of the scalar product that two non-zero vectors u, v ∈ R2 are
orthogonal if and only if u · v = 0.

(2) We can calculate the scalar product of any two non-zero vectors u, v ∈ R2 by the formula (2) and
then use the formula (1) to calculate the angle between u and v.
√ √
Example 4.2.7. Suppose that u = ( 3, 1) and v = ( 3, 3). Then by the formula (2), we have

u · v = 3 + 3 = 6.

Note now that



u = 2 and v = 2 3.

It follows from the formula (1) that



u·v 6 3
cos θ = = √ = ,
uv 4 3 2

so that θ = π/6.
√ √
Example 4.2.8. Suppose that u = ( 3, 1) and v = (− 3, 3). Then by the formula (2), we have
u · v = 0. It follows that u and v are orthogonal.

PROPOSITION 4D. (SCALAR PRODUCT) Suppose that u, v, w ∈ R2 and c ∈ R. Then


(a) u · v = v · u;
(b) u · (v + w) = (u · v) + (u · w);
(c) c(u · v) = (cu) · v = u · (cv);
(d) u · u ≥ 0; and
(e) u · u = 0 if and only if u = 0.

Proof. Write u = (u1 , u2 ), v = (v1 , v2 ) and w = (w1 , w2 ), where u1 , u2 , v1 , v2 , w1 , w2 ∈ R. Part (a) is


trivial. To check part (b), note that

u · (v + w) = u1 (v1 + w1 ) + u2 (v2 + w2 ) = (u1 v1 + u2 v2 ) + (u1 w1 + u2 w2 ) = u · v + u · w.

Part (c) is rather simple. To check parts (d) and (e), note that u · u = u21 + u22 ≥ 0, and that equality
holds precisely when u1 = u2 = 0. 

Chapter 4 : Vectors page 5 of 24


< 06 >
Linear Algebra 
c W W L Chen, 1982, 2008

Consider the diagram below:


P

R A
u

v Q a

O (3)
−→ −−→
Here we represent the two vectors a and u by OA and OP respectively. If we project the vector u on to
−−→
the line OA, then the image of the projection is the vector w, represented by OQ. On the other hand,
if we project the vector u on to a line perpendicular to the line OA, then the image of the projection is
−−→
the vector v, represented by OR.

Definition. In the notation of the diagram (3), the vector w is called the orthogonal projection of the
vector u on the vector a, and denoted by w = proja u.

PROPOSITION 4E. (ORTHOGONAL PROJECTION) Suppose that u, a ∈ R2 . Then


u·a
proja u = a.
a2

−−→
Remark. Note that the component of u orthogonal to a, represented by OR in the diagram (3), is
u·a
u − proja u = u − a.
a2

Proof of Proposition 4E. Note that w = ka for some k ∈ R. It clearly suffices to prove that
u·a
k= .
a2
It is easy to see that the vectors u − w and a are orthogonal. It follows that the scalar product
(u − w) · a = 0. In other words, (u − ka) · a = 0. Hence
u·a u·a
k= =
a·a a2
as required. 

To end this section, we shall apply our knowledge gained so far to find a formula that gives the
perpendicular distance of a point (x0 , y0 ) from a line ax + by + c = 0. Consider the diagram below:

P
D

ax+by+c=0
n = (a, b)
u

Chapter 4 : Vectors page 6 of 24


< 07 >
Linear Algebra 
c W W L Chen, 1982, 2008

Suppose that (x1 , y1 ) is any arbitrary point O on the line ax + by + c = 0. For any other point (x, y) on
the line ax + by + c = 0, the vector (x − x1 , y − y1 ) is parallel to the line. On the other hand,

(a, b) · (x − x1 , y − y1 ) = (ax + by) − (ax1 + by1 ) = −c + c = 0,


−−→
so that the vector n = (a, b), in the direction OQ, is perpendicular to the line ax + by + c = 0.
Suppose next that the point (x0 , y0 ) is represented by the point P in the diagram. Then the vector
−−→ −−→
u = (x0 − x1 , y0 − y1 ) is represented by OP , and OQ represents the orthogonal projection projn u of u
on the vector n. Clearly the perpendicular distance D of the point (x0 , y0 ) from the line ax + by + c = 0
satisfies
 
 u · n  |(x0 − x1 , y0 − y1 ) · (a, b)| |ax0 + by0 − ax1 − by1 | |ax0 + by0 + c|
D = projn u =   n2  =
n  √ = √ = √ .
a2 + b2 a2 + b2 a2 + b2

We have proved the following result.

PROPOSITION 4F. The perpendicular distance D of a point (x0 , y0 ) from a line ax + by + c = 0 is


given by

|ax0 + by0 + c|
D= √ .
a2 + b2

Example 4.2.9. The perpendicular distance D of the point (5, 7) from the line 2x − 3y + 5 = 0 is given
by

|10 − 21 + 5| 6
D= √ =√ .
4+9 13

4.3. Vectors in R3

In this section, we consider the same problems as in Section 4.2, but in 3-space R3 . Any reader who
feels confident may skip this section.

A vector on the plane R3 can be described as an ordered triple u = (u1 , u2 , u3 ), where u1 , u2 , u3 ∈ R.

Definition. Two vectors u = (u1 , u2 , u3 ) and v = (v1 , v2 , v3 ) in R3 are said to be equal, denoted by
u = v, if u1 = v1 , u2 = v2 and u3 = v3 .

Definition. For any two vectors u = (u1 , u2 , u3 ) and v = (v1 , v2 , v3 ) in R3 , we define their sum to be

u + v = (u1 , u2 , u3 ) + (v1 , v2 , v3 ) = (u1 + v1 , u2 + v2 , u3 + v3 ).

Definition. For any vector u = (u1 , u2 , u3 ) in R3 and any scalar c ∈ R, we define the scalar multiple
to be

cu = c(u1 , u2 , u3 ) = (cu1 , cu2 , cu3 ).

The following two results are the analogues of Propositions 4A and 4B. The proofs are essentially
similar.

Chapter 4 : Vectors page 7 of 24


< 08 >
Linear Algebra 
c W W L Chen, 1982, 2008

Problems for Chapter 4

1. For each of the following pairs of vectors in R2 , calculate u + 3v, u · v, u − v and find the angle
between u and v:
a) u = (1, 1) and v = (−5, 0) b) u = (1, 2) and v = (2, 1)

2. For each of the following pairs of vectors in R2 , calculate 2u − 5v, u − 2v, u · v and the angle
between u and v (to the nearest degree):
a) u = (1, 3) and v = (−2, 1) b) u = (2, 0) and v = (−1, 2)

3. For the two vectors u = (2, 3) and v = (5, 1) in the 2-dimensional euclidean space R2 , determine
each of the following:
a) u − v b) u
c) u · (u − v) d) the angle between u and u − v

4. For each of the following pairs of vectors in R3 , calculate u + 3v, u · v, u − v, find the angle
between u and v, and find a unit vector perpendicular to both u and v:
a) u = (1, 1, 1) and v = (−5, 0, 5) b) u = (1, 2, 3) and v = (3, 2, 1)

5. Find vectors v and w such that v is parallel to (1, 2, 3), v + w = (7, 3, 5) and w is orthogonal to
(1, 2, 3).

6. Let ABCD be a quadrilateral. Show that the quadrilateral obtained by joining the midpoints of
adjacent sides of ABCD is a parallelogram.
[Hint: Let a, b, c and d be vectors representing the four sides of ABCD.]

7. Suppose that u, v and w are vectors in R3 such that the scalar triple porduct u · (v × w) = 0. Let

v×w w×u u×v


u = , v = , w = .
u · (v × w) u · (v × w) u · (v × w)

a) Show that u · u = 1.
b) Show that u · v = u · w = 0.
c) Use the properties of the scalar triple product to find v · v and w · w, as well as v · u, v · w,
w · u and w · v.

8. Suppose that u, v, w, u , v and w are vectors in R3 such that u · u = v · v = w · w = 1 and


u · v = u · w = v · u = v · w = w · u = w · v = 0. Show that if u · (v × w) = 0, then

v×w w×u u×v


u = , v = , w = .
u · (v × w) u · (v × w) u · (v × w)

9. Suppose that u, v and w are vectors in R3 .


a) Show that u × (v × w) = (u · w)v − (u · v)w.
b) Deduce that (u × v) × w = (u · w)v − (v · w)u.

10. Consider the three points P (2, 3, 1), Q(4, 2, 5) and R(1, 6, −3).
a) Find the equation of the line through P and Q.
b) Find the equation of the plane perpendicular to the line in part (a) and passing through R.
c) Find the distance between R and the line in part (a).
d) Find the area of the parallelogram with the three points as vertices.
e) Find the equation of the plane through the three points.
f) Find the distance of the origin (0, 0, 0) from the plane in part (e).
g) Are the planes in parts (b) and (e) perpendicular? Justify your assertion.

Chapter 4 : Vectors page 23 of 24

You might also like