Você está na página 1de 140

Calculus III

Week Theory Topics


1 Three dimensional coordinate systems, vectors, the dot product, the cross
product, mixed product, lines and planes in space
2 Functions and planes, Cylindrical and Spherical coordinates
3 Vector functions, derivatives and integration of vector functions
4 Arc length and curvature, motion in space, Parametrized surfaces
5 Triple integrals and their applications
6 Triple integrals in Cylindrical and Spherical coordinates
7 Substitutions in triple integrals
8 Integration in vector fields
9 Vector fields, work, circulation, and flux, path independence, potential
functions and, conservative fields, Green's theorem in the Plane
10 Rotational and divergence
11 Surface area and surface integrals, Parametrized surfaces
12 Stokes' theorem
13 The divergence theorem
14 General Review
Reference
CALCULUS III, Paul Dawkins. Pdf, http://tutorial.math.lamar.edu/terms.aspx
THREE DIMENSIONAL COORDINATE
SYSTEMS, VECTORS, THE DOT PRODUCT,
THE CROSS PRODUCT, MIXED PRODUCT,
LINES AND PLANES IN SPACE
Overview

■ Coordinates, points, vectors.


■ Matrices.
THE THREE-DIMENSIONAL
COORDINATE SYSTEM

Istanbul, 2017
1.Cartesian Coordinate
nD Space
nD Space: n (typically)
n: number of dimensions
Examples:
■ 1D space: time, along a line or curve
■ 2D space: plane, sphere
■ 3D space: the world we live in
■ 4D space: 3D + time
Solid Analytic Geometry

■ The Cartesian plane (rectangular coordinate system) is


determined by 2 perpendicular number line (x- and y-
axis) and their point of intersection (the origin).
■ To identify a point in space, we need a third dimension.
The geometry of this three-dimensional model is called
solid analytic geometry.
■ The 3-D coordinate system is formed by passing a z-axis
perpendicular to both the x- and y-axes at the origin.
Coordinate Planes

Notice we draw the x- and y-axes in


the opposite direction

X = directed distance from yz-plane to


some point P
(x,y,z)
Y= directed distance from xz-plane to
some point P

Z= directed distance from xy-plane to


some point P

So, to plot points you go out, over, up/down


Coordinate System "Handedness"
In a 2-D coordinate system the X axis generally points from left to right, and the
Y axis generally points from bottom to top. ( Although some windowing systems
will have their Y coordinates going from top to bottom. )
When we add the third coordinate, Z, we have a choice as to whether the Z-axis
points into the screen or out of the screen:
Coordinates
2D Cartesian coordinates:

y (x,y) (x,y)

x
Standard Screen (output, input)
Octants
■ The 3-D system can have either a right-handed or
a left-handed orientation.

 If We’re only using the right-handed orientation meaning


that the octants (quadrants) are numbered by rotating
counterclockwise around the positive z-axis.
 There are 8 octants.
Octants:
See Cube placed in the Cartesian system
2.Polar coordinates
The polar coordinates r (the radial coordinate) and θ (the
angular coordinate, often called the polar angle) are defined in
terms of Cartesian coordinates by
x  r cos 
y  r sin 
y (x,y) Angle  : in radians
Where r is the radial distance from the origin,
r and θ is the counterclockwise angle from the
 x-axis. In terms of x and y.

𝑟= 𝑥2 + 𝑦2
x
𝑦
𝜃 = tan−1
𝑥
Then a points are represented by a radius (r) and an angle (θ)
Points on a Plane

 Rectangular coordinate system


 Represent a point by two distances from the
(x, y)
origin. •
 Horizontal dist., Vertical dist.

 Also possible to represent different ways


Consider using dist. from origin, angle
formed with positive x-axis (r, θ)
• θ

r
14
First of all you can go back and forth between
Cartesian and polar coordinates by the familiar

x  r cos    r  x 2  y 2

y  r sin     arctan( y / x)
Converting Polar to Rectangular

 Given polar coordinates (r, θ)


 Change to rectangular
r

y
 By trigonometry θ

 x = r cos θ x
y = r sin θ
Example:

 Try A   2,  = ( ___, ___ )
 
 4
16
Converting Rectangular to Polar

 Given a point (x, y) r



 Convert to (r, θ) y
θ

 By Pythagorean theorem x

r 2 = x2 + y2

y
By trigonometry   tan
1

x
Example:
 Try this one … for (2, 1)
 r = ______
 θ = ______
17
Example:
Write Polar Equation in Rectangular Form

 Given r = 2 sin θ x  r cos 


 Write as rectangular y  r sin 
equation y
 tan 1 
 Use definitions x
 And identities r 2  x2  y 2

18
Answer:
Write Polar Equation in Rectangular Form

 Given r = 2 sin θ

 We know r y
 sin  
2 r
 Thus
r  2y
2

 And x2  y 2  2 y

19
Example:
Write Rectangular Equation in Polar Form

 Consider 2x – 3y = 6 x  r cos 
y  r sin 
 As before, use y
definitions  tan 1 
x
r 2  x2  y 2
2  r cos   3  r sin   6
r  2 cos   3sin    6
6
r
 2 cos   3sin  
20
Problem 1: Convert Equation from Rectangular to Polar Form
2x 2 + 2y 2 - x + y = 0
Let us rewrite the equations as follows:
2 (x 2 + y 2) - x + y = 0
We now use the formulas giving the relationship between
polar and rectangular coordinates:
R 2= x 2 + y 2, y = R sin t and x = R cos t:

2 (R 2) - R cos t + R sin t = 0

Factor out R
R (2 R - cos t + sin t) = 0
The above equation gives:
R=0
or
2 R - cos t + sin t = 0
The equation R = 0 is the pole. But the pole is included in the graph of the
second equation 2 R - cos t + sin t = 0 (check that for t = π / 4 , R = 0). We
therefore can keep only the second equation.
2 R - cos t + sin t = 0
Or: R = (1 / 2)(cos t - sin t) 21
Problem 2: Convert the equation x + y = 0 to polar
form.

Solution to Problem 2: x + y = 0
R cos t + R sin t = 0
Factor out R: R ( cos t + sin t ) = 0
The above equation gives: R = 0
or cos t + sin t = 0
The equation R = 0 is the pole. But the pole is included in the
graph of the second equation cos t + sin t = 0 since this equation
is independent of R. We therefore keep only the second
equation.
cos t + sin t = 0
The above equation may be written as.
tan t = - 1
Solve for t to obtain: t = 3 pi / 4
All points of the form (R , 3 pi / 4) are on the graph of the above
equation.
It is the equation of a line in polar form.

22
3D coordinates 1
3D Cartesian coordinates:

z (x,y,z) (x,y,z)
z

y x
x y

Right-handed Left-handed
3D Cartesian coordinates 1a
3D coordinates 2
3D Cartesian coordinates:

z (middle) (x,y,z) z (middle) (x,y,z)

x (thumb) y (index)
y (index) x (thumb)

Right-handed Left-handed
3D coordinates 3
Spherical coordinates, also called spherical polar coordinates

Define θ to be the azimuthal angle in the x y -plane from the x-axis with 0≤ 𝜃 < 2𝜋
(denoted λ when referred to as the longitude), ф to be the polar angle (also known
as the zenith angle and colatitude, with ф=90𝑜 − 𝛿 where 𝛿 is the latitude) from
the positive z-axis with 0≤ ∅ ≤ 𝜋, and r to be distance (radius) from a point to
the origin. This is the convention commonly used in mathematics.
Spherical coordinates
The spherical coordinates (r,θ,Φ) are related to the Cartesian coordinates
(x,y,z) by:

𝑟= 𝑥2 + 𝑦2 + 𝑧2
𝑦
𝜃 = tan−1
𝑥
𝑧
∅ = cos−1
𝑟

Where r∈ 0, ∞ , 𝜃 ∈ 0,2𝜋 , and ∅ ∈ 0, 𝜋

and the inverse tangent must be suitably defined to take the


correct quadrant of (x,y) into account.
Spherical coordinates
In terms of Cartesian coordinates,

x  r cos sin 
y  r sin  sin 
z  r cos
z (x,y,z)

r  : azimuth or longitude
x  y  : elevation or latitude

Also :    / 2  
 : colatitude
3D coordinates 3a
AZIMUTH
Points

■ Point: position in nD space


■ Notation: P, also P, p, p or p
■ (x, y, z), also (x1, x2, x3), (Px, Py, Pz),
(r, , z), (r, , ), …
Plotting Points in Space

■ Plot the points:


■ (2,-3,3)
■ (-2,6,2)
■ (1,4,0)
■ (2,2,-3)

Draw a sideways x, then put a


perpendicular line through the
origin.
Formulas
■ You can use many of the same formulas that you
already know because right triangles are still
formed.
1 Vectors in the Plane
What You Should Learn here?
• Represent vectors as directed line segments.
• Write the component forms of vectors.
• Perform basic vector operations and represent
vectors graphically.
• Write vectors as linear combinations of unit
vectors.
• Find the direction angles of vectors.
• Use vectors to model and solve real-life
problems.

34
Introduction
Many quantities in geometry and physics, such as area,
time, and temperature, can be represented by a single real
number. Other quantities, such as force and velocity,
involve both magnitude and direction and cannot be
completely characterized by a single real number. To
represent such a quantity, you can use a directed line
segment, as shown in Figure 1.

Figure 1

35
Introduction
The set of all directed line segments that are equivalent to a
given directed line segment is a vector v in the plane,
written (meaning start at P and go towards/through Q):

Vectors are denoted by lowercase, boldface letters such as


u, v and w.

36
Example 1 – Equivalent Directed Line Segments

Let u be represented by the directed line segment from

P(0, 0) to Q(3, 2)

and let v be represented by the directed line segment from

R(1, 2) to S(4, 4)

as shown in Figure 2.
Show that u = v.

Figure 2
37
Example 1 – Solution
From the Distance Formula, it follows that and have the
same magnitude.

Moreover, both line segments have the same direction,


because they are both directed toward the upper right on lines
having the same slope.

So, and have the same magnitude and direction, and it follows that u = v.

38
Component Form of a Vector

39
Component Form of a Vector
The directed line segment whose initial point is the origin is
often the most convenient representative of a set of
equivalent directed line segments. This representative of
the vector v is in standard position.

A vector whose initial point is at the origin (0, 0) can be


uniquely represented by the coordinates of its terminal
point (v1, v2). This is the component form of a vector v,
written as:

40
Component Form of a Vector
The coordinates v1 and v2 are the components of v. If both
the initial point and the terminal point lie at the origin, then
v is the zero vector and is denoted by

41
Component Form of a Vector
Two vectors and are equal if and
only if u1 = v1 and u2 = v2.

For instance, in Example 1, the vector u from P(0, 0) to


Q(3, 2) is

and the vector v from R(1, 2) to S(4, 4) is

42
Example 1 – Finding the Component Form of a Vector

Find the component form and magnitude of the vector v


that has initial point (4, –7) and terminal point (–1, 5).

Solution:
Let

P(4, –7) = (p1, p2)

and

Q(–1, 5) = (q1, q2)

as shown in Figure 3.
Figure 3
43
Example 1 – Solution cont’d

Then, the components of are

v1 = q1 – p1 = –1 – 4 = – 5

v2 = q2 – p2 = 5 – (–7) = 12.

So, and the magnitude of v is

= 13.
44
Vector Operations

45
Vector Operations
The two basic vector operations are scalar multiplication
and vector addition. Geometrically, the product of a
vector v and a scalar k is the vector that is |k| times as long
as v. If k is positive, then kv has the same direction as v,
and if k is negative, then kv has the opposite direction of v,
as shown in Figure 6.21.

Figure 6.21
46
Vector Operations
To add two vectors u and v geometrically, first position
them (without changing their lengths or directions) so that
the initial point of the second vector v coincides with the
terminal point of the first vector u (head to tail). The sum
u+v is the vector formed by joining the initial point of the
first vector u with the terminal point of the second vector v,
as shown in Figure 4.

Figure 4
47
Vector Operations
The vector u + v is often called the resultant of vector
addition

48
Vector Operations
The negative of is

–v = (–1)v
Negative

and the difference of u and v is

u – v = u + (– v) Add (–v). See figure 6.23.

Difference

49
Example 3 – Vector Operations
Let and and find each of the
following vectors.

a. 2v b. w – v c. v + 2w

Solution:
a. Because you have

A sketch of 2v is shown in Figure 5. Figure 5

50
Example 3(b) – Solution cont’d

The difference of w and v is

A sketch of w – v is shown in
Figure 6. Note that the figure
shows the vector difference
w – v as the sum w + (– v).

Figure 6
51
Example 3(c) – Solution cont’d

The sum of v and 2w is

A sketch of v + 2w is shown in
Figure 7. Read next slide, but do
not copy it down.
Figure 7
52
Vector Operations

53
Unit Vectors

54
Unit Vectors
In many applications of vectors, it is useful to find a unit
vector that has the same direction as a given nonzero
vector v. To do this, you can divide v by its length to obtain:

Unit vector in direction of v

Note that u is a scalar multiple of v. The vector u has a


magnitude of 1 and the same direction as v. The vector u is
called a unit vector in the direction of v.

55
Example 4 – Finding a Unit Vector
Find a unit vector in the direction of .

Solution:
The unit vector in the direction of v is

56
Example 4 – Solution cont’d

57
Unit Vectors
The unit vectors and are called the standard
unit vectors and are denoted by

and

as shown in Figure 8. (Note that


the lowercase letter is written in
boldface to distinguish it from the
imaginary number )

Figure 8
58
Unit Vectors
These vectors can be used to represent any vector
as follows.

The scalars v1 and v2 are called the horizontal and


vertical components of v, respectively. The vector sum
is called a linear combination of the vectors
i and j. Any vector in the plane can be written as a linear
combination of the standard unit vectors i and j.
59
Example 5 – Writing a Linear Combination of Unit Vectors

Let u be the vector with initial point (2, –5) and terminal
point (–1, 3). Write u as a linear combination of the
standard unit vectors i and j.

Solution:
Begin by writing the component form of the vector u.

60
Direction Angles

61
Direction Angles
If u is a unit vector such that  is the angle (measured
counterclockwise) from the positive x-axis to u, then the
terminal point of u lies on the unit circle and you have as:

shown in Figure 9. The


angle  is the direction
angle of the vector u.
Read two next slides, but
do not copy them down.

Figure 9 62
Direction Angles
Suppose that u is a unit vector with direction angle . If
is any vector that makes an angle  with the
positive x-axis, then it has the same direction as u and you
can write:

For instance, the vector v of length 3 that makes an angle


of 30 with the positive x-axis is given by

where
63
Direction Angles
Because it follows
that the direction angle  for v is determined from

Quotient identity

Multiply numerator and


denominator by

Simplify.

64
Example 7 – Finding Direction Angles of Vectors

Find the direction angle of the vector.

u = 3i + 3j

Solution:
The direction angle is

So,  = 45, as shown in Figure 10.

Figure 10

65
Vectors
•Vector Equation of a Line
a=xi+yj+zk
Revise: Position Vectors
z A In 2D and 3D, all points
have position vectors
a
y
e.g. The position vector of point A

 x
o  
a   y
z
 

x a = xi + yj + zk
Revise: Parallel Vectors
-20 i + 30 j

-10 i + 15 j 2a

-2 i + 3 j
Vectors with a scaler
applied are parallel
1/ a
5
i.e. with a different
magnitude but same
direction
Vector Equation of a line (2D)

A
a (any point Any parallel vector (to line)
it passes
through)

o
x
A line can be identified by a linear combination
of a position vector and a free vector
Vector Equation of a line (2D)

Any parallel vector to line

A
a (any point
it passes
through)
o
x
A line can be identified by a linear combination
of a position vector and a free vector
Vector Equation of a line (2D)
A line can be identified by a linear combination
y of a position vector and a free vector

b = pi + qj
A

parallel vector to line


a = xi + yj
o x t is a scaler
- it can be any number,
since we only need a parallel vector
E.g. a + tb
= (xi + yj) + t(pi + qj)
(1)Vector Equation of a y = mx + c
1. Position vector to
any point on line y=x+2
[] 1
3
2. A free vector parallel
to the line []2
2
[] 2
2
[]
1
3
3. linear combination
of a position vector
and a free vector
[] [] []
x
y
= 1 +t
3
2
2
Equation Scaler (any number)
(2) Vector Equation of a y = mx + c
1. Position vector to
any point on line y=x+2
[] 4
6
[]
-3
-3
2. A free vector parallel
to the line
[]-3
-3
[] 4
6
3. linear combination
of a position vector
and a free vector
[] [] []
x
y
= 4 +t
6
-3
-3
Equation Scaler (any number)
(3) Vector Equation of a y = mx + c
1. Position vector to
any point on line y = 1/2 x + 3
[] 2
4
2. A free vector parallel
to the line
[]4
2

[]4
2
[]2
4
3. linear combination
of a position vector
and a free vector
[] [] []
x
y
= 2
4
+t 4
2
Equation Scaler (any number)
Sketch this line and find its equation

[] [] []
x
y
= 1 +t
2
1
3 y = 3x - 1

When t=0

[] []
x
y
=
1
2
[]1
3

x=1, y=2 []
1
2

When t=1

[] []
x
y
= 2
5
x=2, y=5
Equations of straight lines

y = 3x - 1
….. is a Cartesian Equation
of a straight line

[ ] =[ ] [ ]
x
y
1
2
+t
1
3

….. is a Vector Equation


of a straight line
Often written …….
r =[ 1
2] []
+t
1
3
r is the position vector of
any point R on the line
Any Direction
point
Convert this Vector Equation into Cartesian form

r =[ 7
3
+t] [] 2
5

Increase in y the direction vector


Gradient =
Increase in x

Gradient (m) = 5 / 2 = 2.5

[ ] =[ ] [ ]
x 7 2 Equations of form y= mx+c
y 3 +t 5
y= 2.5x + c
When t = 0
3 = 2.5 x 7 + c
[][]
x
y = 3
7 x=7
y=3
c = -14.5
y= 2.5x – 14.5
Convert this Vector Equation into Cartesian form (2)

r =[ ] []
7
3
+t
2
5

[ ] =[ ]+ t [ ]
x
y
7
3
2
5

Convert to x = 7 + 2t
Parametric
equations y = 3 + 5t
5x = 35 + 10t
Eliminate ‘t’ 2y = 6 + 10t

subtract 5x – 2y = 29
Convert this Cartesian equation into a Vector equation

y = 4x + 3 Want something
like this ……….
r =[ a
] []
b +t
1
m
Any
point the
When x=0, y = 4 x 0 + 3 = 3 direction
vector
[]
0
3
= Any
point
(y-b)=m(x-a)
(𝑦 − 3) = 4(𝑥 − 0)

Increase in y = 4
Gradient (m) = 4 Gradient =
Increase in x 1

[]1 represents

r =[
4 the direction 0
] []
3 +t
1
4
Convert this Cartesian equation into a Vector equation
Easier Method

y = 4x + 3

Write: y - 3 = 4x = t

t = 4x x= 1/
4 t
t=y-3 y= 3 + t

[ ] =[ ] [ ]
x 0 1/
3 +t
4 Can replace
y 1 with a parallel
vector

r =[ ] []
0
3 +t
1
4
Summary
y
A line can be identified (any point it
A passes through)
by a linear combination
of a position vector a
Any parallel
and a free [direction] vector vector (to line)

o
x
r =[ a
] []
b +t
1
m
Any
point the
direction
Equations of form y-b=m(x-a)
vector
Line goes through (a,b) with gradient m
Vectors (3D) 1
■ Vector:
– “arrow”
– multiple interpretations (displacement, velocity, force, …)
– has a magnitude and direction
– has no position
■ Notation: V also V, v, v and v , 𝑉
■ (Vx, Vy, Vz) also (x, y, z), (x1, x2, x3)
Vectors (2D) 2

V  P2  P1
y
P2  ( x2  x1 , y2  y1 )
y2
 (Vx , V y )
P1
y1
V: directed line segment, or
difference between two points

x1 x2 x
Vectors 3

Length of a vector:

V  V V x
2
y
2
(2D : Pythagoras )

V  Vx2  V y2  Vz2 (3D)


Vectors 4

Direction of a vector: Direction angles.


Vx Vy Vz
cos   , cos   , cos  
V V V z

Unit vector V :
V 
V y
|V|
x 
Magnitude info is removed, direction is kept.
Example: If you know:
find direction angles?
Solution: We find the vector AB between tow points:
Is a=-2, b=3, c=2
then:
The Distance Formula

■ It looks the same in space as it did before except with a third


coordinate:

d   x 2  x1    y 2  y1   z 2  z1 
2 2 2
Example

■ Find the distance between (1, 0, 2) and (2, 4,-3)

d   x 2  x1    y 2  y1   z 2  z1 
2 2 2

d   2  1   4  0    3  2 
2 2 2

 1  16  25  42
Midpoint Formula

■ The midpoint formula is


 x1  x 2 y1  y 2 z1  z 2 
 , , 
 2 2 2 
■ What is the midpoint if you make a 100 on a test
and an 80 on a test?
■ So the midpoint is just the average of the x’s, y’s,
and z’s.
Midpoint You Do

■ Find the midpoint of the line segment joining (5, -2, 3) and (0, 4, 4)

 5 ,1, 7 
 
2 2
Equation of a Sphere

■ The equation of a circle is: x2 + y2 = r2

■ If the center is not at the origin, then the equation


is: (x-h)2 + (y-k)2 = r2

■ The equation of a sphere whose center is at (h,k,j)


with radius r is: (x-h)2 + (y-k)2 + (z–j)2= r2
Finding the Equation of a Sphere

■ Find the standard equation of a sphere with center (2,4,3)


and radius 3

■ (x-h)2 + (y-k)2 + (z–j)2= r2


■ (x-2)2 + (y-4)2 + (z–3)2 = 32

■ Does the sphere intersect the plane?


■ Yes. The center of the sphere is 3 units above the y-axis and
has a radius of 3. It intersects at (2,4,0).
Finding the Center and Radius of a
Sphere

■ Find the center and radius of the sphere given by: x2 + y2 + z2


– 2x + 4y – 6z +8 = 0

■ This works the same way as it did in 2-D space. In order to


find the center, we must put the equation into standard form,
which means completing the square.
Finding the Center and Radius of a
Sphere

■ x2 + y2 + z2 – 2x + 4y – 6z +8 = 0

■ (x-1)2 + (y+2)2 + (z-3)2 = 6

■ The center is (1,-2,3) and the radius is √6.


Vector addition

Add components, put vector head to tail

y y
W V+W
W
V
V
x x

V  W  (Vx  Wx ,Vy  Wy ,Vz  Wz )


Scalar multiplication of vector

Multiplication components with scalar s

y y
2V
V

x x

sV  ( sVx ,sV y , sVz )


Combining vector operations
Infinite line through P with direction V:
L(t) = P + Vt, t 

y V
P t

t : parameter along line


t [a, b]: line segment, t belongs to the
domain a, b. (Belong to domain a, b)
Vector multiplication 1
Scalar product or dot product:
Product of parallel components, gives 1 real value

V V  W  V W cos


 VxWx  V yW y  VzWz
|W| cos 
|V|
Vector multiplication 2
Scalar product:

V  W  V W cos
 VxWx  V yW y  VzWz
Commutative : V  W  W  V
Distributive : V  (W  Z)  V  W  V  Z

Associative : V  (W  Z)  (V  W )  Z ?
Example:
Find cos θ between:
Vector multiplication 3

Vector product or cross V  W  V W sin


product :

Anticommut ative : V  W   W  V
Not associative : V  (W  Z)  (V  W)  Z
Distributi ve : V  (W  Z)  V  W  V  Z
Vector multiplication 4

Vector product or cross product: gives a vector (in 3D)


n perpendicular to V and W

V  W  n V W sin 
VW  (VyWz  VzWy ,
W VzWx  VxWz ,

VxWy  VyWx )
n V ⅈ 𝑗 𝑘
𝑣𝑥 𝑣𝑦 𝑣𝑧
𝑤𝑥 𝑤𝑦 𝑤𝑧
Definition
The cross product is defined as the vector perpendicular to
two given vectors A and B separated by an angle  and is
shown by:

||A x B|| = ||A|| ||B|| sin

The magnitude of the cross product equals the area of the


parallelogram that the initial two vectors span
Properties

Anti-commutative:
a x b = -b x a
Distributive over addition:
a x (b + c) = a x b + a x c
Compatible with scalar multiplication:
(ra) x b = a x (rb) = r(a x b)
Not associative, but satisfies the Jacobi identity:
a x (b x c) + b x (c x a) + c x (a x b) = 0
Cross product is only valid in R3 and R7
Matrix Solving Method

The first row is the standard basis vectors and must appear in the order
given here. The second row is the components of u [u1 u2 u3] and the
third row is the components of v [v1 v2 v3].
Given two vectors u and v, u x v equals the determinant of the matrix.
Vector Cross Product

Cross Product Applet


||a x b|| = ||a|| ||b|| sin()
Two non-zero vectors a and b are parallel if a x b = 0
Vector multiplication 5
Scalar product: Vector product:
■ scalar • vector
• Get a vector perpendicular to two
■ Test if vectors are perpendicular
given vectors
■ cos • sin
■ project,… • surface area,…
Exercise 1
■ Given a point P.
■ Requested: Reflect a point Q with respect to P.

Q W=P–Q
W P Q’ = Q + 2W
y
W
Q’
= 2P – Q
or: = P + (P – Q )
x We don’t need
coordinates!
Exercise 1
■ Given a point P.
■ Requested: Reflect a point Q with respect to P.

Q Alternative
P P is halfway Q and Q’:
Q’
P = (Q + Q’)/2
2P = Q + Q’
Q’ = 2P – Q
Exercise 2
■ Given a line L: L(t) = P + Vt .
■ Requested: Reflect a point Q with respect to L.

Q We know:
W Q’ = Q + 2 W
V L(t)
y P W W = L(t) – Q
t Q’
W. V = 0
x
Exercise 2
We know: Substitute to get t:
L(t) = P + Vt (L(t) – Q).V = 0
Q’ = Q + 2W (P + Vt – Q).V = 0
W = L(t) – Q V .Vt + (P – Q).V = 0
W. V = 0 t = ((Q – P).V) / (V .V)
Then:
Q’ = Q + 2 (P + Vt – Q)
= 2P – Q + 2V((Q – P).V / V .V)
Steps to be made

■ Write down what you know


■ Eliminate, substitute, etc. to get he result
■ Check the result
– Does it make sense?
– Is there a simpler derivation?
Exercise 3
■ Given a triangle with vertices P, Q and R, where the angle PQR is
perpendicular.
■ Requested: Rotate the triangle around the line PQ over an angle  .
What is the new position R’ of R?

Q R’

R
Circle in space
y
C() C()
r 
B B
 A
P A x P

|A|=1, |B|=1, A.B = 0


C() = (r cos , r sin , 0)
= (0,0,0) + r cos  (1,0,0) + r sin  (0,1,0)
= P + r cos  A + r sin  B
Exercise 3

A = (R – Q) / |R – Q|
B = (R – Q)(P – Q) / | (R – Q)(P – Q) |
R’ = Q + |R – Q| cos  A + |R – Q| sin  B

P
B
Q R’

A
R
Use:
• Scalar product, cross product
• coordinate independent definitions
• vector algebra
Don’t use:
• arccos, arcsin
• y = f(x)
What is a matrix?
Matrix:
- Mathematical objects with operations

Matrix in computer graphics:


- Defines a coordinate frame
- Defines a transformation
- Handy tool for manipulating transformations
Matrix
Matrix: rectangular array of elements
Element: quantity (value, expression, function, …)
Examples:
 x
 3.60  0.01 2.1  e x
x
 5.46 0.00 1.6 ,  2 x 2
, a1 a2 a3  ,  y 
  e x 
 z 
Matrix
r  c matrix: r rows, c columns
mij : element at row i and column j.

 m11 m12  m1c 


m m  m 
M   21 22 2c 
    
 
 mr1 mr 2  mrc 
Matrix
r  c matrix: r rows, c columns
mij : element at row i and column j.

 m11 m12  m1c 


m m  m 
M   21 22 2c 
    
 
 mr1 mr 2  mrc  r  c elements
Matrix
r  c matrix: r rows, c columns
mij : element at row i and column j.

 m11 m12  m1c 


m m  m 
M   21 22 2c 
    
 
 mr1 mr 2  mrc 
c columns
Matrix
r  c matrix: r rows, c columns
mij : element at row i and column j.

 m11 m12  m1c 


m  
 m m2c  r rows
M 21 22
    
 
 mr1 mr 2  mrc 
Matrix
Column vector: Row vector:
matrix with c =1 matrix with r =1
 v1  V  v1 v2  vc 
v 
V   2
 Scalar:
  matrix with r=1and c=1
 vr 
V  v 
Used for vectors
(and points)
Matrix
Matrix as collection of column vectors:

u x vx wx 
M  U V W  u y vy w y 
u z vz wz  W

Matrix contains an axis-frame:


V U
Operations on matrices
• Multiplication with scalar
– simple
• Addition
– simple
• Matrix-matrix multiplication
– More difficult, but the most important
Scalar Matrix multiplication
Matrix M multiplied with scalar s:
 sm11 sm12  sm1c 
 sm sm  sm 
A  sM   21 22 2c 
, i.e., aij  smij
    
 
 smr1 smr 2  smrc 
3 x 12  x 4
example :    3 
 6 2 y 2 y 
Scalar Matrix addition
 a11 a12  a1c   b11 b12  b1c 
a  a2c  b21 b22  b2c 
 21 a22
M AB 
         
   
 a r1 a r 2  arc   br1 br 2  brc 
 a11  b11 a12  b12  a1c  b1c 
a  b a22  b22  a2c  b2c 
  21 21 , i.e., mij  aij  bij
    
 
 ar1  br1 ar 2  br 2  arc  brc 

3 x 12  4  10  3 x  4 2 
example :      
 6 2 y   2 0   8 2 y 
Scalar Matrix addition
 a11 a12  a1c   b11 b12  b1c 
a  a2c  b21 b22  b2c 
 21 a22
M AB 
         
   
 a r1 a r 2  arc   br1 br 2  brc 
 a11  b11 a12  b12  a1c  b1c 
a  b a22  b22  a2c  b2c 
  21 21 , i.e., mij  aij  bij
    
 
 ar1  br1 ar 2  br 2  arc  brc 

• Just add elements pairwise


• A and B must have the same number of rows and columns
• Generalization of vector and scalar addition
Matrix Matrix multiplication
 a11 a12  a1n   b11 b12  b1q 
a a  a  b b  b 
2 n   21 2q 
C  AB   21 22 22
         
   
am n am 2  am n   p1
b b p2  b pq 

n
i = 2 ; k
a
j = 1 ; k
cij  ik bkj
k 1

• cij: dot product of row vector ai and column vector bj


• #columns A must be the same as #rows B: n = p
• C: m  q matrix
Matrix Matrix multiplication
Example:

 2 3  2  1  3  3 2  2  3  4  11 16 
 1  4 1 2   1  1  4  3  1  2  4  4   13  16 
  3 4    
 0 5    0  1  5  3 0  2  5  4  15 20 
i=3 j=2 i=3, j=2
Matrix Matrix multiplication
Example:
 4
A  1 2 3 , B  5
6

AB  

BA  
Matrix Matrix multiplication
Example:
 4
A  1 2 3 , B  5
6
 4
AB  1 2 3 5  1  4  2  5  3  6  32 
6

BA  
Matrix Matrix multiplication
Example:
 4
A  1 2 3 , B  5 AB  BA
6
 4
AB  1 2 3 5  1  4  2  5  3  6  32
6
 4 4  1 4  2 4  3 4 8 12 
BA  5 1 2 3  5  1 5  2 5  3  5 10 15
6 6  1 6  2 6  3 6 12 18
Matrix Transpose
 a11 a12  a1c 
a  Transpose matrix:
a  a
M   21 22 2c 
Interchange rows and columns.
    
  r  c matrix M  c  r matrix MT
 r1
a a r2  a rc 

 a11 a21  ar1 


a a  a 
MT   12 22 r 2  , i.e., mT  m
    
ji ij
 
 1c
a a 2c  a rc 

T1 4   x
1 2 3 2 5 ,
examples :      [x y z ]T   y 
 4 5 6  3 6  z 
Matrix Inverse
Simple algebra puzzle. Let ax = b. What is x?

ax  b Multiply left and right with a 1


a 1ax  a 1b Use a 1a equals 1
x  a 1b Done

Linear algebra puzzle. Let MU = V. What is U?


MU  V Multiply left and right with M 1
M 1MU  M 1V Use M 1M equals I
U  M 1V Done!
Matrix Inverse
Inverse of a n  n (square) matrix M is denoted M 1 , with
MM1  M 1M  I,
where I is the identity matrix :
1 0  0
0 1 
 0  1 if i  j
I , i.e., I ij   .
   0 if i  j
 
0 0  1 
I is a diagonal matrix, with all 1' s on the diagonal.
M 1 " undoes" the effect of M,
multiplyin g with I has no effect.
Matrix Inverse examples
41  1/ 4

If

1
3 2  2  1
5 4  
    5 / 2 3 / 2 
Then

3 2  2  1 3  2  2  5 / 2  3  1  2  3 / 2 1 0
5 4  5 / 2 3 / 2  5  2  4  5 / 2  5  1  4  3 / 2  0 1
      
Matrix Inverse examples
1
a b 
c d   ?
 
1
a b  1  d  b 1
 c d   ad  bc  c  We write with out:
   a  ad  bc

a b   d  b   ad  bc  ab  ba  1 0
 c d   c     (ad  bc)  
  a    ab  ba  cb  ad   0 1 
1
2 1 
4 2 ? Does not exist, cannot be inverted.
 
Matrix Inverse
- Does not always exist
- In general: if determinant = | M | = 0, matrix
cannot be inverted
- Inverse for n = 1 and n = 2: easy
- Inverse for higher n: use library function
- Important special case: orthonormal matrix.
Overview
• Coordinates, points, vectors
– definitions, operations, examples
• Matrices
– definitions, operations, examples

Você também pode gostar