HomeHow to Draw Contour Lines of a Multivariable Function Free original lessons
How to Draw Contour Lines of a Multivariable Function
Learn to plot level curves for f(x,y)=c by solving, sampling points, and connecting them smoothly. Includes worked example, practice, rubric, and common fixes.
Free lesson
Four exercises
Worked answers
Algebra and Function Practice
A contour line (level curve) shows all points in the domain where a multivariable function equals a chosen constant. Drawing contours by hand builds intuition for gradients, surfaces, and optimization. The method below uses algebra to find curve families, a sampling grid to locate points, and a consistent convention for connecting them. Because hand-drawn curves vary, the rubric rewards correct level values, correct point placement, smooth connections, and clear labeling rather than pixel-perfect shapes.
Practice materials: Printable downloads are not available for this lesson yet. Use the instructions and four exercises below.
Set up the level equation and identify the curve family
Given z=f(x,y) and a level value c, write f(x,y)=c. Simplify algebraically to recognize the curve type. For f(x,y)=x^2+y^2, the level x^2+y^2=c is a circle of radius sqrt(c) when c>0, a single point when c=0, and empty when c<0. For f(x,y)=x+y, the level x+y=c is the line y=c-x. For f(x,y)=xy, the level xy=c is y=c/x for x not zero, a hyperbola branch pair.
Choose level values that produce distinct, readable curves. For circles, c=1,4,9 give radii 1,2,3. For lines, c=-2,0,2 give parallel lines. For hyperbolas, c=1 and c=-1 give branches in opposite quadrants. Label each contour with its c value near an end or along the curve.
- Write f(x,y)=c and simplify.
- Identify the curve family and any restrictions such as x not zero.
- Select three to five level values that fit the grid.
- Compute key intercepts or radii for each level.
- Sketch axes, scale, and grid before plotting points.
Sample points on a grid and connect them smoothly
Use a table of x values and solve for y, or vice versa, to get points that satisfy f(x,y)=c. For x^2+y^2=4, choose x=-2,-1,0,1,2 and compute y=±sqrt(4-x^2). Plot both signs. For x+y=2, choose x=-1,0,1,2 and compute y=3,2,1,0. For xy=1, choose x=0.5,1,2 and compute y=2,1,0.5; also plot the branch for negative x and y.
Connect points with a smooth curve that respects symmetry and asymptotes. Do not connect across a gap where the function is undefined. Use a light pencil for construction points and a darker line for the final contour. Keep spacing between contours consistent with the level values: equal c steps usually give equal visual spacing for linear functions, but not for nonlinear ones.
- Make a small table of at least four points per contour.
- Plot points lightly and check they satisfy f(x,y)=c.
- Connect points in order without sharp corners unless the true curve has them.
- Mark asymptotes or excluded values with dashed lines if helpful.
- Label each contour with its c value.
Use a consistent convention and check your drawing
Adopt a stated convention: for example, solid curves for positive levels, dashed for negative, and a dot for zero if it is a single point. State the convention on the worksheet. Because handwriting and curve shapes vary, a valid alternative is any drawing that passes through the computed points, has the correct curve family, and is labeled correctly.
Check by picking one plotted point per contour and substituting into f(x,y). The result must equal c. Check that contours do not cross unless the function has a saddle where levels meet at a point. Check that labels match the level values and that axes have consistent units.
- State your line convention at the top of the page.
- Substitute one point per contour into the formula.
- Verify no contour crosses another except at a shared point.
- Confirm labels and scale are readable.
- Compare spacing to expected behavior near the origin or asymptotes.
Worked example
Draw contour lines for f(x,y)=x^2+y^2 at c=1,4,9 on a grid from -4 to 4 in both axes. Label each contour.
Worked answer
The levels are circles centered at the origin with radii 1,2,3. Plot points: for c=1, (1,0),(0,1),(-1,0),(0,-1); for c=4, (2,0),(0,2),(-2,0),(0,-2); for c=9, (3,0),(0,3),(-3,0),(0,-3). Connect each set smoothly into a circle. Label the circles c=1, c=4, c=9. Use solid lines for all positive levels and state that convention.
Four practice exercises
Exercise 1
Draw contour lines for f(x,y)=x+y at c=-2,0,2 on a grid from -3 to 3. Label each line.
Show answer and check
The levels are parallel lines y=-2-x, y=-x, and y=2-x. Sample points: for c=-2, (-2,0),(0,-2),(1,-3); for c=0, (-1,1),(0,0),(1,-1); for c=2, (0,2),(1,1),(2,0). Connect each set with a straight line and label c=-2, c=0, c=2.
Why: Each level equation is linear, so the contour is a straight line. Plotting three points per line fixes its position and slope.
Check: Substitute one point per line into x+y and confirm it equals the labeled c. Check that lines are parallel and do not cross.
Exercise 2
Draw contour lines for f(x,y)=xy at c=1 and c=-1 on a grid from -3 to 3, excluding x=0 and y=0. Label each branch.
Show answer and check
For c=1, plot (0.5,2),(1,1),(2,0.5) and (-0.5,-2),(-1,-1),(-2,-0.5). For c=-1, plot (0.5,-2),(1,-1),(2,-0.5) and (-0.5,2),(-1,1),(-2,0.5). Connect points in each quadrant smoothly as hyperbola branches. Mark axes with dashed lines to show exclusion. Label c=1 on the first-quadrant branch and c=-1 on the second-quadrant branch, with matching labels on opposite branches.
Why: The level xy=c gives y=c/x, a hyperbola. Positive c gives branches in quadrants I and III; negative c gives branches in quadrants II and IV.
Check: Pick one point per branch and verify the product equals the labeled c. Confirm branches do not cross the axes and are not connected across quadrants.
Exercise 3
Draw contour lines for f(x,y)=x^2+y^2 at c=0 and c=2 on a grid from -3 to 3. Explain what the c=0 contour is.
Show answer and check
For c=2, the contour is a circle of radius sqrt(2) approximately 1.41. Plot (1.41,0),(0,1.41),(-1.41,0),(0,-1.41) and connect smoothly. For c=0, the only real point is (0,0), so draw a labeled dot at the origin and state that the level is a single point. Label the circle c=2 and the dot c=0.
Why: x^2+y^2=c has real solutions only when c is at least 0. At c=0, both squares must be zero, giving the origin.
Check: Substitute the plotted circle points into x^2+y^2 and confirm they equal 2. Confirm the dot at the origin gives 0.
Exercise 4
Draw contour lines for f(x,y)=y-x^2 at c=0 and c=1 on a grid from -2 to 2 in x and 0 to 5 in y. Label each parabola.
Show answer and check
For c=0, y=x^2. Plot (-2,4),(-1,1),(0,0),(1,1),(2,4) and connect smoothly. For c=1, y=x^2+1. Plot (-2,5),(-1,2),(0,1),(1,2),(2,5) and connect smoothly. Label the lower parabola c=0 and the upper parabola c=1. State that both are parabolas opening upward.
Why: Solving y-x^2=c gives y=x^2+c, a parabola shifted vertically by c. The two levels are parallel parabolas.
Check: Substitute one point per parabola into y-x^2 and confirm it equals the labeled c. Check that the c=1 parabola is one unit above the c=0 parabola at each x. Confirm all plotted points lie within the stated grid ranges.
Common mistakes
- Plotting points that do not satisfy f(x,y)=c. Substitute each point into the equation before connecting. If it fails, recompute y from the level equation.
- Connecting hyperbola branches across the axes. Keep branches separate and mark excluded values such as x=0 with a dashed line.
- Using equal spacing for nonlinear contours without checking. Compute radii or intercepts for each level; spacing changes with c for circles and hyperbolas.
- Forgetting to label contours with their c values. Write the level value near an end of each curve and include a small legend if needed.
Self-check rubric
- Level equations are written correctly for each chosen c.
- At least four points per contour are plotted and satisfy f(x,y)=c.
- Curves are smooth and match the correct family (circle, line, hyperbola).
- Contours are labeled with their c values and axes have consistent units.
- A stated line convention is followed, and valid alternative curve shapes are accepted if points and labels are correct.
Questions and answers
What is the difference between a contour line and a level curve?
They are the same idea: a contour line is the set of points where f(x,y)=c. In maps, contour lines often represent elevation; in calculus, they represent any constant function value.
How many level values should I plot?
Three to five is usually enough to show the pattern. Choose values that fit the grid and produce distinct curves, such as c=1,4,9 for circles.
Can contours cross?
Contours for different c values cannot cross at any point where f is defined, because f would have two values there. At a saddle point, the level curve for the saddle value can self-intersect (for example, xy=0 is the two axes meeting at the origin); distinct nonzero levels only approach one another.
What if the level equation has no real points?
Then that level is empty in the real plane. State that no contour exists for that c and choose another value.