<<

3 Two-Dimensional Linear

3.1 Basic Rules Vectors are the way we represent points in 2, 3 and 4, 5, 6, ..., n, ...-dimensional . There even exist of vectors which are said to be infinite- dimensional! A vector can be considered as an object which has a length and a direction, or it can be thought of as a in space, with coordinates representing that point. In terms of coordinates, we shall use the notation µ ¶ x x = y for a column vector. This vector denotes the point in the xy- which is x units in the horizontal direction and y units in the vertical direction from the origin. We shall write xT = (x, y) for the row vector which corresponds to x, and the superscript T is read . This is the which flips between two equivalent represen- tations of a vector, but since they represent the same point, we can sometimes be quite cavalier and not worry too much about whether we have a vector or its transpose. To avoid the problem of running out of letters when using vectors we shall also write vectors in the form

(x1, x2) or (x1, x2, x3, .., xn).

If we write R for real, one-dimensional numbers, then we shall also write R2 to denote the two-dimensional space of all vectors of the form (x, y). We shall use this notation too, and R3 then means three-dimensional space. By analogy, n-dimensional space is the of all n-tuples

{(x1, x2, ..., xn): x1, x2, ..., xn ∈ R} , where R is the one-dimensional number . This n-dimensional space is written Rn.

1 3.2 Vector operations Vectors have several important operations associated with them. Firstly,

1. there is a vector addition

x + y = (x1, x2) + (y1, y2) = (x1 + y1, x2 + y2),

2. and there is

tx = t(x1, x2) = (tx1, tx2),

where t ∈ R is said to be a scalar.

Let us note that the terms scalar and real number are synonyms. Rule 2, , implies that there is always a so-called zero vector. Just set t = 0, 0 = (0, 0) and note that this satisfies x + 0 = x for every vector x.

Example 3.1 To perform vector addition, just add componentwise: viz,

(0, 1) + (0, −1) = (0, 1 − 1) = (0, 0), and (2, 1) + (3, 3) = (2 + 3, 1 + 3) = (5, 4).

Let us note that every vector (x, y) ∈ R2 can be written in the form µ ¶ µ ¶ µ ¶ x 1 0 = x + y . y 0 1

The two vectors that we use to form this decomposition are called vectors and are the building blocks of two-dimensional space and we shall use i and j to denote them. In three-dimensional space, R3, we also have a set of basis vectors and if (x, y, z) ∈ R3 then         x 1 0 0  y  = x  0  + y  1  + z  0  , z 0 0 1

2 Figure 1: The parallelogram law of vector addition

a a+b

b 0 and we shall write this x = xi + yj + zk. Throughout, bold font (x, y, z) is used to denote vectors and Greek mi- nuscules and roman fonts (λ, µ, s, t) are used to denote scalars. You are encouraged to use underlined characters, x, y, z, to denote vectors in order to distinguish them from scalars. Sometimes, you will also see vectors written using an arrow −→x , and you may use this notation too. The operation of vector addition must be well-defined, that is, it must be clear how to perform it. To explain what this means, try and perform the addition 2 + (99, 31) ! This makes no sense, and this is because scalars and vectors are distinct objects. Of course, we can perform the addition

(2, 0) + (99, 31), but (2, 0) and the number 2 are not the same type of object: one is a vector and one is a scalar.

3.3 Scalar Products and

T 2 T 2 If x = (x1, x2) ∈ R and y = (y1, y2) ∈ R , then we define their inner, dot or scalar product x • y by

x • y = x1y1 + x2y2.

3 Example 3.2 For instance, if we recall the basis vectors

i = (1, 0) and j = (0, 1), then x • i = x1 and x • j = x2. Also, i • j = 0. i • i = 1, j • j = 1,

We shall also write the scalar product in the form µ ¶ T y1 x • y = x y = (x1, x2) = x1y1 + x2y2. y2 Example 3.3 µ ¶ µ ¶ µ ¶ 2 9 9 • = (2, 3) = 18 + 3 = 21. 3 1 1

Using the scalar product, we can define the length of a vector as follows.

Definition 3.1 The length of a vector is given by √ |x| = + x • x.

This is also sometimes called the of x. The vector ˆx = x/|x| is called the in the x-direction. The function x 7→ |x|, where x ∈ R, is called the modulus or function and this can be thought of as the length function for one-dimensional vectors!

Example 3.4 The vectors i and j are unit vectors as their length equals one. The length of a number t ∈ R is given by √ |t| = + t2.

This simply means stripping its away, for instance |−5| = 5 and |5| = 5 too.

4 Figure 2: The between two vectors.

a a . b = |a||b| cos( )

b 0

Let us note that if t is a scalar and x a vector, then we have the result |tx| = |t||x|.

Now, the angle θ between two vectors x and y is calculated according to the rule |x||y| cos(θ) = x • y, where we take 0 ≤ θ ≤ π. Example 3.5 The cosine of the angle, θ, between the two vectors (2, 3) and (9, 1) is µ ¶ µ ¶ x • y 1 2 9 21 cos θ = = √ √ • = √ √ . |x||y| 4 + 9 81 + 1 3 1 13 82 Hence θ ≈ 0.8721 radians. Let us now give a mathematical definition of what it means for two vector to lie ‘at right angles’ to one another. Definition 3.2 Two vectors, x and y, are said to be or orthogonal if x • y = 0. The following are examples of orthogonal vectors. Example 3.6 The basis vectors i and j are orthogonal, and the pair {i, j} is called an orthogonal basis for this reason.

Example 3.7 The following are orthogonal pairs of vectors, {(2, 2), (2, −2)}, {(−1, −1), (−2, 2)}, {(1, 1/2), (−1, 2)}.

5 3.4 The Scalar Product Properties The following properties or rules of the scalar product are easily verified from its definition. Suppose that s, t are scalars and x, y and z are vectors, then 1. x • y = y • x, 2. x • (ty) = tx • y, 3. x • (z + y) = x • y + x • z. For example, using only these properties we can prove, in a strict, math- ematical sense, the following . Theorem 3.1 For all vectors x, y ∈ R2, we find |x • y| ≤ |x||y|. Proof 3.1 Let t ∈ R be any scalar, and consider the function of t defined by q(t) = (x + ty) • (x + ty). Using Properties 2 and 3 of the scalar product, we see that q(t) = x • (x + ty) + ty • (x + ty), = x • x + tx • y + ty • x + t2y • y, = |x|2 + 2tx • y + t2|y|2. However, q(t) ≥ 0 since it is the length2 of the vector x + ty, which is necessarily non-negative, and q is a quadratic function of t. Therefore, q has either no real roots or a repeated real root, and its discriminant must therefore be non-positive, so that 4(x • y)2 − 4|x|2|y|2 ≤ 0, and the given inequality follows after taking positive roots. This theorem gives us the important piece of information that the equa- tion for the angle between two vectors, cos(θ) = x • y/|x||y|, always has a solution θ. If you are unsure as to the reasoning in the above proof, the following information may help you.

6 Remark 3.1 Let us recall that the discriminant of the quadratic

at2 + bt + c is the expression b2 − 4ac, and that the solutions to at2 + bt + c = 0 are 1 ³ √ ´ t = −b ± b2 − 4ac . 2a Hence if the discriminant if negative, the given quadratic has no real roots, and if the discriminant is zero then t = −b/2a is a repeated, real root.

3.5 The of a Line 3.5.1 The A unit vector is one way of representing a direction without having to worry about . For instance, if t is a scalar (in R) then as t varies, x `(t) = tˆx = t |x| is a function which represents a line in space along the direction of x which also passes through the origin (0, 0). The length of the vector `(t) is just |t|, that is ¯ ¯ ¯ ¯ ¯ x ¯ ¯ x ¯ |x| |`(t)| = ¯ t ¯ = |t| ¯ ¯ = |t| = |t|. ¯ |x|¯ ¯|x|¯ |x| By shifting this line, which simply means adding another vector to it, we can construct a line between any two points in space. So, let a, b ∈ R2 be any two vectors and define the function

L(t) := ta + (1 − t)b, then L(0) = b and L(1) = a. This is the parametric equation of the line which passes through the two points determined by a and b. We can re- arrange this a little to give

L(t) = b + t(a − b),

7 and if we write dˆ = (a − b)/|a − b|, then L1(t) = b + tdˆ represents the same line as L(t). Note also that the function L¯(t) = L(−t) represents the same line as L! Can you see why?

3.5.2 The Cartesian Equation In the plane, that is for (x, y) in R2, the Cartesian equation of a line takes the form ax + by = c, for some scalars a, b, and c such that |a| + |b| 6= 0. Given the parametric equation of a line, it is possible to find the corresponding Cartesian equation, as follows.

Example 3.8 Find the parametric equation of the line which passes through the two points (2, 2), (4, 5). This is given by the function

`(t) = (2, 2) + t((2, 2) − (4, 5)) = (2, 2) + t(−2, −3).

That is `(t) = (x(t), y(t)) ∈ R2 where

x(t) = 2 − 2t, y(t) = 2 − 3t.

Now, we can eliminate t to give x − 2 y − 2 t = = . −2 −3 Simplifying we find that 3x − 2y = 2, which is the Cartesian equation of the same line.

8 3.6 Scalar Products and Angles

T 3 T 3 If x = (x1, x2, x3) ∈ R and y = (y1, y2, y3) ∈ R then we shall define the inner product x • y by X3 x • y = xiyi. i=1

Example 3.9 For instance x • i = x1, x • j = x2 and x • k = x3. Also,

i • j = i • k = j • k = 0.

The number x • y is said to be the scalar product of the two vectors. It is also called the or inner product and one may also write   y1 T x • y = x y = (x1, x2, x3)  y2  . y3 Example 3.10       2 9 9  3  •  1  = (2, 3, 5)  1  = 18 + 3 − 10 = 11. 5 −2 −2

Definition 3.3 The length of a vector is given by √ |x| = + x • x.

This is also sometimes called the norm of x. The vector x ˆx = |x| is called the unit vector in the x-direction.

For instance, the vectors i, j and k are all unit vectors. Now, the angle θ between two vectors x and y is given according to the rule |x||y| cos(θ) = x • y, and we normally take 0 ≤ θ ≤ π.

9 Example 3.11 The cosine of the angle between (2, 3, 5) and (9, 1, −2) is     2 9 1 √ √ √  3  •  1  = 11/ 38 • 86. 4 + 9 + 25 81 + 1 + 4 5 −2 The following is the way in which we determine whether two vectors are at right angles to each other. Definition 3.4 Two vectors are said to be normal or orthogonal if x • y = 0. Consequently, the unit vectors i, j and k are all orthogonal to each other.

3.7 Planes A plane is the 3-dimensional analogue of lines in 2 . If you can visualise the fact that a line cuts the plane into two parts, so a plane in 3 dimensions cuts space into two parts.

Definition 3.5 A plane Π is a set of points (x, y, z) ∈ R3 which satisfies a relationship of the form ax + by + cz = r. This can be written (a, b, c) • (x, y, z) = r, or a • x = r, (1) where r is a given scalar. The plane Π is said to contain the vector u if and only if a • u = r and (1) is said to be the Cartesian equation of the plane. This is an equation for x when a and r are known. The vector a is said to be the normal vector of the plane Π.

The vector a is called the normal vector of Π because if p ∈ Π is any given member of the plane then, every member x of Π can be written in the form x = p + w where w • a = 0.

10 Figure 3: The normal vector of a plane n.

n

x = p + w w . n = 0 x w p 0

Example 3.12 The set Π of points

{(x, y, z) ∈ R3 : x + 2y − z = 3} defines a plane. If we define the vector a = (1, 2, −1) then we can write

Π = {x ∈ R3 : x • a = 3}.

Example 3.13 If we have the vector a = (−1, 1, 2) then those vectors x ∈ R3 for which x • a = 99 also defines a plane.

Example 3.14 Suppose that we have three vectors x, y and z. If s and t are scalars, then the vector

p(s, t) = x + sy + tz, lies in a particular plane, Π. To see this, suppose that there is a vector n such that

n • y = n • z = 0.

We can now find the plane Π as follows. Using the rules on dot products we have

p(s, t) • n = (x + sy + tz) • n = x • n + sy • n + tz • n = x • n

11 Hence, the function p provides another way of defining the plane

Π = {u ∈ R3 : u • n = x • n}, and we say that p defines the parametric representation of Π. One could say that the range of the function p : R2 → R3 is Π.

Example 3.15 Suppose that we are given the Cartesian representation of the plane Π, Π = {(x, y, z) ∈ R3 : 3x − y + z = 2}, find a function p(s, t) which gives the parametric representation of Π. Now, 3x − y + z = 2 means that every vector in Π has the form

(x, 3x + z − 2, z), simply because y = 3x + z − 2, and remember that x and z are arbitrary scalars. But we can write this vector in the form

(x, 3x + z − 2, z) = x(1, 3, 0) + z(0, 1, 1) + (0, −2, 0).

This means that we simply have to define

p(s, t) = s(1, 3, 0) + t(0, 1, 1) + (0, −2, 0).

Remark 3.2 Note that a line ` in space (R3) is always the of two planes, that is

© 3 ª ` = x ∈ R : a1 • x = r1, a2 • x = r2 , which is the same as the intersection \ © 3 ª © 3 ª x ∈ R : a1 • x = r1 x ∈ R : a2 • x = r2 .

It is not always true that the intersection of two planes is a line. For in- stance, if we have a plane Π, then Π ∩ Π = Π is also a plane, and the intersection of two planes is null set ∅ (or )!

12 Figure 4: The length of a vector product is the of a parallelogram : |a||b| sin(θ) = |a × b|.

3.8 The Vector Product Definition 3.6 Given two vectors

3 a = (a1, a2, a3), b = (b1, b2, b3) ∈ R , their vector product is a third vector c ∈ R3, written

c = a × b, which satisfies

1. a • (a × b) = 0, (ie the direction of a × b is to a)

2. |a × b| = |a||b| sin(θ), (the length of a × b is defined) where θ is the angle between a and b.

1. We may also write property 2 of this as

|a × b|2 = |a|2|b|2 − (a • b)2

because a • b = |a||b| cos(θ).

2. It follows that the length |a × b| is also the area of the parallelogram with vertices situated at 0, a, b and a + b.

3. This says that the vector product a × b is a vector which is orthogonal to both a and b which has a length that we can easily determine.

13 Of course, given any two vectors in R3, there is always an infinity of vectors which are orthogonal to the other two. Can you think why?

Theorem 3.2 The vector product of a and b, a×b, is given by the symbolic ¯ ¯ ¯ ¯ ¯ i j k ¯ ¯ ¯ a × b = ¯ a1 a2 a3 ¯ = i(a2b3 − a3b2) − j(a1b3 − a3b1) + k(a1b2 − a2b1). ¯ b1 b2 b3 ¯

We also observe the following properties.

1. a × b = −b × a,

2. and if t is a scalar then a × (tb) = (ta) × b = t(a × b).

From 1. it follows that a × a = 0.

Example 3.16 Suppose

b = (3, 1, −1), a1 = (1, 2, 1) and a2 = (−1, 2, 1).

If s and t are scalars then for all scalars s and t, the vector

p(s, t) = b + sa1 + ta2 lies in a particular plane Π. Let us compute the vector a1 × a2, for we will be able to conclude that

p(s, t) • a1 × a2 = (b + sa1 + ta2) • a1 × a2

= b • a1 × a2 + s(a1 • a1 × a2) + t(a2 • a1 × a2)

= b • a1 × a2.

So, ¯ ¯ ¯ ¯ ¯ i j k ¯ ¯ ¯ a1×a2 = ¯ 1 2 1 ¯ = i(2×1−2×1)−j(1×1−1×(−1))+k(1×2−2×(−1)), ¯ −1 2 1 ¯

14 which is the vector (0, −2, 4), and we find

b • a1 × a2 = (3, 1, −1) • (0, −2, 4) = −2 − 4 = −6. Hence, the plane Π is given by those (x, y, z) for which

(0, −2, 4) • (x, y, z) = −2y + 4z = −6, or Π = {(x, y, z) ∈ R3 :(x, y, z) • (0, 1, −2) = 3}.

Example 3.17 Find the Cartesian equation of the plane which has normal vector (2, 4, 1) and which contains the point (4, 4, 4) ∈ R3. This is a question of finding (x, y, z) such that (2, 4, 1) • (x, y, z) = r and (2, 4, 1) • (4, 4, 4) = r. This tells us that the Cartesian equation of the plane is

2x + 4y + z = 8 + 16 + 4 = 28.

Example 3.18 Find the parametric equation of the plane

Π = {(x, y, z) ∈ R3 : 2x + 3y − z = −1.}

So, z = 2x + 3y + 1 and therefore (x, y, z) = (x, y, 2x + 3y + 1), and we can decompose this as (x, y, 2x + 3y + 1) = x(1, 0, 2) + y(0, 1, 3) + (0, 0, 1). Hence, the parametric equation of the plane is given by

p(s, t) = s(1, 0, 2) + t(0, 1, 3) + (0, 0, 1).

3.9 Definition 3.7 Two non-zero vectors a and b ∈ R3 are said to be linearly independent if and only if a × b 6= 0. If a × b = 0 then a = sb for some scalar s, and a and b are said to be linearly dependent.

Theorem 3.3 If two vectors a and b ∈ R3 are linearly independent then every vector x ∈ R3 can be written in the form

x = s1a + s2b + s3(a × b) where s1, s2 and s3 are scalars.

15 Because of the property expressed in this theorem, if a and b ∈ R3 are linearly independent then we say that the set

{a, b, a × b} forms a basis for R3.

Example 3.19 Of course, it seems reasonable that

i, j and k are linearly independent. This is indeed true, as can be easily verified.

Example 3.20 Let us consider an example where the coefficients s1, s2 and s3 can be explicitly calculated in terms of the vector x. Suppose that a•b = 0 and x = s1a + s2b + s3(a × b). Then 2 a • x = a • (s1a + s2b + s3(a × b)) = s1|a| and 2 b • x = b • (s1a + s2b + s3(a × b)) = s2|b| . In addition,

2 2 2 a × b • x = (a × b) • (s1a + s2b + s3(a × b)) = s3|a × b| = s3|b| |a| .

In other words x • a x • b x • a × b x = a + b + a × b. |a|2 |b|2 |a|2|b|2 This becomes rather expressive when all of the vectors have unit length. In this case we have

x = (x • a)a + (x • b)b + (x • a × b)a × b.

The coefficient x • a × b is so important in its own right that we give it a name. It is called the triple scalar product of x, a and b.

16 3.10 Triple Products Definition 3.8 Given three vectors

3 a = (a1, a2, a3), b = (b1, b2, b3), c = (c1, c2, c3) ∈ R , their triple scalar product is the scalar value given by

[a, b, c] = a • (b × c) .

Remark 3.3 The triple product could equally have been defined by the ex- pression a • b × c, in the sense that the parentheses used in the above definition have no partic- ular meaning. This is because there is no ambiguity present in a • b × c, as the expression (a • b) × c is itself meaningless. This is because you cannot perform a vector product with a scalar and a vector; you need two vectors to perform a scalar product!

One can verify that

1. [a, a, c] = 0 and

2. [a, c, b] = −[a, b, c].

Definition 3.9 Three vectors a, b and c in R3 are said to be linearly inde- pdendent if and only if a • b × c 6= 0. This is equivalent to saying that the 3 × 3 A whose columns are these vectors,

A = [a | b | c] , satisfies det(A) 6= 0.

Theorem 3.4 If the two vectors a, b in R3 are linearly independent in the sense that a × b 6= 0, then the three vectors a, b and a × b are also linearly independent, in the sense that [a, b, a × b] 6= 0.

17 Figure 5: A parallelpiped formed from three linearly independent vectors x, y and z.

3.11 Parallelpipeds and Projections Geometrically speaking, linear independence of the vectors a, b and c implies that the set {ra + sb + tc : r, s, t ∈ R} is a three-dimensional object. Indeed, the set

P = {ra + sb + tc : 0 ≤ r, s, t ≤ 1} is called a parallelpiped (pronounced ‘parallel-pipe-edd’), and using the triple scalar product we can calculate the volume of P . To do this we need some preliminary concepts, so suppose that x and y are two vectors in R2 or R3. The orthogonal projection of y onto x is given by ³x • y´ P (y) = x. x x • x This definition arises because if we suppose that y is some vector written in the form y = λx + u, where u • x = 0, then y • x = λx • x + x • u. This simplies to give y • x = λ. x • x 18 Figure 6: The projection of a along b.

Then Px(y) := λx is said to be the projection of y onto the vector x along u. Note that the length of the projection is given by ¯³ ´ ¯ ¯³ ´¯ ¯ x • y ¯ ¯ x • y ¯ |x • y| |x • y| |y||x| |P (y)| = ¯ x¯ = ¯ ¯ |x| = |x| = ≤ , x x • x x • x |x|2 |x| |x| so that |Px(y)| ≤ |y|.

Theorem 3.5 The three vectors x, y and z form a parallelpiped which has (signed) volume given by the triple product

[x, y, z].

Consequently, there is a plane Π such that x, y and z all lie in Π if and only if [x, y, z] = 0.

Proof 3.2 Given three linearly independent vectors x, y and z in R3 we can form a parallepiped, P , from them and the base of P is given by the parallel- ogram formed from y and z. The area of the base is therefore |y × z|. Now the vertical height of the parallelpiped is the length of the projection of x onto y × z. This is shown in Figure 5 where the vertical height of the given is the projection of the vector z onto the unit normal associated with the plane

19 which is determined by x and y. The volume of P , vol(P ), is therefore the area of the base times the vertical height, or

vol(P ) = ||y × z||Py×z(x)|| , and this simplifies ¯ ¯ ¯ x • y × z¯ vol(P ) = ¯|y × z| ¯ = |x • y × z| . ¯ |y × z| ¯

20