PX153 - H2 - visualising variability of a scalar function - contours
-
contours - eg think of height,
, as a function of position int he plane, ie: -
contour lines mark out lines of constant height, ie: defined by
, where is a constant -
we will show that the direction of greatest rate of change is perpendicular to the contour
-
consider two contour lines that are close together, ie:
, and , where , and is small -
consider the rate of change along
, where is perpendicular to the contour, compared to the rate of change along
, and
-
for infinitesimally small changes:
- the change in
, , between and is the same as between and . so, the rate is determined just by the length - thus, the directional derivative, given by
, gives the highest change of and is always perpendicular to the contour of constant . this gives a geometrical definition of - we would show shortly that this is equivalent to our previous definition:
-
eg: for
, find , evaluate the gradient at , and hence find the direction of the fastest change in at that point - for gradient:
- at all points, gradient is
, magnitude , and direction - the contour lines are:

-
eg: at
find the direction along which changes most rapidly - taking the directional derivative:
- at
: - the direction is given by
-
we now show that
is perpendicular to the tangent of the contour line of , consistent with our geometrical definition -
let
define a contour, which is parameterized by , ie: all points on this contour are given by -
varying
takes us aroufd this contour, on which the function assumes an arbitrary constant value , thus:
- this derivative can be rewritten as:
$$df = \frac{\partial f}{\partial x} dx + \frac{\partial f}{\partial y} dy \implies \frac{df}{dq} = \frac{\partial f}{\partial x} \frac{dx}{dq} + \frac{\partial f}{\partial y} \frac{dy}{dq}$$
- can write this as a scalar product:
$$\frac{df}{dq}= (\frac{\partial f}{\partial x},\frac{\partial f}{\partial y})\cdot ( \frac{dx}{dq}, \frac{dy}{dq})$$
- the vector
is the direction of the tangent to the contour:
- eg: what are the shapes of the contour lines of the function,
? find the general expression for the gradient - contour lines are defined by
- ie: circles of radius
centred on the origin
- ie: circles of radius
- the gradient is given by:
- contour lines are defined by
\1\n\2\n