From a Function to a Contour Map
A function \(f(x,y)\) assigns a height to each point \((x,y)\) in its domain. Its graph is a surface in three-dimensional space, but we can represent selected heights of that surface on the two-dimensional \(xy\)-plane. The resulting drawing is a contour map.
To make one, choose several height values, solve \(f(x,y)=c\) for each chosen value \(c\), and draw the resulting level curves in the same coordinate plane. Each curve must be labeled with the height it represents. A contour map is therefore not just a collection of shapes: the equation and its labels carry the height information.
A Reliable Construction Process
The domain matters. Draw only the parts of a level curve that lie in the domain being represented. If the problem specifies a rectangular viewing region, for example, parts of a curve outside that rectangle do not belong in the map. The heights should also be chosen to make the map informative: several distinct values can show how the level curves change across the region.
Identify the part of the \(xy\)-plane on which the map is to be drawn.
Select values \(c\) that the function attains in the region. Include enough values to show the level sets clearly.
For each chosen \(c\), find all points in the region satisfying \(f(x,y)=c\).
Draw each resulting curve or set of points, restrict it to the region, and write its height \(c\) beside it.
Substitute plotted points into \(f\) to confirm that they have the height assigned to their curve.
Solving the level equation is the central step. A sketch made from the general appearance of a formula can miss branches, omit domain restrictions, or assign the wrong labels. The equation gives a precise test for every point that is drawn.
Worked Example: A Map of a Plane
Worked Example: Contours of \(f(x,y)=2x+y\)
Draw selected contours on the square \(-2\leq x\leq 2\), \(-2\leq y\leq 2\). Choose heights \(c=-4,-2,0,2,4\).
For any chosen height \(c\), solve \(2x+y=c\) for \(y\):
Each contour is a portion of this line within the square. Find its boundary intersections to determine the part to draw.
- For \(c=-4\), the line is \(y=-4-2x\). At \(x=-2\), \(y=0\); at \(y=-2\), \(x=-1\). Draw the segment from \((-2,0)\) to \((-1,-2)\), and label it \(-4\).
- For \(c=-2\), the line is \(y=-2-2x\). At \(x=-2\), \(y=2\); at \(y=-2\), \(x=0\). Draw the segment from \((-2,2)\) to \((0,-2)\), and label it \(-2\).
- For \(c=0\), the line is \(y=-2x\). The square boundary gives \((-1,2)\) and \((1,-2)\). Draw the segment between these points, and label it \(0\).
- For \(c=2\), the line is \(y=2-2x\). Its segment has endpoints \((0,2)\) and \((2,-2)\). Label it \(2\).
- For \(c=4\), the line is \(y=4-2x\). Its segment has endpoints \((1,2)\) and \((2,0)\). Label it \(4\).
Check the first contour at its endpoints: \(f(-2,0)=2(-2)+0=-4\), and \(f(-1,-2)=2(-1)-2=-4\). The other endpoint checks follow directly from their level equations; for instance, \(f(2,0)=4\), as required for the height-\(4\) contour. Each drawn segment is clipped to the square.
Worked Example: Curved Contours in a Rectangle
Worked Example: Contours of \(f(x,y)=x^2+y\)
Construct selected contours on the rectangle \(-1\leq x\leq 1\), \(-1\leq y\leq 3\), using heights \(c=0,1,2,3\).
Set the function equal to a chosen height and solve for \(y\):
For every selected height, draw this curve for \(-1\leq x\leq 1\), keeping only points with \(-1\leq y\leq 3\). The following points help locate each curve:
- At \(c=0\), \(y=-x^2\). The points at \(x=-1,0,1\) are \((-1,-1),(0,0),(1,-1)\). Draw the arc through them and label it \(0\).
- At \(c=1\), \(y=1-x^2\). The corresponding points are \((-1,0),(0,1),(1,0)\). Draw the arc and label it \(1\).
- At \(c=2\), \(y=2-x^2\). The points are \((-1,1),(0,2),(1,1)\). Draw the arc and label it \(2\).
- At \(c=3\), \(y=3-x^2\). The points are \((-1,2),(0,3),(1,2)\). Draw the arc and label it \(3\).
Check the height-\(2\) contour at \(x=-1,0,1\): the function values are \(f(-1,1)=1+1=2\), \(f(0,2)=0+2=2\), and \(f(1,1)=1+1=2\). Thus each listed point belongs to the curve labeled \(2\). The same substitution verifies the listed points for the other labels. The specified rectangle contains all four arcs.
Why the Equation Determines the Whole Contour
A level curve is defined by an equality, so solving that equality gives an exact description of the points to draw. The logic works in both directions: every point on the contour satisfies the equation, and every point in the domain satisfying the equation belongs to the contour.
This also gives a useful check on the labels. If a point belonged to contours labeled \(c\) and \(d\), then the function would have to satisfy both \(f(x,y)=c\) and \(f(x,y)=d\). Hence \(c=d\). Distinct height contours cannot cross at a point in the domain. If a sketch shows two differently labeled contours crossing, either the drawing or the labels need correction.
Worked Example: Positive, Zero, and Negative Heights
Worked Example: Contours of \(f(x,y)=x^2-y^2\)
Draw contours at heights \(c=-1,0,1\) in the square \(-2\leq x\leq2\), \(-2\leq y\leq2\). Start from
For \(c=0\), factor the equation:
Thus \(y=x\) or \(y=-x\). Draw both diagonal segments through the square, and label each segment \(0\). For example, at \((1,1)\), \(f(1,1)=1-1=0\), and at \((1,-1)\), \(f(1,-1)=1-1=0\).
For \(c=1\), rearrange to obtain \(y^2=x^2-1\). Real points require \(x^2-1\geq0\), so \(|x|\geq1\), and the two possible \(y\)-values are \(y=\sqrt{x^2-1}\) and \(y=-\sqrt{x^2-1}\). Within the square, plot the branches for \(1\leq |x|\leq2\). Useful exact points include \((\sqrt{2},1)\) and \((-\sqrt{2},-1)\); both satisfy the equation. For example, \(f(\sqrt{2},1)=2-1=1\). Label the resulting contour \(1\).
For \(c=-1\), rearrange to obtain \(y^2=x^2+1\), so \(y=\sqrt{x^2+1}\) or \(y=-\sqrt{x^2+1}\). The square restricts the plotted points to \(|x|\leq\sqrt{3}\), since \(y^2\leq4\) requires \(x^2+1\leq4\). Plot both branches in that range and label them \(-1\). Points \((0,1)\) and \((\sqrt{3},2)\) lie on this contour: \(f(0,1)=0-1=-1\), and \(f(\sqrt{3},2)=3-4=-1\).
The algebraic conditions specify which parts of each curve lie in the square. They also show why checking the domain is essential: a formula for a curve may include points outside the region of the map.
Choosing Heights and Avoiding Drawing Errors
There is no single required spacing between chosen heights. A useful first choice is a short list of values that the function actually attains in the region. If a proposed height has no solutions there, it contributes no contour to that map. If a contour meets the edge of the viewing region, draw only the portion inside and make its label clear.
Three common mistakes are especially easy to prevent:
- Drawing from the formula without solving it. For each selected \(c\), write and solve \(f(x,y)=c\); do not assume all heights produce the same curve.
- Ignoring the region. Check that every plotted point lies in the domain or viewing window, and clip the curve at its boundary.
- Forgetting labels or assigning them by appearance. Attach the value \(c\) to the curve obtained from \(f(x,y)=c\), then verify representative points by substitution.
A concise way to organize a hand-drawn map is to keep a small working table: record each selected height, its solved equation, and a few points. Plot the points, connect them according to the equation, and write the height beside the resulting curve. The equation remains the authority when a rough sketch is ambiguous.
Check Your Understanding
Use the definitions and construction steps to answer these questions.
- What equation must be solved to draw the contour at height \(c\) for a function \(f(x,y)\)?
- For \(f(x,y)=x+y\), what equation describes the contour at height \(3\)?
- For \(f(x,y)=x^2+y\), find the contour equation at height \(2\) and verify whether \((1,1)\) lies on it.
- Why should a level curve be restricted to the specified domain or viewing region?
- Explain why two contours with different labels cannot cross at a point in the domain.