Académique Documents
Professionnel Documents
Culture Documents
1
Contents
1 Vectors 4
1.1 Points in Space . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Distance between Points . . . . . . . . . . . . . . . . . . . . . 4
1.3 Scalars and Vectors . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Vectors and Coordinate Systems . . . . . . . . . . . . . . . . . 5
1.5 Vector Operations . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.6 Revision of Vectors . . . . . . . . . . . . . . . . . . . . . . . . 12
1.7 Quiz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2 Topics in 3D Geometry 19
2.1 Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.2 Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3 Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4 Functions of several variables . . . . . . . . . . . . . . . . . . 23
2.5 Change of Coordinates . . . . . . . . . . . . . . . . . . . . . . 25
3 Partial Derivatives 31
3.1 First Order Partial Derivatives . . . . . . . . . . . . . . . . . . 31
3.2 Higher Order Partial Derivatives . . . . . . . . . . . . . . . . . 33
3.3 Chain Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.4 Maxima and Minima . . . . . . . . . . . . . . . . . . . . . . . 38
5 Linear Equations 56
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.2 Row Echelon Form . . . . . . . . . . . . . . . . . . . . . . . . 57
5.3 Soving Systems of Linear Equations . . . . . . . . . . . . . . . 59
7 Matrices 74
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
7.2 Matrix Operations . . . . . . . . . . . . . . . . . . . . . . . . 74
7.3 Special matrices . . . . . . . . . . . . . . . . . . . . . . . . . . 76
7.4 Determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.5 Inverses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3D Coordinate system
The coordinate system in 3D space consists of three axes X,Y and Z. To
determine the directions of these axes, we follow the right hand rule:
We first define a plane in 3D space as the XY plane. Then place your right
hand on the X-axis, curl your fingers in the direction of the Y -axis, and let
your thumb stick out. Your thumb then points in the direction of the positive
Z axis.
√
|P~Q| =
p
(−1 − 2)2 + (4 − 3)2 = 10
Example. We can also represent the vector P~Q as the difference of the
~ and OP
vector OQ ~ (Use diagram.)
P~Q = OQ
~ − OP ~
= (−1, 4) − (2, 3)
= (−3, 1)
Then the directed line segment from O(0, 0) to R(−3, 1) also represents the
vector P~Q. Verify that the magnitude of both line segments is the same.
√
~ = (−3 − 0)2 + (1 − 0)2 = 10
p
|OR|
The two vectors also point in the same direction.
Definition. (Algebraic) A vector in 2D-space is represented by two com-
ponents (x, y), indicating the change in the X and Y directions from the
origin (0, 0).
Note. When we say a point P (−3, 1) in 2D-space, we mean the point with
x-coordiante −3 and y-coordinate 1. When we say the vector ~v = (−3, 1)
in 2D-space, we mean the directed line segment
p from the point
√ (0, 0) to the
2 2
point (−3, 1), which has magnitude or length (−3) + 1 = 10 and points
in the direction of the line segment.
Definition. A vector in 3D-space is given by a three tuple (x, y, z), indi-
cating the change in the X, Y and Z directions from the origin.
Note. We represent a vector ~v = (x, y, z) in 3D-space as the directed
line
p segment from the point (0, 0, 0) to the point (x, y, z), which has length
x2 + y 2 + z 2 and points in the direction of the line segment.
Example. Plot the vector ~v = (1, 2, 3) and determine it’s length.
1.5 Vector Operations
Addition and Subtraction
We add and subtract vectors component-wise.
Example. Let ~v1 = (1, 0, 1) and ~v2 = (−1, 2, 3). Then
~v1 + ~v2 = (1 − 1, 0 + 2, 1 + 3) = (0, 2, 4)
and
~v1 − ~v2 = (1 − (−1), 0 − 2, 1 − 3) = (2, −2, −2).
Scalar Multiplication
If c is a real number and ~v = (x, y, z), then
c~v = (cx, cy, cz).
This is known as scaling - we change the length but not the direction of v.
p p
|c~v | = c2 x2 + c2 y 2 + c2 z 2 = c x2 + y 2 + z 2 = c|~v |
Special vectors
The zero vector: ~o = (0, 0, 0).
Definition. A unit vector is a vector with length equal to one. i.e. |~v | = 1.
In 2D space, the unit vectors in the X and Y direction are special and denoted
by:
~i = (1, 0)
~j = (0, 1)
~v = (13, 6, −8)
= 13(1, 0, 0) + 6(0, 1, 0) − 8(0, 0, 1)
= 13~i + 6~j − 8~k
This representation is often useful and we will use both notations in the
course.
Example. Find a unit vector in the direction of the vector ~v = (6, 8, 10).
Dot Product
Definition. The dot product of 2 vectors ~a = (a1 , a2 , a3 ) and ~b = (b1 , b2 , b3 )
in 3-dimensional space is defined to be the scalar
~a.~b = a1 b1 + a2 b2 + a3 b3 .
On the other hand, if θ is the angle between the vectors ~a and ~b, using the
Law of Cosines on the triangle with sides ~a, ~b, ~a − ~b we get,
Proposition Let ~a and ~b be non-zero vectors. The vectors, ~a and ~b, are
perpendicular to each other if and only if ~a · ~b = 0.
~a · ~b = 0
⇔ |~a|.|~b| cos θ = 0
6 0, |~b| =
⇔ cos θ = 0; Since |~a| = 6 0, we can divide the equation by them.
⇔ θ = π/2
Example. Determine if the vectors ~a = (1, −1, 1) and ~b = (1, 2, 1) are per-
pendicular to each other.
~a × ~b = a1 a2 a3
b1 b2 b3
where ~i = (1, 0, 0), ~j = (0, 1, 0), ~k = (0, 0, 1) are unit vectors along the X,
Y , Z axes respectively. However while calculating the determinant they only
have symbolic value.
Remark. The cross product operates on 2 vectors and produces a new vec-
tor.
Solution:
~j ~k
~i
~
~a × b = 2 1 0
−1 1 0
1 0 ~ 2 0 ~ 2 1 ~
= i− j+ k
1 0 −1 0 −1 1
= 0~i − 0~j + 3~k
= 0(1, 0, 0) − 0(0, 1, 0) + 3(0, 0, 1)
= (0, 0, 3)
Observe that the two vectors lie in the XY -plane and the cross product lies
on the Z-axis and is indeed perpendicular to the plane containing the two
vectors. But we can verify this more concretely using the dot product. Let
~n = ~a × ~b = (0, 0, 3).
~n · ~a = (2, 1, 0).(0, 0, 3) = 0 + 0 + 0 = 0.
~n · ~b = (−1, 1, 0).(0, 0, 3) = 0 + 0 + 0 = 0.
Since both the dot products are zero, we can conclude that ~a × ~b is perpen-
dicular to both ~a and ~b.
Finally the magnitude of ~a × ~b is given by,
√
|~a × ~b| = 0 + 0 + 9 = 3.
Example. Consider the two vectors ~a = (2, 1, −4) and ~b = (3, −2, 5) in
3-dimensional space. Find the cross-product of the two vectors.
Solution:
~k
~i ~j
~a × ~b =
2 1 −4
3 −2 5
1 −4 ~ 2 −4 ~ 2 1 ~k
= i− j+
−2 5 3 5 3 −2
= −3~i − 22~j − 7~k
= (−3, −22, −7)
1.7 Quiz
d
1. Find dx
(tan(x2 ) cos(ex ).
Solution:
d d d
(tan(x2 ) cos(ex ) = tan(x2 ) (cos(ex ) + cos(ex ) (tan(x2 ))
dx dx dx
= tan(x )(− sin(e ))e + cos(e )(sec2 (x2 ))2x
2 x x x
f (x) = x3 − 3x
f 0 (x) = 3x2 − 3
3x2 − 3 = 0
3(x − 1)(x + 1) = 0
2 −1
5. Find the determinant of .
−6 2
Solution:
2 −1
−6 2 = (2)(2) − (−1)(−6) = −2
(b)
3~u − 5~v = 3(2, 3, 5) − 5(1, 1, −1) = (6, 9, 15) − (5, 5, −5) = (1, 4, 20).
(c)
~u · ~v = (2, 3, 5).(1, 1, −1) = 2 + 3 − 5 = 0.
(d)
~j ~k
~i
~u × ~v = 23 5
11 −1
3 5 ~ 2 5 ~ 2 3 ~
= i− j+ k
1 −1 1 −1 1 1
= (3(−1) − (5)(1))~i − (2(−1) − (5)(1))~j + ((2)(1) − (3)(1))~k
= −8~i + 7~j − ~k
= (−8, 7, −1)
7. Determine if ~u = (−2, 2, 1, −1) is perpendicular to ~v = (−2, −3, 1, 1).
Solution:
~a.~b = a1 b1 + a2 b2 + a3 b3 .
or
~a.~b = |~a|.|~b| cos θ.
2. Let ~a and ~b be non-zero vectors. The vectors, ~a and ~b, are perpendic-
ular to each other if and only if ~a · ~b = 0.
~a × ~b = a1 a2 a3
b1 b2 b3
where ~i = (1, 0, 0), ~j = (0, 1, 0), ~k = (0, 0, 1) are unit vectors along the X,
Y , Z axes respectively.
2.1 Planes
Just as it is easy to write the equation of a line in 2D space, it is easy to
write the equation of a plane in 3D space.
⇔ ~n · P~Q = 0,
⇔ (a, b, c) · (x − x0 , y − y0 , z − z0 ) = 0,
2.2 Lines
Vector equation of a line
To write the vector equation of a line, we need a point P (x0 , y0 , z0 ) on the
line and a vector ~v = (a, b, c) that is parallel to the line.
Definition. The vector equation of a line that contains the point P (x0 , y0 , z0 )
and is parallel to the vector ~v = (a, b, c) is:
P + t~v = ~r, where t is scalar.
or,
(x0 , y0 , z0 ) + t(a, b, c) = (x, y, z)
(x0 + ta, y0 + tb, z0 + tc) = (x, y, z)
Solution: The vector P~Q = (2, 1, 0) is parallel to the line and we take the
point P (1, 1, 1) on the line.
The vector equation of the line:
x = 1 + 2t
y = 1+t
z = 1
Example. Find the equation of the plane which contains the point (0, 1, 2)
and is perpendicular to the line (1, 1, 1) + t(2, 1, 0) = (x, y, z).
2.3 Surfaces
The graph in 3D space of an equation in x, y and z is a surface. Often the
graph is too difficut to draw, but here we sketch the graph of a few special
types of equations whose graphs are easy to visualize.
Cylindrical surfaces
The graph in 3D space of an equation containing only one or two of the three
variables x, y, z is called a cylindrical surface.
Example. Plot y = x2 .
Plot x2 + y 2 = 5.
Quadric Surfaces
The graph in 2D space of a second degree equation in x and y is an ellipse,
parabola or hyperbola. In 3D space, the graph of a second degree equation
in x, y and z is one of six quadric surfaces.
x2 y2 z2
1. Ellipsoid a2
+ b2
+ c2
=1
x2 y2
2. Elliptic Cone z2 = a2
+ b2
x2 y2
3. Elliptic Paraboloid z= a2
+ b2
y2 x2
4. Hyperbolic Parabolid z= b2
− a2
x2 y2 z2
5. Elliptic Hyperboloid of one sheet a2
+ b2
− c2
=1
2 y2 z2
6. Elliptic Hyperboloid of two sheets − xa2 − b2
+ c2
=1
f (x) = x + x2 .
You have learned how to graph these functions, perhaps how to determine
their domain and range. You have gone much further in your quest to under-
stand functions; you have learned how to differentiate them, then to calculate
the maximum and minimum, then to integrate them. At the end of this term
(in March) we will learn how to write a function as a sum of simpler func-
tions, i.e. a Fourier Series Expansion of a function.
However now we will learn something new. We will learn about functions
of several variables, e.g.
You will very quickly see that although the concepts are new, the techniques
are old and familiar.
y = x2 .
Remark. The graph of a function f (x) of one variable is the graph of the
equation y = f (x), a curve in 2D space. The graph of a function f (x, y) of
two variables is the graph of the equation z = f (x, y), a surface in 3D space.
The graph of a function f (x, y, z) is a set of points in 4D space and we cannot
draw the graph.
One way to understand functions of two or more variables is by using
level sets.
Example. An example of level sets is a topographic map, which maps hills
and valleys in a region by drawing curves indicating height or elevation. If
h(x, y) is the height function over a region, say the Himalayas, then if we
mark all the points (x, y) on the ground at which the height of the mountain
is h(x, y) = 3000m, we get the level set for L = 3000. If we draw the level
sets for different heights, e.g 2000m, 3000m, 4000m, 5000m, 6000m, 7000m,
8000m, we get a rough topographic map for the Himalayas.
Note that we draw the level sets on the ground, i.e. in the domain.
Definition. We fix a number C. The level set of a function of two variables
f (x, y) is the set of points (x, y) in the domain which satisfy the equation
f (x, y) = C.
Example. Let f (x) = x2 and say the constant c = 1. The level set is the
set of points such that
x2 = 1
x = 1, −1
C = 1 : x2 + y 2 = 1; a circle of radius 1
C = 4 : x2 + y 2 = 4; a circle of radius 2
C = 9 : x2 + y 2 = 9; a circle of radius 3
Example. Let f (x, y, z) = x2 + y 2 + z 2 and say the constant c = 1. The
level set is the set of points such that
x2 + y 2 + z 2 = 1
Hence the level set for c = 1 is the set of points lying on the unit sphere.
Polar Coordinates
The polar coordinate system is equivalent to the rectangular coordinate sys-
tem. It locates points using two coordinates r and θ. The coordinate r is the
distance from a point to the origin, and θ is the angle used in trignometry
which measures the counterclockwise rotation from the positive X-axis.
x = r cos θ
y = r sin θ
Example. Express in polar coordiantes the portion of the unit disc that lies
in the first quadrant.
Solution: The region may be expressed in polar coordinates as
0 ≤ r ≤ 1; 0 ≤ θ ≤ π/2
Example. Express in polar coordinates the function
f (x, y) = x2 + y 2 + 2yx.
Cylindrical Coordinates
This is a three dimensional extension of plane polar coordinates. Cylindrical
coordinates are given by the 3-tuple (r, θ, z), the polar coordinates of the
X, Y plane and the rectangular coordinate z. Given a point (x, y, z) in 3-
dimensional space, to calculate r and θ we project the point to the XY-plane
(x, y, z) 7→ (x, y). Then calculate (r, θ) as in the previous section.
Cylindrical to Rectangular Conversion Formulas:
x = r cos θ
y = r sin θ
z = z
r = sin θ
Spherical coordinates
Spherical coordinates consist of the 3-tuple (ρ, θ, φ). These are determined
as follows:
3. φ = the angle between the positive z-axis and the line from the origin to
the point.
x = ρ sin(φ) cos(θ)
y = ρ sin(φ) sin(θ)
z = ρ cos φ
f (x, y, z) = x2 + y 2 + z 2
ρ=5
Summary
1. The point-normal equation of a plane that contains the point P (x0 , y0 , z0 )
and has normal vector ~n = (a, b, c) is
a(x − x0 ) + b(y − y0 ) + c(z − z0 ) = 0.
2. The vector equation of a line that contains the point P (x0 , y0 , z0 ) and
is parallel to the vector ~v = (a, b, c) is:
P + t~v = ~r, where t is scalar.
5. The polar coordinate system has two coordinates r and θ. The coor-
dinate r is the distance from a point to the origin, and θ is the angle
used in trignometry which measures the counterclockwise rotation from
the positive X-axis.
Conversion from rectangular to polar coordinates:
Let (x, y) be a point in the rectangular coordinate system.
p
r = x2 + y 2
y
tan θ =
x
Conversion from polar to rectangular coordinates:
Let (r, θ) be a point in the polar coordinate system.
x = r cos θ
y = r sin θ
6. Cylindrical Coordinate System is a three dimensional extension of
plane polar coordinates. Cylindrical coordinates are given by the 3-tuple
(r, θ, z), the polar coordinates of the X, Y plane and the rectangular
coordinate z.
Cylindrical to Rectangular Conversion Formulas:
x = r cos θ
y = r sin θ
z = z
7. Spherical coordinates consist of the 3-tuple (ρ, θ, φ). These are deter-
mined as follows:
1. ρ = the distance from the origin to the point.
2. θ = the same angle that we saw in polar/cylindrical coordinates.
3. φ = the angle between the positive z-axis and the line from the origin
to the point.
Spherical to Rectangular Conversion Formulas:
x = ρ sin(φ) cos(θ)
y = ρ sin(φ) sin(θ)
z = ρ cos φ
Example. 1.
f (x, y) = x2 y 3
∂f ∂x2 y 3 ∂x2
= = y3 = 2xy 3
∂x ∂x ∂x
∂f ∂x2 y 3
= = 3x2 y 2
∂y ∂y
2. f (x, y, z) = ze2x+3y+4z
3. f (x, y) = x2 + y 2
Example. Consider the function f (x, y) = x2 /y. Calculate the first order
partial derivatives and evaluate them at the point P (2, 1).
Solution:
x2
f (x, y) =
y
∂f 2x
=
∂x y
∂f
|{x=2,y=1} = 4
∂x
∂f x2
= − 2
∂y y
∂f 1
|{x=2,y=1} = −
∂y 9
Remark. Partial derivatives are used in the same manner as the derivative
of a function of one variable. The partial of f (x, y) with respect to x is
the rate of change (or the slope) of f with respect to x as y stays constant.
Similarly the partial of f (x, y) with respect to y is the rate of change (or the
slope) of f with respect to y as x stays constant. For instance in the above
example, the slope of the function at the point P (2, 1) in the x direction is
4, and the slope of the function at P in the y direction is −1/9.
f (1, 2) = 13 + 2.1.2 − 2 + 3
= 1+4−2+3
= 6
So the point P0 does indeed lie on the graph of f .
Then the equation of the tangent plane is given by;
∂f ∂f
z − z0 = |(x − x0 ) + |{x ,y } (y − y0 ).
∂x {x0 ,y0 } ∂y 0 0
∂f
|{1,2} = 3x2 + 2y|{1,2} = 7
∂x
∂f
|{1,2} = 2x − 1|{1,2} = 1
∂y
z − 6 = 7(x − 1) + 1(y − 2)
= 7x − 7 + y − 2
z = 7x + y − 3
Therefore the tangent plane to the graph of f at (1, 2, 6) is
7x + y − z − 3 = 0.
∂2f
∂x2
, the derivative of f taken twice with respect to x,
∂2f
∂x∂y
, the derivative of f with respect to y and then with respect to x,
∂2f
∂y∂x
, the derivative of f with respect to x and then with respect to y,
∂2f
∂y 2
, the derivative of f taken twice with respect to y.
∂ f 3
We can carry on and find ∂x∂y 2 , which is taking the derivative of f first with
Note. In this course all the fuunctions we will encounter will have equal
mixed partial derivatives.
f (x, y) = x4 y 2 − x2 y 6 .
Solution:
∂f
= 4x3 y 2 − 2xy 6
∂x
∂f
= 2x4 y − 6x2 y 5
∂y
∂2f
= 12x2 y 2 − 2y 6
∂x2
∂2f
= 8x3 y − 12xy 5
∂y∂x
∂2f
= 2x4 − 30x2 y 4
∂y 2
∂2f
= 8x3 − 12xy 5
∂x∂y
Notations:
∂f
fx =
∂x
∂f
fy =
∂y
∂2f
fxx =
∂x2
∂2f
fyy =
∂y 2
∂2f
fxy =
∂x∂y
3.3 Chain Rule
You are familiar with the chain rule for functions of one variable: if f is
a function of u, denoted by f = f (u), and u is a function of x, denoted
u = u(x). Then
df df du
= .
dx du dx
z = z(u, v)
then
∂z ∂z ∂u ∂z ∂v
= +
∂x ∂u ∂x ∂v ∂y
∂z ∂z ∂u ∂z ∂v
= +
∂y ∂u ∂y ∂v ∂y
oo z PPP
o PPP
ooo
∂z ∂z
∂u
oo PP∂vP
ooo PPP
wooo PP'
u v
??? ∂u ??? ∂y
∂x ∂x
∂u ∂v ∂v
??∂y ??
?? ??
?
x y x y
z = z(u, v)
u = xy
v = 2x + 3y
Solution:
∂z ∂z ∂u ∂z ∂v
= +
∂x ∂u ∂x ∂v ∂x
∂z ∂z
= y +2
∂u ∂v
∂z ∂z ∂u ∂z ∂v
= +
∂y ∂u ∂y ∂v ∂y
∂z ∂z
= x +3
∂u ∂v
Example. Let
z = z(u, v)
u = x2 y
v = 3x + 2y
∂2z
1. Find ∂y 2
.
∂2z
Solution: We will first find ∂y 2
.
∂z ∂z ∂u ∂z ∂v ∂z ∂z
= + = x2 +2 .
∂y ∂u ∂y ∂v ∂y ∂u ∂v
Now differentiate again with respect to y to obtain
∂2z ∂ 2 ∂z ∂ ∂z
2
= (x )+ (2 )
∂y ∂y ∂u ∂y ∂v
∂ ∂z ∂ ∂z
= x2 ( ) + 2 ( )
∂y ∂u ∂y ∂v
Note that z is a function of u and v, and u and v are functions of x and
∂z ∂z
y. Then the partial derivatives ∂u and ∂v are also initially functions of
u and v and eventually functions of x and y. In other words we have
the same dependence diagram as z.
∂ ∂z ∂2z ∂2z
Note. ( )
∂y ∂u
6= ∂y∂u
). Never write ∂y∂u
as it is mathematically mean-
ingless.
∂z
p ∂u NNNN ∂ 2 z
∂2z
∂u2 ppppp NNN∂v∂u
pp pp NNN
NNN
ppp N'
w p
u ? ∂u v ? ∂v
?? ∂y ??? ∂y
∂x
∂u ∂v
??? ∂x
??
?? ?
x y x y
∂z
N
∂2z
ppppp ∂v NNNNN ∂ 22z
∂u∂v
ppp N∂v
NNN
p pp NNN
pw p p N'
u ? ∂u v
??? ∂y ??? ∂y
∂x ∂x
∂u ∂v ∂v
?? ??
?? ??
x y x y
Therefore
∂2z 2
2 ∂ z ∂u ∂ 2 z ∂v ∂ 2 z ∂u ∂ 2 z ∂v
= x ( + ) + 2( + )
∂y 2 ∂u2 ∂y ∂v∂u ∂y ∂u∂v ∂y ∂v 2 ∂y
∂2z ∂2z ∂2z ∂2z
= x2 (x2 2 + 2 ) + 2(x2 + 2 2)
∂u ∂v∂u ∂u∂v ∂v
The mixed partials are equal so the answer simplifies to
∂2z 2
4∂ z
2
2 ∂ z ∂2z
= x + 4x + 4 .
∂y 2 ∂u2 ∂u∂v ∂v 2
∂2z
2. Find ∂x∂y
Solution: We have
∂z ∂z ∂u ∂z ∂v ∂z ∂z
= + = x2 +2 .
∂y ∂u ∂y ∂v ∂y ∂u ∂v
Now differentiate again with respect to x to obtain
∂2z ∂ 2 ∂z ∂ ∂z
= (x )+ (2 )
∂x∂y ∂x ∂u ∂x ∂v
∂ ∂z ∂z ∂ ∂z
= x2 ( ) + 2x +2 ( )
∂x ∂u ∂u ∂x ∂v
2 2
∂ z ∂u ∂ z ∂v ∂z ∂ 2 z ∂u ∂ 2 z ∂v
= x2 ( 2 + ) + 2x + 2( + )
∂u ∂x ∂v∂u ∂x ∂u ∂u∂v ∂x ∂v 2 ∂x
∂2z ∂2z ∂z ∂2z ∂2z
= x2 (2xy 2 + 3 ) + 2x + 2(2xy + 3 2)
∂u ∂v∂u ∂u ∂u∂v ∂v
2 2 2
∂ z ∂ z ∂z ∂ z
= 2x3 y 2 + (3x2 + 4xy) ) + 2x +6 2
∂u ∂v∂u ∂u ∂v
(ii) If f 00 (x) < 0 the gradient is decreasing and we have a local maximum.
If the Hessian is zero, then the critical point is degenerate. If the Hessian
is non-zero, then the critical point is non-degenerate and we can classify the
points in the following manner:
case(i) If H > 0 and fxx < 0 then the critical point is a relative maximum.
case(ii) If H > 0 and fxx > 0 then the critical point is a relative minimum.
fx = 0
12x(3x + 2y) = 0
case(i) x = 0.
Then substituting this in fy we get fy = 3(y 2 − 25) = 0 implies y = ±5.
case(ii) 3x + 2y = 0.
Then y = −3x/2 and substituting this in fy we get,
9x2
fy = 3(4x2 + − 25)
4
3
= (16x2 + 9x2 − 100)
4
3
= (25x2 − 100)
4
75 2
= (x − 4)
4
fy = 0
75 2
(x − 4) = 0
4
x2 − 4 = 0
x = ±2
Thus we have found four critical points: (0, 5), (0, −5), (2, −3), (−2, 3).
We must now classify these points.
f (x, y, z) = x2 + 2xyz.
f (x, y, z) = (y, x, z 2 ).
z = f (x, y)
(i) fx (a, b)-represents the rate of change of the function f (x, y) as we vary
x and hold y = b fixed.
(ii) fy (a, b)-represents the rate of change of the function f (x, y) as we vary
y and hold x = a fixed.
∇f · î = fx
∇f · ĵ = fy
Let u = ~i + 2~j. √ √ √
|~u| = 12 + 22 = 1+4= 5.
∇f · ~u
D~u f (1, 1) =
|~u|
(3, 1).(1, 2)
= √
5
(3)(1) + (1)(2)
= √
5
5
= √
5
√
= 5
∇f · ~u
D~u f =
|~u|
|∇f ||~u| cos θ
=
|~u|
= |∇f | cos θ
∂f ∂f
∇f = ( , )
∂x ∂y
= (2x, 2y)
∇f (1, 2) = (2, 4).
g(x, y, z) = x2 + y 2 − z.
g(x, y, z) = 0
x2 + y 2 − z = 0
z = x2 + y 2
∂g ∂g ∂g
∇g = ( , , )
∂x ∂y ∂z
= (2x, 2y, −1)
∇g(1, 2, 5) = (2, 4, −1)
Divergence
Definition. Given a vector field ~v (x, y, z) = (v1 (x, y, z), v2 (x, y, z), v3 (x, y, z)),
the divergence of ~v is a scalar function defined as the dot product of the vector
operator ∇ and ~v ,
Div ~v = ∇ · ~v
∂ ∂ ∂
= ( , , ) · (v1 , v2 , v3 )
∂x ∂y ∂z
∂v1 ∂v2 ∂v3
= + +
∂x ∂y ∂z
Curl
Definition. The curl of a vector field is a vector function defined as the
cross product of the vector operator ∇ and ~v ,
i j k
∂ ∂ ∂
Curl ~v = ∇ × ~v = ∂x ∂y ∂z
v1 v2 v3
∂v3 ∂v2 ∂v3 ∂v1 ∂v2 ∂v1
= ( − )i − ( − )j + ( − )k
∂y ∂z ∂x ∂z ∂x ∂y
Example. Compute the curl of the vector function (x − y)~i + (x + y)~j + z~k.
Solution:
i j k
∂ ∂ ∂
Curl ~v = ∇ × ~v = ∂x ∂y
∂z
(x − y) (x + y) z
∂z ∂(x + y) ∂z ∂(x − y) ∂(x + y) ∂(x − y)
= ( − )i − ( − )j + ( − )k
∂y ∂z ∂x ∂z ∂x ∂y
= (0 − 0)~i − (0 − 0)~j + (1 − (−1))~k
= 2~k
4.4 Laplacian
We have seen above that given a vector function, we can calculate the diver-
gence and curl of that function. A scalar function f has a vector function
∇f associated to it. We now look at Curl(∇f ) and Div(∇f ).
Curl(∇f ) = ∇ × ∇f
∂fz ∂fy ∂fx ∂fz ∂fy ∂fx
= ( − )i + ( − )j + ( − )k
∂y ∂z ∂z ∂x ∂x ∂y
= (fyz − fzy )i + (fzx − fxz )j + (fxy − fyx )k
= 0
Div(∇f ) = ∇ · ∇f
∂ ∂ ∂ ∂f ∂f ∂f
= ( , , )·( , , )
∂x ∂y ∂z ∂x ∂y ∂z
∂2f ∂2f ∂2f
= + +
∂x2 ∂y 2 ∂z 2
Definition. The Laplacian of a scalar function f (x, y) of two variables is
defined to be Div(∇f ) and is denoted by ∇2 f ,
∂2f ∂2f
∇2 f = + .
∂x2 ∂y 2
The Laplacian of a scalar function f (x, y, z) of three variables is defined to
be Div(∇f ) and is denoted by ∇2 f ,
∂2f ∂2f ∂2f
∇2 f = + + .
∂x2 ∂y 2 ∂z 2
Example. Compute the Laplacian of f (x, y, z) = x2 + y 2 + z 2 .
Solution:
∂2f ∂2f ∂2f
∇2 f = + +
∂x2 ∂y 2 ∂z 2
∂2x ∂2y ∂2z
= + +
∂x ∂y ∂z
= 2+2+2
= 6.
We have the following identities for the Laplacian in different coordinate
systems:
∂2f ∂2f ∂2f
Rectangular : ∇2 f = + +
∂x2 ∂y 2 ∂z 2
1 ∂ ∂f 1 ∂ 2 f
P olar : ∇2 f = r + 2 2
r ∂r ∂r r ∂θ
1 ∂ ∂f 1 ∂2f ∂2f
Cylindrical : ∇2 f =
r + 2 2 + 2
r ∂r ∂r r ∂θ ∂z
1 ∂ ∂f 1 ∂ ∂f 1 ∂2f
Spherical : ∇2 f = 2 ρ2
+ 2 sin θ + 2 2
ρ ∂ρ ∂ρ ρ sin θ ∂θ ∂θ ρ sin θ ∂φ2
Example. Consider the same function f (x, y, z) = x2 + y 2 + z 2 . We have
seen that in rectangular coordinates we get
1. Cylindrical Coordinates.
We have x = r cos θ and y = r sin θ so
f (r, θ, z) = r2 cos2 θ + r2 sin2 θ + z 2 = r2 + z 2 .
Using the above formula:
1 ∂ ∂f 1 ∂ 2 f ∂2f
∇2 f = r + 2 2 + 2
r ∂r ∂r r ∂θ ∂z
1 ∂ ∂(2z)
= (r2r) + 0 +
r ∂r ∂z
1
= (4r) + 2
r
= 4+2
= 6
2. Spherical Coordinates. p
We have x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ and ρ = x2 + y 2 + z 2 ,
so
f (r, θ, z) = ρ2 .
Using the above formula:
1 ∂ 2 ∂f 1 ∂ ∂f 1 ∂2f
∇2 f = ρ + sin θ +
ρ2 ∂ρ ∂ρ ρ2 sin θ ∂θ ∂θ ρ2 sin2 θ ∂φ2
1 ∂ 2
= (ρ 2ρ) + 0 + 0
ρ2 ∂ρ
1 ∂
= 2
(2ρ3 )
ρ ∂ρ
1
= (6ρ2 )
ρ2
= 6.
These three different calculations all produce the same result because ∇2
is a derivative with a real physical meaning, and does not depend on the
coordinate system being used.
Summary
1. If f (x, y) is a scalar-valued function of two variables. Then the gradient
of f is the vector function defined as,
∂f ∂f ∂f ∂f
∇f = ( , ) = ~i + ~j.
∂x ∂y ∂x ∂y
4. Given a vector field ~v (x, y, z) = (v1 (x, y, z), v2 (x, y, z), v3 (x, y, z)), the di-
vergence of the vector field, ~v is a scalar function defined as the dot
product of the vector operator ∇ and ~v ,
Div ~v = ∇ · ~v
∂ ∂ ∂
= ( , , ) · (v1 , v2 , v3 )
∂x ∂y ∂z
∂v1 ∂v2 ∂v3
= + +
∂x ∂y ∂z
• a surface
• a unit vector rotating about the point (1, 1, 0), (shown as a rotating
black arrow at the base of the figure)
• a rotating plane parallel to the unit vector, (shown as a grey grid)
• the traces of the planes in the surface, (shown as a black curve on
the surface)
• the tangent lines to the traces at (1, 1, f (1, 1)), (shown as a blue
line)
• the gradient vector (shown in green at the base of the figure)
http://archives.math.utk.edu/ICTCM/VOL10/C009/dd.gif
3x1 + 2x2 = 7
−x1 + x2 = 6
Solution: The number of atoms of each element before the reaction must
equal the number present afterward!
7x = 7z
8x + y = 5z + 2w
y = 3z
3y = 6z + w
To find the answer we need to solve the above system of linear equations. In
this chapter we will learn an easy method to solve such a system.
5.2 Row Echelon Form
In this section we learn Gauss’ Method to solve a system of linear equations.
We will use an example to understand the method.
x− y =0
2x − 2y + z + 2w =4
y + w =0
2z + w =5
We can abbreviate this linear system with the linear array of numbers,
whose entries are the coefficients of the equations:
1 −1 0 0 0
2 −2 1 2 4
0 1 0 1 0 .
0 0 2 1 5
The vertical bar just reminds us that the coefficients of the system are on
the left hand side of the bar and the constants are on the right. We call this
an augmented matrix. We can now proceed with Gauss’ method.
1 −1 0 0 0 1 −1 0 0 0
2 −2 1 2 4 R2 =−2R1 +R2 0 0 1 2 4
0 1 0 1 0
→
0 1 0 1 0
0 0 2 1 5 0 0 2 1 5
1 −1 0 0 0
R2 ↔R3 0 1 0 1 0
→
0 0 1 2 4
0 0 2 1 5
1 −1 0 0 0
0 1 0 1
R4 =−2R3 +R4
→
0
0 0 1 2 4
0 0 0 −3 −3
The resulting equations are:
x−y =0
y + w =0
z + 2w =4
w =1
1. Why do both the original system and the new simpler system has the
same solution set?
Answer: There is a theorem which says that, if a linear system is changed
to another by one of these operations
• any all zero rows are at the bottom of the reduced matrix
• in a non-zero row, the first-from-left nonzero value is 1
• the first 1 in each row is to the right of the first 1 in the row above
(ii) Make the first entry of the first row 1 by multiplying by the reciprocal.
The first row is now in the correct form.
(iii) Make the first entry in all the rows below the first row 0, by using
the1
1
0
0
in the first row above to subtract. The first column should be .
.
.
(iv) Now we can disregard the first row and first column because they are in
the correct form, and only consider the remaining sub-matrix. Repeat
steps (i)-(iv) for the smaller sub-matrix. Continue till you run out of
rows.
(i) Empty
(iii) Infinite
x + 2y = 4
x + 2y = 8
We get the absurd relation 0 = 4. This implies that the system has no
solutions. Geometrically the two equations are two parallel lines and hence
there is no point of inersection.
An example where the solution set is infinite.
x1 + 2x2 =4
x2 − x3 = 0
x1 + 2x3 = 4.
We have a bottom row of zeros. The second row gives x2 = x3 and the first
row gives x1 + 2x2 = 4. We can express x1 in terms of x3 to get x1 = 4 − 2x3 .
Thus we can write the solution set for the system in the following manner:
x1
S = { x2 |x2 = x3 and x1 = 4 − 2x3 }
x3
4 −2x3
= { x3 }
x3
4 −2
= { 0 + 1 x3 |x3 ∈ R}
0 1
Example. Consider the linear system
x+y+ z− w =1
y− z+ w = −1
3x + 6z − 6w =6
−y+ z− w =1
Gauss’ Method:
1 1 1 −1 1 1 1 1 −1 1
0 1 −1 1 −1
R3 =−3R +R3 0 1 −1 1 −1
→1
3 0 6 −6 6 0 −3 3 −3 3
0 −1 1 −1 1 0 −1 1 −1 1
1 1 1 −1 1
R3 =3R2 +R3 ,R4 =R2 +R4 0 1 −1 1 −1
→
0 0 0
0 0
0 0 0 0 0
x+y+z−w =1
y − z + w = −1
w
2 −2z +2w
−1 +z −w
= { }
z
w
2 −2 2
−1 1 −1
= { 0 + 1 z + 0 w|z, w ∈ R}
0 0 1
Summary
1. A matrix is in Row Echelon Form if it has the following form:
• any all zero rows are at the bottom of the reduced matrix
• in a non-zero row, the first-from-left nonzero value is 1
• the first non-zero entry in each row is to the right of the first non-zero
entry in the row above
(i) Make the first entry, of the first row, non-zero by doing a swap if
necessary.
(ii) Make the first entry, of the first row 1, by multiplying by the recip-
rocal. The first row is now in the correct form.
1
0
0
(iii) The first column should be . . We do it, by making the first
.
.
entry in all the rows below the first row 0, by using the 1 in the first
row.
(iv) Now we can disregard the first row and first column because they
are in the correct form, and only consider the remaining sub-matrix.
Repeat steps (i)-(iv) for the smaller sub-matrix. Continue till you
run out of rows.
x + 2y + 3z = 9
2x − y + z = 8
3x − z=3
We can use the methods of the last chapter to find the solution set of this
system of linear equations. The associated augmented matrix:
1 2 3 9
2 −1 1 8
3 0 −1 3
z = 3
y = 2 − z = 2 − 3 = −1
x = 9 − 2y − 3z = 9 − 2(−1) − 3(3) = 2
Therefore we write,
1 2 3 9
(2) 2 + (−1) −1 + (3) 1 = 8
3 0 −1 3
6.2 Linear Independence of Vectors
Definition. A set of vectors S is linearly independent if there is no non-
trivial linear combination of vectors that sums to zero.
Remark. If a set is not linearly independent, it is linearly dependent..
Example. 1. Consider the linear combination which sums to zero,
1 0 0
α +β =
0 1 0
α 0 0
+ =
0 β 0
α 0
=
β 0
α = 0
β = 0
1 0
is a unique solution. Therefore the vectors and are linearly
0 1
independent.
2. Consider the linear combination which sums to zero
1 0 1 0
x +y +z =
0 1 1 0
x 0 z 0
+ ++ =
0 y z 0
x+z 0
=
y+z 0
x+z = 0; x = −z
y+z = 0; y = −z
So for any value of z, say z = 1, we can choose x = y = −z = −1 and get
1 0 1 0
(−1) + (−1) + (1) =
0 1 1 0
a non-trivial linear
combination
which sums
to zero.
1 0 1
So the vectors , and are not linearly independent.
0 1 1
3. Determine whether the set of vectors {[1, 1, 0], [1, 0, 1], [2, 1, 1]} is linearly
independent.
Solution: Take a linear combination of the vectors which sums to zero.
1 1 0 0
x 1
+y 0 +z 1 = 0
2 1 1 0
x +y +2z 0
x +z = 0
y +z 0
We get a system of three linear equations:
x + y + 2z = 0
x + z=0
y+ z=0
We can use the methods of the last chapter to find the solution set of this
system of linear equations. If x = y = z = 0 is a unique solution, then
the vectors are linearly independent, other wise we can find a dependency.
The associated augmented matrix:
1 1 2 0
1 0 1 0
0 1 1 0
We now reduce the matrix to row echelon form:
1 1 2 0 1 1 2 0
1 0 1 0 R2 =−R +R2
→1 0 −1 −1 0
0 1 1 0 0 1 1 0
1 1 2 0
R3 =R2 +R3
→ 0 1 1 0
0 0 0 0
We have a bottom row of zeros and hence cannot have a unique solution.
The second row gives y + z = 0 and the first row gives x + y + 2z = 0. So
y = −z
x = −y − 2z = −(−z) − 2z = −z
If we choose z = 1, then x = −1 and y = −1we get a non-trivial linear
combination which sums to zero:
1 1 2 0
(−1) 1
+ (−1) 0
+ (1) 1
= 0
0 1 1 0
Theorem Let S = {~v1 , ~v2 , ..., ~vn } be a set of n, n-dimensional vectors, then
the set S is linearly independent if and only if the determinant of the matrix
having the n vectors as columns is non-zero.
Example. 1. We can apply this result to the example above. Let {[1, 1, 0], [1, 0, 1], [2, 1, 1]}
be three, 3-dimensional vectors.
1 1 2
1 0 1 = 1(0 − 1) − 1((1 − 0) + 2(1 − 0) = −1 − 1 + 2 = 0.
0 1 1
Since the determinant is zero, the set of vectors are not linearly indepen-
dent.
2. Consider the set {[1, −1, 1], [1, 0, 1], [1, 1, 2]}.
1 1 1
−1 0 1 = 1(0 − 1) − 1((−1)(2) − (1)(1)) + 1((−1)(1) − 0) = 1 6= 0.
1 1 2
Since the determinant is non-zero, the set of vectors are linearly indepen-
dent.
Definition. We say that a set of vectors {~v1 , ~v2 , ..., ~vn } are mutually or-
thogonal if every pair of vectors is orthogonal. i.e.
are mutually orthogonal. The vectors however are not normalized (this term
is sometimes used to say that the vectors are not of magnitude 1). Let
√
1 1/ 2
~v1 1
~u1 = = √ 0 = 0√
|~v1 | 2 −1 −1/ 2
√1 √1/2
~v2 1
~u2 = = 2 = 2/2
|~v2 | 2
1 1/2
1
√ 1/2
√
~v3 1
~u3 = = − 2 = − 2/2
|~v3 | 2
1 1/2
~v1 = ~v − (Proj~u~v )
(1)(1) + (1)(0) 1 1
Proj~u~v = √ = (1)
2
( 1 +0 ) 2 2 0 0
1 1 0
~v1 = − (1) =
1 0 1
•
Example. We will apply the Gram-Schmidt algorithm to orthonormalize
the set of vectors
1 1 1
~v1 = −1 , ~v2 =
0 , ~v3 =
1 .
1 1 2
To apply the Gram-Schmidt, we first need to check that the set of vectors
are linearly independent.
1 1 1
−1 0 1 = 1(0 − 1) − 1((−1)(2) − (1)(1)) + 1((−1)(1) − 0) = 1 6= 0.
1 1 2
Therefore the vectors are linearly independent.
Gram-Schmidt algorithm:
Step 1. Let
1
~u1 = ~v1 = −1
1
1
~u1 1
~e1 = = √ −1 .
|~u1 | 3 1
Step 2. Let
~u2 = ~v2 − Proj~u1 ~v2
1 1
(1, 0, 1).(1, −1, 1) = 2 −1
Proj~u1 ~v2 = −1
12 + (−1)2 + 12 3
1 1
1 1
~u2 = 0 − 2 −1
3
1 1
1/3
= 2/3
1/3
1/3
~u2 3
~e2 = = √ 2/3 .
|~u2 | 6 1/3
Step 3. Let
Example. Consider the vectors {[3, 0, 4], [−1, 0, 7], [2, 9, 11]} Check that the
vectors are linearly independent and use the Gram-Schmidt process to find
orthogonal vectors.
Ans. {[3, 0, 4], [−4, 0, 3], [0, 9, 0]} Check that the vectors are mutually orthog-
onal.
Summary
We assume ~v1 , ~v2 , ~v3 are vectors and a, b, c are real numbers for this summary.
The element aij represents the entry in the ith row and jth column. We
sometimes denote A by (aij )m×n .
Example.
2 1 4 3 6 4
+ = .
1 3 5 6 6 9
Scalar Multiplication
If c is a real number and A = (aij )m×n is a matrix then cA = (caij )m×n .
Example.
2 1 10 5
5 = .
1 3 5 15
Matrix Multiplication
Given a matrix A = (aij )m×n and a matrix B = (bij )r×s , we can only multiply
them if n = r. In such a case the multiplication is defined to be the matrix
C = (cij )m×s as follows:
n
X
cij = aik bkj .
k=1
We may view the cij th element as the dot product of the ith row of the
matrix A and jth column of the matrix B.
Example. 1.
2 1 4 3 (2)(4) + (1)(5) (2)(3) + (1)(6)
=
1 3 5 6 (1)(4) + (3)(5) (1)(3) + (3)(6)
13 12
= .
19 21
1 2 3 2 0 0 4 12 4
2. 2 1 0 1 3 2 = 5 3 2
0 3 1 0 2 0 3 11 6
7.3 Special matrices
(a) A matrix is called a square matrix if the number of rows is equal to the
number of columns.
AI = A = IA
where Aij is the minor matrix obtained by deleting row i and column j. It is
called the ij Cof actor of A. T
= (−1)2 (1)det (A11 ) + (−1)3 (1)det (A12 ) + (−1)4 (0)det (A13 ) + (−1)5 (−1)det (A14 )
= (1)(1)(−2) + (−1)(1)(−6) + (1)(0)(−2) + (−1)(−1)(−2)
=2
7.5 Inverses
Definition. A matrix I which has 1’s on the diagonal and 0’s everywhere
else is called the identity matrix. This matrix has the property that AI = A.
1 0
Example. 1. A 2 × 2 identity matrix has the form I = .
0 1
1 0 0
2. A 3 × 3 identity matrix has the form I = 0 1 0 .
0 0 1
Definition. Let A = (aij ) be a square matrix. A matrix B = (bij ) is called
the inverse of A if
AB = BA = I.
Remark. A matrix A has an inverse if and only if det(A) 6= 0.
Inverse of a 2 × 2 matrix
a b
Definition. The inverse of a 2 × 2 matrix, A = is given by,
c d
−1 1 d −b
A = .
−c a
ad − bc
1 1
Example. Find the inverse of the matrix A = .
1 2
Solution: We first check that the inverse of A exists!
det(A) = (1)(2) − (1)(1) = 1 6= 0.
Hence the inverse of A must exist and is given by
−1 1 2 −1
A = .
1 −1 1
We check that this is correct by multiplying A−1 A to see if we get the
identity matrix.
2 −1 1 1 (2)(1) + (−1)(1) (1)(1) + (−1)(2)
=
−1 1 1 2 (−1)(1) + (1)(2) (−1)(1) + (1)(2)
1 0
= .
0 1
We can find the inverse in another way: Write as (A|I2 )
1 1 1 0
.
1 2 0 1
Then use matrix row operations to get it into the form (I2 |B).
1 0 a b
.
0 1 c d
is the inverse of A.
Inverse of a 3 × 3 matrix
The method is the same as in the 2 × 2 case:
• Check determinant A is non-zero.
• Rewrite as (A|I3 ).
4.
3 −3 1
A−1 = −2 2 −1 .
−4 5 −2
Summary
1. The determinant of a 2 × 2 matrix is defined as follows:
a b
c d = ad − bc.
x1 − 2x2 = 0
−x1 + 2x2 = 0
det (λI − A) = 0
λ−4 0 −1
1 λ + 6 2 = 0
−5 0 λ
(λ − 4)((λ + 6)(λ) − 0) − 1(0 − (−5)(λ + 6)) = 0
λ3 + 2λ2 − 29λ − 30 = 0
λ2 +λ −30
3 2
λ + 1 |λ +2λ −29λ −30;
−λ3 +λ2
λ2 −29λ −30
− λ2 +λ
−30λ −30
− −30λ −30
0
The quotient is λ2 + λ − 30.
The remainder is 0.
Therefore λ3 + 2λ2 − 29λ − 30 = (λ + 1)(λ2 + λ − 30) + 0.
λ3 + 2λ2 − 29λ − 30 = 0
(λ + 1)(λ2 + λ − 30) = 0
(λ + 1)(λ + 6)(λ − 5) = 0
Therefore the eigenvalues are: {−1, −6, 5}.
λ2 −λ −2
3
λ + 1 |λ −3λ −2;
−λ3 +λ2
−λ2 −3λ −2
− −λ2 −λ
−2λ −2
− −2λ −2
0
The quotient is λ2 − λ − 2.
The remainder is 0.
Therefore λ3 − 3λ − 2 = (λ + 1)(λ2 − λ − 2) + 0.
λ3 − 3λ − 2 = 0
(λ + 1)(λ2 − λ − 2) = 0
(λ + 1)(λ + 1)(λ − 2) = 0
λ −1 −1
−1 λ −1 = 0
−1 −1 λ
λ(λ2 − (−1)(−1)) − (−1)((−1)λ − (−1)(−1)) − 1((−1)λ − (−1)(−1)) = 0
λ(λ2 − 1) + 1(−λ − 1) − 1(1 + λ) = 0
λ(λ − 1)(λ + 1) − 1(λ + 1) − 1(1 + λ) = 0
(λ + 1)(λ(λ − 1) − 1 − 1) = 0
(λ + 1)(λ2 − λ − 2) = 0
(λ + 1)2 (λ − 2) = 0
x2 − x3 = 0 =⇒ x2 = x3
x1 + x2 − 2x3 = 0 =⇒ x1 = x3
det (λI − A) = 0
λ−4 0 1
0
λ−3 0 = 0
−1 0 λ−2
λ3 − 9λ2 + 27λ − 27 = 0
(λ − 3)3 = 0
Example. Let us use this result to see why some repeated eigenvalues had
one or more linearly independent eigenvalues in the examples in the previous
section.
0 1 1
1. Recall A = 1 0 1
1 1 0
• has eigenvalue λ = −1 repeating 2 times.
• We found two linearly independent eigenvectors corresponding to this
eigenvalue.
−1 −1
~v1 = 1 , ~v2 = 0 .
0 1
We will use the above theorem to confirm that we should indeed expect
to find two linearly independent eigenvectors. By the above theorem, the
maximum number of linearly independent eigenvectors corresponding to
λ = −1 is:
= 3 − Rank(λI − A)
−1 −1 −1
= 3 − Rank −1 −1 −1
−1 −1 −1
=3−1
=2
6 3 −8
2. Recall A = 0 −2 0
−1 0 1
• has eigenvalue λ = −2 repeating 2 times.
• We found only one linearly independent eigenvector corresponding
to this
eigenvalue.
1
~v1 = 0 .
1
We will use the above theorem to confirm that we should indeed expect
to find only one linearly independent eigenvector. By the above theorem,
the maximum number of linearly independent eigenvectors corresponding
to λ = −2 is:
= 3 − Rank(λI − A)
−8 −3 8
= 3 − Rank 0 0 0
−1 0 1
=3−2
=1
4 0 −1
3. Recall A = 0 3 0
1 0 2
• has eigenvalue λ = 3 repeating 3 times.
• We found only two linearly independent eigenvectors corresponding
to this
eigenvalue.
0 1
~v1 = 1 , ~v2 =
0 .
0 1
We will use the above theorem to confirm that we should indeed expect to
find only two linearly independent eigenvectors. By the above theorem,
the maximum number of linearly independent eigenvectors corresponding
to λ = 3 is:
= 3 − Rank(λI − A)
−1 0 1
= 3 − Rank 0 0 0
−1 0 1
=3−1
=2
8.4 Diagonalization
Definition. A square matrix of size n is called a diagonal matrix if it is of
the form
d1 0 . . . 0
0 d2 0 . . 0
. . .
. . .
0 . . dn−1 0
0 . . . 0 dn
Definition. Two square matrices A and B of size n are said to be similar,
if there exists an invertible matrix P such that
B = P −1 AP
P −1 AP = P −1 P D,
= ID
=D
P −1 = P T .
(ii) Is A diagonalizable?
(i), (ii) Observe that A is a real symmetric matrix. By the above theorem, we
know that A is diagonalizable. i.e. we will be able to find a sufficient
number of linearly independent eigenvectors.
The eigenvalues of A were; −1, 2. We found two linearly
independent
−1 −1
eigenvectors corresponding to λ1 = −1: ~v1 = 1 , ~v2 = 0 .
0 1
1
And one eigenvector corresponding to λ2 = 2: 1 .
1
~u1 = ~v1
−1
((−1, 1, 0).(−1, 0, 1))
Proj~u1 ~v2 = 1
2
0
−1
1
= 1
2
0
~u2 = ~v2 − Proj~u1 ~v2
−1 −1/2
= 0 − 1/2
1 0
−1/2
= −1/2
1
Note that since ~u1 = ~v1 and ~u2 is a linear combination of ~v1 and ~v2 ,
the two new vectors are also eigenvectors of λ = −1. We now have a
set of orthogonal eigenvectors:
1 −1 −1/2
{ 1 , 1 , −1/2 }.
1 0 1
We normalize the vectors to get a set of orthonormal vectors:
√ √ √
1/√3 −1/√ 2 −1/√6
{ 1/√3 , 1/ 2 , −1/√ 6 }.
1/ 3 0 2/ 6
We are now finally ready to write the orthonormal diagonalizing matrix:
√ √ √
1√3 −1/√ 2 −1/√6
P = 1√3 1/ 2 −1/√ 6
1 3 0 2/ 6
and the corresponding diagonal matrix D
2 0 0
D = 0 −1 0 .
0 0 −1
P T AP = D.
Note. *:Look back at how we selected the eigenvecors ~v1 and ~v2 ; we chose
x2 = 1, x3 = 0 to get ~v1 and x2 = 0, x3 = 1 to get ~v2 . If we had chosen
x2 = 1, x3 = 0 to get ~v1 and x2 = −1/2, x3 = 1 to get ~v2 , then ~v1 and ~v2
would be orthogonal. However it is much easier to make arbitrary choices
for x1 and x2 and then use the Gram Schmidt Process to orthogonalize the
vectors as we have done in this example.
Summary
1. Suppose that A is an n × n square matrix. Suppose also that ~x is a
non-zero vector in Rn and that λ is a scalar so that,
A~x = λ~x.
det(λI − A) = 0.
(ii) To find all the eigenvalues of A, solve the characteristic equation for
λ.
(iii) For each eigenvalue λ, to find the corresponding set of eigenvectors,
find a non-zero solution to the linear system of equations:
(λI − A)~x = 0
References
1. http://tutorial.math.lamar.edu/Classes/LinAlg/EVal EVect Intro.aspx
2. http://www.sosmath.com/matrix/diagonal/diagonal.html
(i)
f : x 7→ ax,
where a is a real number.
Operator: the function f
Operates on: real numbers
Action: multiply by a.
(ii) Squaring
f : x 7→ x2
Operator: the function f
Operates on: real numbers
Action: squaring
(i)
â : f (x) 7→ af (x),
where a is a real number.
Operator: â
Operates on: scalar functions
Action: multiply by a.
(ii)
x̂ : f (x) 7→ xf (x),
Operator: x̂
Operates on: scalar functions
Action: multiply by x.
(iii) Differentiation Operator
d
D : f (x) 7→ f (x)
dx
Operator: D
Operates on: scalar functions
Action: Differentiate with respect to x.
We can similarly define partial differentiation operators, grad opera-
tor, integral operator, etc.
(iv) The Momentum Operator
~ ∂
P̂ =
i ∂x
where:
– ~ is Planck’s constant,
– i is the imaginary unit.
~ ∂ ~ ∂ψ(x, t)
P̂ = : ψ(x, t) 7→
i ∂x i ∂x
Operator: P̂
Operates on: wave function, ψ(x, t).
~v →
A : 7 A~
v
x1 1 1 x1 x1 + x2
7 → = .
x2 0 1 x2 x2
Operator: A
Operates on: two dimensional
vectors
x1 x1 + x2
Action: maps a vector to .
x2 x2
1. O = â : f (x) 7→ af (x).
Solution:
O(f + g) = a(f + g)
= af + ag
= O(f ) + O(g)
O(λf ) = a(λf )
= λaf
= λO(f )
Therefore O is linear.
2. O = squaring : x 7→ x2 .
Solution:
O(x + y) = (x + y)2
= x2 + y 2 + 2xy
= O(x) + O(y) + 2xy
O(1 + 2) = O(3) = 9
O(1) + O(2) = 1+4=5
Therefore D is linear.
1 1
4. A = : ~v 7→ A~v .
0 1
Solution:
1 1 x1 y1
A(~v + w)
~ = ( + )
0 1 x2 y2
1 1 x1 + y1
= ( )
0 1 x2 + y2
(x1 + y1 ) + (x2 + y2 )
=
x2 + y2
x1 + x2 y1 + y2
= +
x2 y2
1 1 x1 1 1 y1
= +
0 1 x2 0 1 y2
= A(~v ) + A(w)~
1 1 x1
A(λ~v ) = (λ )
0 1 x2
1 1 λx1
=
0 1 λx2
λx1 + λx2
=
λx2
x1 + x2
= λ
x2
1 1 x1
= λ
0 1 x2
= λA~v
Therefore A is linear.
9.3 Composing Operators
When we have two operators and we want to apply them to a function in
sequence, we use the notation O1 ◦ O2 .
O1 ◦ O2 : f 7→ O1 (O2 (f )).
O1 : f (x) 7→ xf (x)
O2 : g(x) 7→ (g(x))2
Find O1 ◦ O2 and O2 ◦ O1 .
We now find O2 ◦ O1 .
Solution:
[D, xD] = D ◦ xD − xD ◦ D
= xD2 + D − xD2
= D
3. Consider the two operators
d
O1 = D + 1 : f (x) 7→ (D + 1)f (x) = f (x) + f (x)
dx
d
O1 = D + 2 : f (x) 7→ (D + 2)f (x) = f (x) + 2f (x)
dx
[O1 , O2 ] = O1 ◦ O2 − O2 ◦ O1
= (D2 + 3D + 2) − (D2 + 3D + 2) = 0
∂ ∂
4. Find the commutator [x ∂y , y ∂x ].
Solution:
∂ ∂ ∂ ∂ ∂ ∂
[x ,y ] = x ◦y −y ◦x
∂y ∂x ∂y ∂x ∂x ∂y
∂ ∂ ∂ ∂
(x ◦ y )(f ) = x (y (f )
∂y ∂x ∂y ∂x
∂2f ∂f
= x(y + )
∂y∂x ∂x
∂2 ∂
= (xy + x )(f )
∂y∂x ∂x
∂ ∂ ∂ ∂
(y ◦ x )(f ) = y (x (f )
∂x ∂y ∂x ∂y
∂2f ∂f
= y(x + )
∂x∂y ∂y
∂2 ∂
= (xy + y )(f )
∂x∂y ∂x
Therefore the commutator is:
∂ ∂ ∂ ∂ ∂ ∂
[x ,y ] = x ◦y −y ◦x
∂y ∂x ∂y ∂x ∂x ∂y
2
∂ ∂ ∂2 ∂
= (xy + x ) − (xy +y )
∂y∂x ∂x ∂x∂y ∂x
∂ ∂
= x −y
∂x ∂y
Solution:
∂ ∂
[Ê, t̂]ψ(x, t) = (i~ ◦ t̂ − t̂ ◦ i~ )(ψ(x, t))
∂t ∂t
∂ ∂
= (i~ ◦ t̂)(ψ(x, t)) − (t̂ ◦ i~ )(ψ(x, t))
∂t ∂t
∂ ∂(ψ(x, t))
= i~ (tψ(x, t)) − ti~
∂t ∂t
∂(ψ(x, t)) ∂t ∂(ψ(x, t))
= i~t + i~(ψ(x, t)) − ti~
∂t ∂t ∂t
= i~(ψ(x, t))
6. Find the commutator of the following two operators.
~2 ∂ 2
Ĥ : ψ(x, t) 7→ − ψ(x, t)
2m ∂x2
x̂ : ψ(x, t) 7→ xψ(x, t)
Solution:
[Ĥ, x̂] = Ĥ ◦ x̂ − x̂ ◦ Ĥ
~2 ∂ 2
(Ĥ ◦ x̂)(ψ(x, t)) = − (x̂(ψ))
2m ∂x2
~2 ∂ 2
=− (x(ψ))
2m ∂x2
~2 ∂ ∂
=− ( (xψ))
2m ∂x ∂x
~2 ∂ ∂ψ
=− (x + ψ)
2m ∂x ∂x
~2 ∂ ∂ψ ∂ψ
=− ( (x ) + )
2m ∂x ∂x ∂x
~2 ∂ 2 ψ ∂ψ
=− (x 2 + 2 )
2m ∂x ∂x
~2 x ∂ 2 ~2 ∂
Ĥ ◦ x̂ = − −
2m ∂x2 m ∂x
2 2
~ ∂
(x̂ ◦ Ĥ)(ψ(x, t)) = (x̂ ◦ − )(ψ)
2m ∂x2
~2 x ∂ 2 ψ
=−
2m ∂x2
~2 x ∂ 2
x̂ ◦ Ĥ = −
2m ∂x2
~2 ∂ 2 ~2 ∂ ~2 x ∂ 2
[Ĥ, x̂] = − x 2− +
2m ∂x m ∂x 2m ∂x2
2
~ ∂
=−
m ∂x
[A ◦ B, C] = A ◦ [B, C] + [A, C] ◦ B.
Solution:
A ◦ [B, C] + [A, C] ◦ B = A ◦ (B ◦ C − C ◦ B) + (A ◦ C − C ◦ A) ◦ B
= A◦B◦C −A◦C ◦B+A◦C ◦B−C ◦A◦B
= (A ◦ B) ◦ C − C ◦ (A ◦ B)
= [A ◦ B, C]
[D2 , ex ] = D2 ◦ ex − ex ◦ D2
Try the direct method at home. In class we will use the identity to find
the commutator.
[OA , OB ] = OA ◦ OB − OB ◦ OA .
10 Fourier Series
10.1 Introduction
When the French mathematician Joseph Fourier (1768-1830) was trying to
study the flow of heat in a metal plate, he had the idea of expressing the
heat source as an infinite series of sine and cosine functions. Although the
original motivation was to solve the heat equation, it later became obvious
that the same techniques could be applied to a wide array of mathematical
and physical problems.
In this course, we will learn how to find Fourier series to represent periodic
functions as an infinite series of sine and cosine terms.
A function f (x) is said to be periodic with period T , if
The period of the function f (t) is the interval between two successive repe-
titions.
Orthogonality conditions
(i) The average value of cos(nx) and sin(nx) over a period is zero.
Z π
cos(nx)dx = 0
−π
Z π
sin(nx)dx = 0
−π
Remark. Notice that we are not saying f (x) is equal to its Fourier Series.
Later we will discuss conditions under which that is actually true.
Example. Find the Fourier coefficients and the Fourier series of the square-
wave function f defined by
0 if −π ≤ x < 0
f (x) = and f (x + 2π) = f (x)
1 if 0 ≤ x < π
Since f is even,
bn = 0
2 π
Z
an = f (x) cos(nx)dx
π 0
Using the formulas for the Fourier coefficients we have
2 π
Z
an = f (x) cos(nx)dx
π 0
2 π 2
Z
= (π − x2 ) cos(nx)dx
π 0
Z π
2 2 2 sin nx π
sin nx
= ( (π − x ) 0
− −2x dx)
π n 0 n
Z π
2 sin nπ sin 0 sin nx
= ([(π 2 − π 2 ) − (π 2 − 0) ]+ 2x dx)
π n n 0 n
22 π
Z
= x sin(nx)dx
πn 0
Z π
22 cos nx π cos nx
= ( −x 0
− (− )dx)
πn n 0 n
221 sin nx
= ([−π cos nπ] + [ 2 ]π0 )
πnn n
4
= − 2 cos nπ
n
−4/n2 if n is even
=
4/n2 if n is odd
It remains to calculate a0 .
2 π 2
Z
a0 = (π − x2 )dx
π 0
2 x3
= [π 2 x − ]π0
π 3
2
4π
=
3
The Fourier Series of f is therefore
1
f (x) = a0 + a1 cos x + a2 cos 2x + a3 cos 3x + ...
2
b1 sin x + b2 sin 2x + b3 sin 3x + ...
2π 2 1 1 1 1
= + 4(cos x − cos 2x + cos 3x − cos 4x + cos 5x + ....)
3 4 9 16 25
10.6 Functions with period 2L
If a function has period other than 2π, we can find its Fourier series by making
a change of variable. Suppose f (x) has period 2L, that is f (x + 2L) = f (x)
for all x. If we let
πx Lt
t= and g(t) = f (x) = f ( )
L π
then, g has period 2π and x = ±L corresponds to t = ±π. We know the
Fourier series of g(t):
∞
1 X
a0 + (an cos nt + bn sin nt).
2 n=1
where
1 π
Z
a0 = f (t)dt
π −π
1 π
Z
an = f (t) cos(nt)dt
π −π
1 π
Z
bn = f (t) sin(nt)dt
π −π
Lt πx
If we now use the Substitution Rule with x = π
, then t = L
, dt = ( Lπ )dx,
we have the following:
Definition. If f (x) is a piecewise continuous function on [−L, L], its Fourier
Series is ∞
1 X nπx nπx
a0 + an cos( ) + bn sin( ),
2 n=1
L L
where
1 L
Z
a0 = f (x)dx
L −L
1 L
Z
nπx
an = f (x) cos( )dx
L −L L
1 L
Z
nπx
bn = f (x) sin( )dx
L −L L
Example. Find the Fourier series of the triangular wave function defined
by f (x) = |x| − a for −a ≤ x ≤ a and f (x + 2) = f (x) for all x.
Therefore,
bn = 0
2 a
Z
nπx
an = f (x) cos( )dx
a 0 a
Using the formulas for the Fourier coefficients we have
2 a
Z
nπx
an = (|x| − a) cos( )dx
a 0 a
2 a
Z
nπx
= (x − a) cos( )dx
a 0 a
sin( nπx sin( nπx
Z a
2 a
) a a
)
= ( (x − a) nπ 0
− a nπ dx)
a a 0 a
2 a2 nπx a
= ( 2 2 cos( ) 0)
a nπ a
2a
= 2 2 (cos nπ − 1)
nπ
(
0 if n is even
= 4a
− 2 2 if n is odd
nπ
It remains to determine a0 .
2 a
Z
a0 = |x| − adx
a 0
2 a
Z
= x − adx
a 0
2 x2
= [ − ax]a0
a 2
= −a
Then ∞
Z L
1 1 X
(f (x))2 dx = a20 + (a2n + b2n ).
L −L 2 n=1
• an = 0 and
RL
• bn = π2 0 f (x) sin( nπx
L
)dx
5. Parseval’s Result
Z L ∞
1 1 X
(f (x))2 dx = a20 + (a2n + b2n ).
L −L 2 n=1
References
1. http://www.intmath.com/Fourier-series/Fourier-intro.php
2. http://www.falstad.com/fourier/e-index.html