The level sets of a function are all the input values that result in some defined output value . Another way to interpret a level set is that in a topographical map of, say, a mountain, the level sets are all the different areas in the mountain that are of the same height.
Definition
Level Set ^definition
For any function of arity (i.e. a function with arguments) with domain , the level set is defined as the set:
where is some value in .
Note the gradient vector is always perpendicular to the level set.
Contour
Contour ^definition-contour
A level set in 2 dimensions, i.e. is called a contour:
That is, the contour defines all the points that have the same -value i.e. all inputs which have the same output .
The contour is sometimes called a level curve.
Visualisation
%%🖋 Edit in Excalidraw, and the dark exported image%%
Examples
1: Level sets of a paraboloid
Sketch the level sets for the function
Solution
Note that technically these are contours, but contours are level sets as well. We let:
This is the equation of a circle with radius . So we have level curves:
%%🖋 Edit in Excalidraw, and the dark exported image%%