The Central Idea

For a function of two variables,

\[ z=f(x,y), \]

three related questions appear immediately:

  1. Which ordered pairs \((x,y)\) are allowed as inputs?
  2. Which values of \(z\) can the function actually produce?
  3. Where in the \(xy\)-plane does the function take a specified value?

These questions lead to the domain, range, and level sets of the function.

Domain

The domain of a function is the set of all inputs for which the function is defined.

For a function

\[ f:\mathbb{R}^2\to\mathbb{R}, \]

the domain is usually a subset of the \(xy\)-plane.

We may write

\[ \operatorname{Dom}(f)\subseteq\mathbb{R}^2. \]

Range

The range is the set of all output values actually produced by inputs from the domain.

If

\[ z=f(x,y), \]

then

\[ \operatorname{Range}(f) = \{f(x,y):(x,y)\in\operatorname{Dom}(f)\}. \]

The codomain and the range are not always the same. A codomain may contain values the function never reaches.

Level Sets

A level set is the set of all inputs that produce the same chosen output value.

For

\[ z=f(x,y), \]

the level set corresponding to the constant \(c\) is defined by

\[ \boxed{f(x,y)=c}. \]

In two input dimensions, these are often called level curves or contour curves.

Three Different Objects

It is important not to confuse the domain, range, and graph.

For \(z=f(x,y)\), the domain lies in the \(xy\)-plane, the range lies on the \(z\)-axis, and the graph lies in three-dimensional space.

Natural Domain

When a formula is given without an explicitly stated domain, we usually assume its natural domain: all real input combinations for which the formula makes sense as a real-valued expression.

The main restrictions usually come from:

Example: A Polynomial Function

Consider

\[ f(x,y)=x^2+3xy-y^3. \]

Polynomials are defined for every real value of each variable. Therefore,

\[ \boxed{\operatorname{Dom}(f)=\mathbb{R}^2}. \]

Example: A Rational Function

Consider

\[ f(x,y)=\frac{x+y}{x-y}. \]

The denominator cannot equal zero:

\[ x-y\neq 0. \]

Therefore,

\[ \boxed{\operatorname{Dom}(f)=\{(x,y)\in\mathbb{R}^2:x\neq y\}}. \]

Geometrically, the line \(y=x\) is removed from the plane.

Domain as a Region

In one-variable calculus, domains are often intervals on a number line. In multivariable calculus, domains are often regions in the plane or space.

A condition such as

\[ x^2+y^2<9 \]

describes the interior of a circle of radius \(3\).

A condition such as

\[ x^2+y^2\le 9 \]

includes both the interior and the boundary circle.

Example: Square Root Restriction

Consider

\[ f(x,y)=\sqrt{9-x^2-y^2}. \]

The expression under the square root must be nonnegative:

\[ 9-x^2-y^2\ge 0. \]

Rearranging,

\[ x^2+y^2\le 9. \]

Therefore,

\[ \boxed{\operatorname{Dom}(f)=\{(x,y):x^2+y^2\le 9\}}. \]

Boundary Points Can Matter

In the previous example,

\[ f(x,y)=\sqrt{9-x^2-y^2}, \]

points satisfying

\[ x^2+y^2=9 \]

are allowed because the radicand becomes \(0\), and \(\sqrt{0}\) is defined.

The boundary circle is therefore part of the domain.

Example: Reciprocal of a Square Root

Now consider

\[ g(x,y)=\frac{1}{\sqrt{9-x^2-y^2}}. \]

The square root must exist, but it also appears in the denominator. Therefore,

\[ 9-x^2-y^2>0. \]

So

\[ \boxed{\operatorname{Dom}(g)=\{(x,y):x^2+y^2<9\}}. \]

The boundary circle is excluded.

Example: Logarithmic Restriction

Consider

\[ f(x,y)=\ln(4-x^2-y^2). \]

The logarithm requires a strictly positive argument:

\[ 4-x^2-y^2>0. \]

Thus,

\[ \boxed{\operatorname{Dom}(f)=\{(x,y):x^2+y^2<4\}}. \]

Combining Restrictions

A formula may impose several restrictions at once.

Consider

\[ f(x,y)=\frac{\sqrt{y-x^2}}{x-1}. \]

The square root requires

\[ y-x^2\ge 0, \]

while the denominator requires

\[ x\neq 1. \]

Therefore,

\[ \boxed{\operatorname{Dom}(f)= \{(x,y):y\ge x^2,\ x\neq 1\}}. \]

Reading Inequalities Geometrically

Domain conditions are easier to understand when translated into geometry.

For example,

\[ y\ge x^2 \]

describes all points on or above the parabola \(y=x^2\).

The restriction

\[ x\neq 1 \]

then removes the vertical line \(x=1\) from that region.

Domain Restrictions in Three Variables

For a function of three variables,

\[ w=f(x,y,z), \]

the domain is usually a subset of \(\mathbb{R}^3\).

For example,

\[ f(x,y,z)=\sqrt{16-x^2-y^2-z^2} \]

has domain

\[ \boxed{x^2+y^2+z^2\le16}, \]

the solid ball of radius \(4\) centered at the origin.

Finding a Range Can Be Harder

Domain restrictions often come directly from the formula. Range questions can be more subtle because we must determine every output value that can actually occur.

Common strategies include:

Example: Range of a Sum of Squares

Consider

\[ f(x,y)=x^2+y^2. \]

Because squares are nonnegative,

\[ x^2+y^2\ge0. \]

Every nonnegative number can occur. For example, if \(c\ge0\), choose \(x=\sqrt{c}\) and \(y=0\).

Therefore,

\[ \boxed{\operatorname{Range}(f)=[0,\infty)}. \]

Example: Range of a Negative Sum of Squares

Consider

\[ f(x,y)=5-x^2-y^2. \]

Since

\[ x^2+y^2\ge0, \]

we have

\[ f(x,y)\le5. \]

The maximum value \(5\) occurs at \((0,0)\), and arbitrarily negative values occur as \(x^2+y^2\) grows.

Thus,

\[ \boxed{\operatorname{Range}(f)=(-\infty,5]}. \]

Example: Range Restricted by the Domain

Let

\[ f(x,y)=x^2+y^2 \]

but restrict the domain to

\[ x^2+y^2\le9. \]

Now the output satisfies

\[ 0\le f(x,y)\le9. \]

Therefore,

\[ \boxed{\operatorname{Range}(f)=[0,9]}. \]

The same formula can have a different range when its domain changes.

The Domain Influences the Range

The function rule alone does not always determine the range. The allowed input set matters.

Compare

\[ f(x,y)=x^2+y^2 \]

on all of \(\mathbb{R}^2\) with the same formula on the unit disk

\[ x^2+y^2\le1. \]

The first has range \([0,\infty)\); the second has range \([0,1]\).

Level Curves

For a function of two variables,

\[ z=f(x,y), \]

fixing \(z=c\) produces

\[ f(x,y)=c. \]

This equation describes a curve, a collection of curves, isolated points, or sometimes no points at all in the input plane.

Example: Circular Level Curves

Consider

\[ f(x,y)=x^2+y^2. \]

The level set for the value \(c\) is

\[ x^2+y^2=c. \]

For \(c>0\), this is a circle of radius

\[ \sqrt{c}. \]

For \(c=0\), the level set is the single point \((0,0)\).

For \(c<0\), the level set is empty.

Level Sets Reveal the Range

The level-set equation

\[ x^2+y^2=c \]

has real solutions exactly when \(c\ge0\).

Therefore, the values for which level sets exist reproduce the range:

\[ \operatorname{Range}(f)=[0,\infty). \]

Example: Elliptical Level Curves

Let

\[ f(x,y)=4x^2+y^2. \]

A level curve satisfies

\[ 4x^2+y^2=c. \]

For \(c>0\), divide by \(c\):

\[ \frac{x^2}{c/4}+\frac{y^2}{c}=1. \]

Each positive level is an ellipse centered at the origin.

Example: Linear Level Curves

Consider

\[ f(x,y)=2x-3y. \]

Setting \(f(x,y)=c\) gives

\[ 2x-3y=c. \]

Solving for \(y\),

\[ y=\frac{2}{3}x-\frac{c}{3}. \]

The level curves are parallel lines.

Example: Hyperbolic Level Curves

Let

\[ f(x,y)=x^2-y^2. \]

The level sets satisfy

\[ x^2-y^2=c. \]

Positive and negative values of \(c\) produce different families of hyperbolas. When \(c=0\),

\[ x^2-y^2=0, \]

so

\[ y=\pm x. \]

Contour Maps

A contour map displays many level curves at once.

If a function represents elevation, then each contour may correspond to a fixed height such as

\[ f(x,y)=100,\qquad f(x,y)=200,\qquad f(x,y)=300. \]

The resulting map shows how height changes across the plane without drawing the full three-dimensional surface.

Topographic Interpretation

If \(f(x,y)\) represents terrain elevation, then a level curve

\[ f(x,y)=c \]

connects all points having the same elevation \(c\).

Closely spaced contours indicate rapid elevation change, while widely spaced contours indicate slower change.

This interpretation will later connect directly to gradients and directional derivatives.

Temperature and Pressure Maps

Level curves are not limited to height.

If

\[ T(x,y) \]

is temperature, then

\[ T(x,y)=20 \]

is an isotherm: all locations with temperature \(20\).

If

\[ P(x,y) \]

represents pressure, then \(P(x,y)=c\) gives an isobar.

Level Surfaces

For a function of three variables,

\[ f(x,y,z), \]

the equation

\[ f(x,y,z)=c \]

usually defines a level surface in three-dimensional space.

Example: Spherical Level Surfaces

Let

\[ f(x,y,z)=x^2+y^2+z^2. \]

The level surface for \(c\) satisfies

\[ x^2+y^2+z^2=c. \]

For \(c>0\), this is a sphere of radius \(\sqrt{c}\).

Level Sets as Slices of a Graph

For a surface

\[ z=f(x,y), \]

imagine slicing the graph with a horizontal plane

\[ z=c. \]

The intersection of the surface with that plane projects down to the level curve

\[ f(x,y)=c \]

in the \(xy\)-plane.

Level Curves and Cross Sections Are Different

A level curve fixes the output:

\[ f(x,y)=c. \]

A vertical cross section fixes an input variable, such as

\[ x=a \]

or

\[ y=b. \]

Both are useful slices, but they answer different questions.

Example: Level Curves of a Paraboloid

Consider

\[ z=x^2+y^2. \]

The surface is an upward-opening paraboloid.

Horizontal slices \(z=c\) give

\[ x^2+y^2=c, \]

so the contour map consists of concentric circles.

Example: Level Curves of a Plane

Let

\[ z=2x+y. \]

Fixing \(z=c\) gives

\[ 2x+y=c. \]

Therefore, the contour map of a plane consists of parallel lines.

Moving from one line to another changes the output by a constant amount.

Level-Set Spacing and Rate of Change

Suppose contour values differ by the same amount.

If the curves are close together, a small movement in the input plane creates a relatively large output change.

If the curves are far apart, the same output change requires more movement.

This geometric idea prepares us for the gradient.

Disconnected Domains

A multivariable domain does not have to be one continuous region.

Consider

\[ f(x,y)=\frac{1}{x^2+y^2-1}. \]

The denominator is zero on the unit circle:

\[ x^2+y^2=1. \]

Therefore, the domain consists of all points inside the circle together with all points outside the circle, but not the circle itself.

Open and Closed Domain Conditions

The symbols \(<\) and \(>\) usually exclude a boundary:

\[ x^2+y^2<4. \]

The symbols \(\le\) and \(\ge\) usually include a boundary:

\[ x^2+y^2\le4. \]

This distinction becomes important in continuity, optimization, and integration.

Bounded and Unbounded Domains

A domain is bounded if it fits inside some sufficiently large finite region.

The disk

\[ x^2+y^2\le9 \]

is bounded.

The half-plane

\[ y\ge x \]

is unbounded.

Domain as a Constraint Set

In applications, a domain may be determined by real-world constraints rather than algebra alone.

If \(x\) and \(y\) represent production quantities, we may require

\[ x\ge0,\qquad y\ge0, \]

together with a capacity condition such as

\[ 2x+3y\le120. \]

These inequalities define the feasible domain.

Range as an Attainable Set

In modeling, the range represents outputs the system can actually attain.

If

\[ C(x,y) \]

is a cost function over a feasible production region, then the range of \(C\) is the set of all attainable costs under those constraints.

Level Sets as Decision Boundaries

Level sets can also represent equal outcomes.

If

\[ P(x,y) \]

represents profit, then

\[ P(x,y)=10000 \]

collects every input combination producing the same profit.

Comparing nearby level curves reveals how input changes affect outcomes.

Level Sets Do Not Always Exist

A chosen value \(c\) produces a level set only if \(c\) lies in the range.

For

\[ f(x,y)=x^2+y^2, \]

the equation

\[ x^2+y^2=-1 \]

has no real solution. Therefore, the \(-1\) level set is empty.

Level Sets Can Be Single Points

For

\[ f(x,y)=x^2+y^2, \]

the \(0\)-level set satisfies

\[ x^2+y^2=0. \]

The only solution is

\[ (0,0). \]

So a level set need not be a curve in the ordinary visual sense.

Level Sets Can Have Multiple Components

Consider

\[ f(x,y)=x^2. \]

The level set \(f(x,y)=c\) becomes

\[ x^2=c. \]

For \(c>0\),

\[ x=\pm\sqrt{c}, \]

so the level set consists of two parallel vertical lines.

Constant Functions

If

\[ f(x,y)=7, \]

for every input, then the range is

\[ \boxed{\{7\}}. \]

The level set \(f(x,y)=7\) is the entire domain, while every other level set is empty.

Identifying Domain from a Formula

A reliable first pass is:

  1. Start with all real input tuples.
  2. Locate denominators and exclude their zeros.
  3. Require even-root radicands to be nonnegative.
  4. Require logarithm arguments to be positive.
  5. Apply any additional restrictions from compositions.
  6. Intersect all conditions.
  7. Translate the final conditions into a geometric region when useful.

Identifying Range from Structure

A useful range workflow is:

  1. Look for obvious lower or upper bounds.
  2. Use nonnegative expressions such as squares and square roots.
  3. Check whether boundary values are actually attained.
  4. Ask whether every value between candidate bounds can occur.
  5. Use level-set equations to test attainability.
  6. Use optimization methods when elementary reasoning is insufficient.

Identifying Level Sets

To find the level set at height \(c\):

  1. Start with \(z=f(x,y)\).
  2. Replace \(z\) by the constant \(c\).
  3. Solve or simplify the equation \(f(x,y)=c\).
  4. Identify the resulting geometric object.
  5. Check whether the chosen \(c\) lies in the range.

Example: Full Domain-Range-Level Analysis

Consider

\[ f(x,y)=\sqrt{16-x^2-y^2}. \]

The domain satisfies

\[ x^2+y^2\le16. \]

Since the square root is nonnegative,

\[ f(x,y)\ge0. \]

Its greatest value occurs at \((0,0)\):

\[ f(0,0)=4. \]

Thus,

\[ \boxed{\operatorname{Range}(f)=[0,4]}. \]

The level set \(f(x,y)=c\) satisfies

\[ \sqrt{16-x^2-y^2}=c. \]

For \(0\le c\le4\), squaring gives

\[ x^2+y^2=16-c^2. \]

These are circles whose radii shrink as \(c\) increases.

Geometric Meaning of the Previous Example

The graph

\[ z=\sqrt{16-x^2-y^2} \]

is the upper hemisphere of

\[ x^2+y^2+z^2=16. \]

Its domain is the circular shadow in the \(xy\)-plane, its range is the interval of possible heights from \(0\) to \(4\), and its level curves are horizontal circular slices of the hemisphere.

Common Error: Confusing Domain and Range

For

\[ f(x,y)=x^2+y^2, \]

the domain is

\[ \mathbb{R}^2, \]

while the range is

\[ [0,\infty). \]

The domain contains ordered pairs. The range contains output values.

Common Error: Forgetting Strict Positivity for Logarithms

If

\[ f(x,y)=\ln(x+y), \]

the condition is not

\[ x+y\ge0. \]

It must be

\[ \boxed{x+y>0}. \]

The logarithm is undefined at zero.

Common Error: Including a Zero Denominator

For

\[ f(x,y)=\frac{1}{x^2+y^2-4}, \]

the circle

\[ x^2+y^2=4 \]

must be excluded from the domain.

Common Error: Treating Every Level Set as a Curve

Depending on the function and the value \(c\), a level set may be:

The equation \(f(x,y)=c\) determines the geometry.

Common Error: Ignoring the Stated Domain

If a problem explicitly restricts the domain, that restriction overrides the larger natural domain of the formula.

For example,

\[ f(x,y)=x+y \]

is naturally defined on all of \(\mathbb{R}^2\), but a model may restrict it to

\[ x\ge0,\qquad y\ge0. \]

Range and level-set conclusions must then use the restricted domain.

Practice 1: Polynomial Domain

Find the natural domain of

\[ f(x,y)=x^3-2xy+7y^4. \]

Practice 2: Rational Domain

Find the natural domain of

\[ f(x,y)=\frac{x+y}{x^2+y^2-9}. \]

Practice 3: Square Root Domain

Find the natural domain of

\[ f(x,y)=\sqrt{25-x^2-y^2}. \]

Practice 4: Logarithmic Domain

Find the natural domain of

\[ f(x,y)=\ln(y-x^2). \]

Practice 5: Combined Restrictions

Find the natural domain of

\[ f(x,y)=\frac{\sqrt{x+y}}{x-y}. \]

Practice 6: Range

Find the range of

\[ f(x,y)=3+x^2+y^2. \]

Practice 7: Range with a Maximum

Find the range of

\[ f(x,y)=10-x^2-y^2. \]

Practice 8: Level Curves

Describe the level curves of

\[ f(x,y)=x^2+y^2. \]

In particular, describe the levels \(c=0\), \(c=1\), \(c=4\), and \(c=-1\).

Practice 9: Linear Level Curves

Find and describe the level curves of

\[ f(x,y)=x+2y. \]

Practice 10: Full Analysis

For

\[ f(x,y)=\sqrt{9-x^2-y^2}, \]

determine the domain, range, and equation of the level curve at \(c=2\).

Practice Answers

Practice 1

A polynomial has no real-input restrictions:

\[ \boxed{\operatorname{Dom}(f)=\mathbb{R}^2}. \]

Practice 2

The denominator cannot equal zero:

\[ x^2+y^2\neq9. \]

Therefore,

\[ \boxed{\operatorname{Dom}(f)= \{(x,y)\in\mathbb{R}^2:x^2+y^2\neq9\}}. \]

Practice 3

Require

\[ 25-x^2-y^2\ge0. \]

Thus,

\[ \boxed{x^2+y^2\le25}. \]

Practice 4

The logarithm requires

\[ y-x^2>0. \]

Therefore,

\[ \boxed{y>x^2}. \]

Practice 5

The square root requires

\[ x+y\ge0, \]

and the denominator requires

\[ x-y\neq0. \]

Therefore,

\[ \boxed{\operatorname{Dom}(f)= \{(x,y):x+y\ge0,\ x\neq y\}}. \]

Practice 6

Since

\[ x^2+y^2\ge0, \]

we have

\[ f(x,y)\ge3. \]

Every value \(3\) or greater occurs, so

\[ \boxed{\operatorname{Range}(f)=[3,\infty)}. \]

Practice 7

Since \(x^2+y^2\ge0\),

\[ 10-x^2-y^2\le10. \]

The maximum value \(10\) occurs at \((0,0)\), and there is no lower bound. Therefore,

\[ \boxed{\operatorname{Range}(f)=(-\infty,10]}. \]

Practice 8

The level equation is

\[ x^2+y^2=c. \]

Practice 9

Set

\[ x+2y=c. \]

Solving for \(y\),

\[ y=-\frac12x+\frac{c}{2}. \]

The level curves are parallel lines with slope \(-1/2\).

Practice 10

The domain satisfies

\[ 9-x^2-y^2\ge0, \]

so

\[ \boxed{x^2+y^2\le9}. \]

The output ranges from \(0\) to \(3\):

\[ \boxed{\operatorname{Range}(f)=[0,3]}. \]

For \(c=2\),

\[ \sqrt{9-x^2-y^2}=2. \]

Squaring,

\[ 9-x^2-y^2=4, \]

so the level curve is

\[ \boxed{x^2+y^2=5}. \]

What to Remember

For a function of several variables:

The key organizational idea is:

\[ \boxed{\text{allowed inputs}\longrightarrow \text{attained outputs}\longrightarrow \text{equal-output sets}}. \]

Where We Go Next

Domains, ranges, and level sets describe where a multivariable function exists and how its values are distributed. The next step is to measure how the function changes when one input varies while the others are temporarily held fixed.

The next lesson, Partial Derivatives, introduces the basic derivative operation for functions of several variables and builds the foundation for directional derivatives, gradients, tangent planes, and multivariable sensitivity.