<<

Lecture 3 Spaces

Layali Al-Mashhadani E-post: [email protected]

MAA150, autumn 2018 Mälardalen University

19 Nov. 2018

Contents of the lecture 1. Vectors in 2-Spaces, 3-Spaces, and n-Spaces 2. , , and distance in Rn 2.1 Norm of a Vector 2.2 Linear Combinations of Standard Unit Vectors 2.3 Dot Product 2.4 Dot Products as Multiplication 3. 3.1 Orthogonal Vectors 3.2 Point- 3.3 Projection Theorem 3.4 Distance Between a Point and a 3.5 Distance Between Parallel Planes

1

1. Vectors in 2-Spaces, 3-Spaces, and n-Spaces

Definition A quantity that has magnitude as well as direction is called a vector. A vector 푣⃑ in the figure below simply means the displacement from the initial point A to the terminal point B. 푣⃑ = 퐴퐵

Algebra operations on vectors - Vector Addition If v and w are vectors in 2-space or 3-space, Then 풗 + 풘 = 풘 + 풗

- Vector Subtraction Vector Subtraction The negative of a vector v, denoted by − v, is the vector that has the same length as v but is oppositely directed, and the difference of v from w, denoted by w − v, is taken to be the sum w − v = w + (−v)

Definition n Vectors v = (v1, v2, . . . , vn) and w = (w1,w2, . . . , wn) in R are said to be equivalent (also called equal) if v1 = w1, v2 = w2, . . . , vn = wn We indicate this by writing v = w.

- Equality of Vectors Definition n If v = (v1, v2, . . . , vn) and w = (w1,w2, . . . , wn) are vectors in R , and if k is any scalar, then we define

v + w = (v1 + w1, v2 + w2, . . . , vn + wn) kv = (kv1, kv2, . . . , kvn) −v = (−v1, −v2, . . . ,−vn) w − v = w + (−v) = (w1 − v1, w2 − v2, . . . , wn − vn)

2

Theorem summarizes the most important properties of vector operations.

If u, v, and w are vectors in Rn, and if k and m are scalars, then: u + v = v + u (u + v) + w = u + (v + w) u + 0 = 0 + u = u u + (−u) = 0 k (u + v) = ku + kv (k + m)u = ku + mu k(mu) = (km)u 1u = u

Examples

If 푃⃑⃑⃑1⃑⃑푃⃑⃑⃑2⃑ denotes the vector in 2-space with initial point 푃1 (푥1, 푦1) and terminal point 푃2 (푥2, 푦2), then the components of this vector are given by the formula:

푃⃑⃑⃑1⃑⃑푃⃑⃑⃑2⃑ = (푥2 − 푥1, 푦2 − 푦1)

If 푃⃑⃑⃑1⃑⃑푃⃑⃑⃑2⃑ denotes the vector in 3-space with initial point 푃1 (푥1, 푦1, 푧1) and terminal point 푃2 (푥2, 푦2, 푧2), then the components of this vector are given by the formula:

푃⃑⃑⃑1⃑⃑푃⃑⃑⃑2⃑ = (푥2 − 푥1, 푦2 − 푦1, 푧2 − 푧1)

In the plane: In the plane: 푥2 − 푥1 푥2 − 푥1 푃⃑⃑⃑1⃑⃑푃⃑⃑⃑2⃑ = [ ] 푃⃑⃑⃑1⃑⃑푃⃑⃑⃑2⃑ = [푦2 − 푦1] 푦2 − 푦1 푧2 − 푧1

Theorem

If v is a vector in Rn and k is a scalar, then: 0 v = 0 K 0 = 0 (−1) v = −v

n Definition If w is a vector in R , then w is said to be a of the vectors v1, v2, . . . , vr in Rn if it can be expressed in the form

w = k1v1 + k2v2 +· · ·+kr vr

3 where k1, k2, . . . , kr are scalars. These scalars are called the coefficients of the linear combination. In the case where r = 1, w = k1v1, so that a linear combination of a single vector is just a scalar multiple of that vector.

2. Norm, Dot product, and distance in Rn 2.1 Norm of a Vector If v is a vector in 2-space, then the norm, the length of v, or the magnitude of v is denoted by || v || and is given by: 2 2 ||푣|| = √푣1 + 푣2

If v is a vector in 3-space, then || v || and is given by:

2 2 2 ||풗|| = √푣1 + 푣2 + 푣3

If v is a vector in n-space, then || v || and is given by:

2 2 2 2 ||풗|| = √푣1 + 푣2 + 푣3 + ⋯ 푣푛

- Unit Vectors u A vector of norm 1 is called a unit vector. Generally, if v is any nonzero vector in Rn, then a unit vector that is in the same direction as v is define by

풗 풖 = ||풗||

Example: Finding components of the vector

Find the components of the vector 풗 = 푃⃑⃑⃑1⃑⃑푃⃑⃑⃑2 with initial point 푝1 = (5, −4, 6) and the terminal point 푝2 = (7, −2, 5 ). Then find the unit vector in the same direction of v.

Solution

1. 풗 = 푃⃑⃑⃑1⃑⃑푃⃑⃑⃑2 = (7 − 5, −2 − (−4), 5 − 6) = (2, 2, − 1)

풗 2. 풖 = ||풗||

4

||풗|| = √22 + 22 − (−1)2 = 3

(2, 2,− 1) 2 2 −1 3. Then 풖 = = ( , , ) 3 3 3 3

2 2 2 2 −1 2 Check: ||풖|| = √( ) + ( ) − ( ) = 1 3 3 3

- The Standard Unit Vectors

The standard unit vector in R2 or R3 is the unit vectors in the positive directions of the coordinate axes. i.e. The standard unit vector is given by:

In R2 In R3

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

In Rn

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

2.2 Linear Combinations of Standard Unit Vectors 2 If P1(푥1, 푦1) and P2(푥2, 푦2) are points in R , then the length of the vector 푝⃑⃑⃑1⃑⃑⃑푝⃑⃑⃑2⃑ is equal to the distance d between the two points. i.e. 2 2 2 In R 푑 = ||푝⃑⃑⃑1⃑⃑⃑푝⃑⃑⃑2⃑|| = √(푥2 − 푥1) + (푦2 − 푦1)

3 If P1(푥1, 푦1, 푧1) and P2(푥2, 푦2, 푧2) are points in R , then the length of the vector 푝⃑⃑⃑1⃑⃑⃑푝⃑⃑⃑2⃑ is equal to the distance d between the two points.

3 2 2 2 In R 푑 = ||푝⃑⃑⃑1⃑⃑⃑푝⃑⃑⃑2⃑|| = √(푥2 − 푥1) + (푦2 − 푦1) + (푧2 − 푧1)

n Definition If u = (u1, u2, . . . , un) and v = (v1, v2, . . . , vn) are points in R , then we denote the distance between u and v by d(u, v) and is defined as:

2 2 2 푑(풖, 풗) = ||풖 − 풗|| = √(푢1 − 푣1) + (푢2 − 푣2) + ⋯ + (푢푛 − 푣푛)

5

2.3 Dot Product

Definition If u and v are nonzero vectors in R2 or R3, and if θ is the angle between u and v, then the dot product (also called the Euclidean inner product) of u and v is denoted by u. v and is defined as

풖. 풗 = ‖풖‖‖풗‖ cos 휃

If u = 0 or v = 0, then we define u. v = 0

The angle θ between u and v satisfies 0 ≤ θ ≤ π.

The angle θ between u and v can be calculated by:

풖. 풗 cos 휃 = ‖풖‖‖풗‖

The angle between two vectors u and v is given by

풖. 풗 휃 = 푐표푠−1 ( ) ‖풖‖‖풗‖

And it is representing the direction of the dot product

n Definition If u = (u1, u2, . . . , un) and v = (v1, v2, . . . , vn) are vectors in R , then the dot product (also called the Euclidean inner product) of u and v is denoted by u. v and is defined by u. v = u1v1 + u2v2 +· · ·+unvn

Properties as products of real numbers Dot products have many of the same algebraic properties as products of real numbers.

Theorems

If u, v, and w are vectors in Rn, and if k is a scalar, then: u. v = v. u [Symmetry property] u. (v + w) = u. v + u. w [ Distributive property] k (u. v) = (ku). v [ Homogeneity property] v. v ≥ 0 and v. v = 0 if and only if v = 0 [Positivity property]

If u, v, and w are vectors in Rn, and if k is a scalar, then: 0. v = v. 0 = 0 (u+ v). w = u. w + v. w

6

u. (v − w) = u. v – u. w (u − v). w = u. w – v. w k (u. v) = u. (kv)

Example: Let u= (1, 0, 4), v= (−2, −2, 7). Compute the following: a. u. v b. u. (3v) c. The angle 휃 between u and v

Solution: a. 풖. 풗 = (1, 0, 4). (−2, −2, 7) = 1(-2) +0(-2) + 4(7) = -2 +0 + 28 =26

b. u. (3v) = (1, 0, 4). 3(−2, −2, 7) = (1, 0, 4).(−6, −6, 21)= -6 + 0 + 84= 78

풖.풗 c. 휃 = 푐표푠−1 ( ) ‖풖‖‖풗‖ ‖푢‖ = √12 + 02 + 42 = √17 ‖풗‖ = √(−2)2 + (−2)2 + 72 = √4 + 4 + 49 = √57 26 휃 = 푐표푠−1 ( ) = 33.4o √17√57

Theorems in Rn

If u, v, and w are vectors in Rn, then: ‖푢 + 푣‖ ≤ ‖푢‖ +‖푣‖ [Triangle inequality for vectors] d(u, v) ≤ d(u, w) + d(w, v) [Triangle inequality for distances]

Theorem: Parallelogram for Vectors

If u and v are vectors in Rn, then ‖푢 + 푣‖2 + ‖푢 − 푣‖2 = 2(‖푢‖2 + ‖푣‖2)

Theorem

If u and v are vectors in Rn with the Euclidean inner product, then 1 1 푢. 푣 = ‖푢 + 푣‖2 − ‖푢 − 푣‖2 4 4

7

2.4 Dot Products as Matrix Multiplication There are various ways to express the dot product of vectors using matrix notation. The formulas depend on whether the vectors are expressed as row matrices or column matrices.

Example Verifying that Au.v = u. ATv, where 1 −2 3 −1 −2 퐴 = [ 2 4 1] , 풖 = [ 2] , 풗 = [ 0] −1 0 1 4 5

1 −2 3 −1 7 퐴풖 = [ 2 4 1] [ 2] = [10] −1 0 1 4 5

1 2 −1 −2 −7 퐴푇풗 = [−2 4 0] [ 0] = [ 4] 3 1 1 5 −1

퐴풖. 풗 = 7(−2) + 10(0) + 5(5) = 11

풖. 퐴푇풗 = (−1)(−7) + 2(4) + 4(−1) = 11 Thus, 퐴풖. 풗 = 풖. 퐴푇풗

8

3. Orthogonality

3.1 Orthogonal Vectors Let u and v are two are two nonzero vectors in Rn . Then: - u and v are orthogonal (perpendicular) if 풖. 풗 = 0 - u and v are parallel if 풖. 풗 ≠ 0, i.e. 풖 = 푐풗 for some scaler c

Example: Let u = (−2, 3, 1, 4) and v = (1, 2, 0, −1) in R4. (a) Show that u and v are orthogonal vectors in R4. (b) Let S = {i, j, k} be the set of standard unit vectors in R3. Show that each ordered pair of the vectors in S is orthogonal. Solution: (a) u. v = (−2)(1) + (3)(2) + (1)(0) + (4)(−1) = 0 Hence u. v =0, thus u and v are orthogonal

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

We need to show that i. j = i.k = j.k = 0

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

3.2 Point-Normal Equations

i. Point-Normal Equation of a line in R2

2 If 푷풐푷ퟏ is a line in R through the point Po (xo, yo) and P1(x1, y1) that has a normal n = (a, b)

Then, Point-Normal Equation of the line is given by:

풏 . 푷풐푷ퟏ = ퟎ

a(x − x0) + b(y − y0) = 0

Point-Normal Equation of a line in the origin is given by

ax + by = 0; Where (x0, y0) = (0, 0) n = (a, b) Then (a, b). (x, y) = 0

ii. Point-Normal Equation of a plan in R3 is given by:

3 If 푷풐푷ퟏ is a line in R through the point Po (xo, yo, zo) and P1(x1, y1, z1) that has a normal n = (a, b, c)

Then, Point-Normal Equation of the plan is given by:

a(x − x0) + b(y − y0) + c(z - zo) = 0

9

Point-Normal Equation of a plan in R3through the origin is given by

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

Then (a, b, c). (x, y, z) = 0

Example: Find a point - normal form of the equation of the plane passing through P (−1, 3, −2) and having a normal n = (−2, 1, −1).

Solution: Point-Normal Equation of a plan in R3 is given by

a(x − x0) + b(y − y0) + c(z - zo) = 0

Thus -2 (x – (-1)) + 1(y - 3) + (-1) (z – (-2)) = 0

-2(x + 1) + (y – 3) – (z+2) = 0

3.3 Projection Theorem If u and a are vectors in Rn , and if 풂 ≠ ퟎ.

Then the vector component of u along a is given by

풖. 풂 풑풓풐풋풖 = 풂 풂 ‖풂‖ퟐ

And the vector component of u orthogonal to a is given by

풖. 풂 풖 − 풑풓풐풋풖 = 풖 − 풂 풂 ‖풂‖ퟐ

i. Orthogonal Projection on a Line

2 Example: Find the orthogonal projections of the standard vectors e1 = (1, 0) and e2 = (0, 1) in R on the line L that makes an angle θ with the positive x-axis.

Solution:

풖.풂 푝푟표푗풖 = 풂; 풂 ‖풂‖2 풂 = 푥푖 + 푦푗 In vector form 풂 = 푐표푠휃 푖 + 푠푖푛휃 푗 = (cos 휃, sin 휃) ‖풂‖ = √푐표푠휃2 + 푠푖푛휃2 = 1 So, the orthogonal projection of e1 on a is

풆 . 풂 (1,0). (cos 휃, sin 휃) 푝푟표푗풆ퟏ = ퟏ 푎 = . (cos 휃, sin 휃) = cos 휃 . (cos 휃, sin 휃) 풂 ‖풂‖2 1

= 푐표푠2휃, sin 휃 cos 휃

Similarly,

10

푒 . 푎 (0,1). (cos 휃, sin 휃) 푝푟표푗푒2 = 2 푎 = . (cos 휃, sin 휃) = sin 휃 . (cos 휃, sin 휃) 푎 ‖푎‖2 1

= sin 휃 . (cos 휃 , 푠푖푛2휃)

ii. Vector Component of u Along a

Example: Let u = (2, −1, 3) and a = (4, −1, 2). Find the vector component of u along a and the vector component of u orthogonal to a.

Solution: 1. The vector component of u along a is

푢. 푎 푝푟표푗푢 = 푎 푎 ‖푎‖2 u. a = (2)(4) + (−1)(−1) + (3)(2) = 15

‖푎‖2 = 42 + (−1)2 + 22 = 21

15 20 −5 10 푝푟표푗푢 = (4, −1, 2) = ( , , ) 푎 21 7 7 7

And, the vector component of u orthogonal to a

20 −5 10 6 2 11 푢 − 푝푟표푗푢 = (2, −1, 3) − ( , , ) = (− , − , ) 푎 7 7 7 7 7 7

푢 2. Verify that the vectors 푢 − 푝푟표푗푎 and a are perpendicular We want to show their dot product is zero. 6 2 11 24 2 22 −24 + 2 + 22 (− , − , ) . (4, −1, 2) = (− ) + ( ) + ( ) = = 0 7 7 7 7 7 7 7

3.4 Distance Between a Point and a Plane

2 In R : the distance D between the point P0(x0, y0) and the line ax + by + c = 0 is given by:

|푎푥 + 푏푦 + 푐| 퐷 = 표 표 √푎2 + 푏2

3 In R : the distance D between the point P0(x0, y0, z0) and the plane ax + by + cz + d = 0 is given by:

|푎푥 + 푏푦 + 푐푧 + 푑| 퐷 = 표 표 표 √푎2 + 푏2 + 푐2

11

Example: Find the distance between the point 푝 = (3, 1, −2) and the plain 푥 + 2푦 − 2푧 = 4

Solution:

|푎푥 + 푏푦 + 푐푧 + 푑| 퐷 = 표 표 표 √푎2 + 푏2 + 푐2 i.e. |(1)(3) + (2)(1) + (−2)(−2) + (−4)| |3 + 2 + 4 − 4| 5 퐷 = = = 푖푛 푙푒푛𝑔ℎ푡 푢푛푖푡 √12 + 22 + (−2)2 √9 3

3.5 Distance Between Parallel Planes To measure the distance D between two planes, we can select an arbitrary point in one of the planes and compute its distance to the other plane.

Example: Find the distance between the following parallel planes.

ퟐ풙 − 풚 − 풛 = ퟓ 푎푛푑 − ퟒ풙 + ퟐ풚 + ퟐ풛 = ퟏퟐ

Solution: The distance between the parallel planes V and W is equal to the distance between P0 and W.

i. Find if the two planes are parallel

The two planes are parallel since the dot product of their normal is not equal to zero.

풑풍풂풏풆ퟏ: ퟐ풙 − 풚 − 풛 = ퟓ ⇒ 풏ퟏ = (2, −1, −1)

풑풍풂풏풆ퟐ : − ퟒ풙 + ퟐ풚 + ퟐ풛 = ퟏퟐ ⇒ 풏ퟐ = (−4, 2, 2)

풏ퟏ. 풏ퟐ = (2, −1, −1). (−4, 2, 2) = −8 + (−2) + (−2) = −12 ≠ 0

So: 풑풍풂풏풆ퟏ ∥ 풑풍풂풏풆ퟐ

ii. Find a point on the first plane and then find the distance between this point and the second plane. To find a point on the first plane. Assume x = 0 and y = 0 and plug in eq. of the first plane.

Plane 1: 2푥 − 푦 − 푧 = 5

0 – 0 – z = 5

The point is (0, 0, - 5)

The distance from (0, 0, - 5) to the plane −4푥 + 2푦 + 2푧 = 12 is

12

|푎푥 + 푏푦 + 푐푧 + 푑| 퐷 = 표 표 표 √푎2 + 푏2 + 푐2

|(−4)(0) + (2)(0) + (−5)(2) + (−12)| 퐷 = √(−4)2 + (2)2 + (2)2

0 + 0 − 10 − 12 12 12 6 = = = = = √6 푖푛 푙푒푛𝑔푡ℎ 푢푛푖푡 √16 + 4 + 4 √24 2√6 √6

13