Download Vectors and Matrices – Lecture 2

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

System of linear equations wikipedia , lookup

Matrix multiplication wikipedia , lookup

Bivector wikipedia , lookup

Exterior algebra wikipedia , lookup

Vector space wikipedia , lookup

Laplace–Runge–Lenz vector wikipedia , lookup

Cross product wikipedia , lookup

Covariance and contravariance of vectors wikipedia , lookup

Vector field wikipedia , lookup

Euclidean vector wikipedia , lookup

Matrix calculus wikipedia , lookup

Four-vector wikipedia , lookup

Transcript
Vectors and Matrices – Lecture 2
Dr Mark Kambites
School of Mathematics
13/03/2014
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
1 / 20
How do we recover the magnitude of a vector from its component form?
The magnitude of a = ax i + ay j + az k is given by
|a| =
q
ax2 + ay2 + az2
Example. The magnitude of −2i + 6j + 3k is given by
q
√
(−2)2 + 62 + 32 = 49 = 7.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
2 / 20
A vector with magnitude 1 is called a unit vector.
Example. − 35 i + 54 j is a unit vector. It has magnitude:
s 2 r
9
3 2
4
16
−
+
=
+
= 1.
5
5
25 25
Non-Example.
1
2i
+ 13 j + 14 k is not a unit vector. It has magnitude
s 2 2 r
1 2
1
1
61
+
+
=
6= 1
2
3
4
144
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
3 / 20
Finding Unit Vectors. Given a non-zero vector, we can find a unit vector
parallel to it by scaling it to have the right length.
Specifically, we scale by
1
m
where m is the magnitude of the vector.
Example. Find a unit vector parallel to a = i + 8j + 4k.
√
Note that |a| = 12 + 82 + 42 = 9 so a unit vector parallel to a is
1
1
8
4
× (i + 8j + 4k) = i + j + k.
9
9
9
9
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
4 / 20
Exercises
1. Give the position vector of the point (−2, 4, 1).
2. Give the displacement vector from (2, 5, 4) to (7, 1, 2).
3. Find the magnitude of the vector a = 3i − 4j + 12k
4. For a = 2i − 3j + 7k, b = −i + 2j + 1k and λ = 4, find
1
2
3
a+b
a−b
a + λb
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
5 / 20
4. Scalar and Vector Products
The scalar product (also called the dot product) is an operation which
combines two vectors to give a scalar (a number).
In terms of arrows, the scalar product is defined by
a · b = |a| |b| cos θ
where θ is the angle between the directions of vectors a and b.
b
θ
a
Notice that the angle is always measured by putting the tails of the two
vectors together, and measuring the angle between.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
6 / 20
Example. Find the scalar product of the two vectors a = 4i and b = i + j.
Solution.
b
45◦
a
√
The magnitude of vector a is √42 + 02 = 4.
√
The magnitude of vector b is 12 + 12 = 2.
The angle between a and b is 45◦ .
So, the scalar product a · b is:
a · b = |a| |b| cos θ = 4 ×
Dr Mark Kambites (School of Mathematics)
√
2 × cos 45◦ = 4 ×
COMP11120
√
1
2 × √ = 4.
2
13/03/2014
7 / 20
The definition of a · b given above does not make sense if a = 0 or b = 0
(or both).
This is because 0 has no direction.
Instead we define:
a·0=0=0·a
for all vectors a.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
8 / 20
The value of the angle θ between two vectors determines the sign of their
scalar product:
a · b = |a| |b| cos θ.
Acute Angles. If θ is an acute angle (between 0 and 90◦ ) the scalar
product is positive.
Obtuse Angles. If θ is an obtuse angle (between 90◦ and 180◦ ) the scalar
product is negative.
Right Angles. If θ is exactly 90◦ then the scalar product is 0. Conversely,
if the scalar product of two non-zero vectors is 0 then they are
perpendicular.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
9 / 20
How do we calculate the scalar product of two vectors from their
component forms?
Two dimensions. If a = ax i + ay j and b = bx i + by j then
a · b = ax bx + ay by .
Three dimensions. If a = ax i + ay j + az k and b = bx i + by j + bz k then
a · b = ax bx + ay by + az bz .
Remark/Exercise. You can check that these formulae work even if a = 0
or b = 0.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
10 / 20
Example. Find the scalar product of the two vectors a = 4i and b = i + j.
Solution. Here ax = 4, ay = 0, bx = 1 and by = 1.
The scalar product is
4 × 1 + 0 × 1 = 4.
Example. Find the scalar product of the two vectors a = 4i − 3j + 2k and
b = i + j + 6k.
Solution. Here ax = 4, ay = −3, az = 2, bx = 1, by = 1 and bz = 6.
The scalar product is
4 × 1 + (−3) × 1 + 2 × 6 = 13.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
11 / 20
The two ways to calculate the scalar product combine to give a way of
calculating the angle between two vectors.
We know
a · b = |a| |b| cos θ.
Assuming neither vector is 0 we can divide through by |a| |b|:
cos θ =
a·b
|a| |b|
If we know the component forms of a and b, then we can compute a · b,
|a| and |b|.
So we can compute cos θ and hence θ itself.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
12 / 20
Example. Find the angle between the two vectors a = 2i − j + 3k and
b = i + 6j − 2k.
Solution. Here
a · b = 2 × 1 + (−1) × 6 + 3 × (−2) = −10,
|a| =
q
√
22 + (−1)2 + 32 = 14, and
|b| =
q
√
12 + 62 + (−2)2 = 41.
Thus
cos θ = √
−10
√ = −0.417
14 41
and
θ = cos−1 (−0.417) = 115◦ .
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
13 / 20
Class Exercises
1. Find the scalar product (i + 6j − 2k) · (−2i − j + 4k).
2. Find the angle between the two vectors a = 2i + 3j and b = −i + 6j.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
14 / 20
The following laws apply to scalar products.
a·b=b·a
(“commutativity”)
a · (λb) = λ(a · b) = (λa) · b
(“compatibility with scaling”)
a · (b + c) = a · b + a · c
(“distributivity over addition”)
a · (b − c) = a · b − a · c
(“distributivity over subtraction”)
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
15 / 20
If a and b are non-zero vectors, then it is possible to express a as the sum
of two vectors:
one parallel to b; and
one perpendicular to b
Specifically, we can write
a = aparallel + aperp
where
aparallel =
a·b
|b|2
b
is a vector parallel to b, and
aperp = a − aparallel = a −
a·b
|b|2
b
is a vector perpendicular to b.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
16 / 20
Example. Express a = 7i + 4j as the sum of a vector parallel to
b = 2i + 3j and a vector perpendicular to b.
√
√
Solution. Here a · b = 2 × 7 + 4 × 3 = 26 and |b| = 22 + 32 = 13. So
26
aparallel = √
b = 2(2i + 3j) = 4i + 6j and
( 13)2
aperp = a − aparallel = 7i + 4j − (4i + 6j) = 3i − 2j
so that
7i + 4j = (4i + 6j) + (3i − 2j).
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
17 / 20
The Vector Product
The scalar product gives a way to multiply two vectors and get a scalar.
In three dimensions, there is another way to multiply two vectors which
gives a vector.
The vector product (or cross product) of a and b is written a × b.
Provided a 6= 0 and b 6= 0 it has the following properties:
it is a vector;
it has magnitude |a| |b| sin θ where θ is the angle between a and b;
it is perpendicular to both a and b;
a, b and a × b form a right-handed system.
If a = 0 or b = 0 (or both) then a × b = 0.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
18 / 20
Vector Product in Component Form
If a = ax i + ay j + az k and b = bx i + by j + bz k then
a × b = (ay bz − az by )i + (az bx − ax bz )j + (ax by − ay bx )k.
Example. If a = −2i + 3j + 4k and b = 5i − j − 6k, find the vector
product a × b.
Solution. Here ax = −2, ay = 3, az = 4, bx = 5, by = −1, bz = −6. So:
a × b = (ay bz − az by )i + (az bx − ax bz )j + (ax by − ay bx )k
= [3(−6) − 4(−1)]i + [4 × 5 − (−2)(−6)]j + [(−2)(−1) − 3 × 5]k
= −14i + 8j − 13k.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
19 / 20
Exercise
For c = 2i − 5j − 2k and d = −i + 4j − 3k, evaluate c × d.
Dr Mark Kambites (School of Mathematics)
COMP11120
13/03/2014
20 / 20