Skip to content

Range of a function

The range is the set of outputs a function actually reaches. Use a profit curve to separate it from the domain and codomain, and see why whole-share restrictions matter.

The range of a function is the set of output values it actually produces over its stated domain. It is also called the function’s image. In a profit model, the range answers “which profit or loss amounts can this model produce?” rather than “which trade sizes may I enter?”
For a function f:D→Cf:D\to C,
f(D)={f(x):x∈D}⊆C.f(D)=\{f(x):x\in D\}\subseteq C.
Here DD is the domain of allowed inputs, CC is the codomain declared for outputs, and f(D)f(D) is the range of attained outputs. The codomain may contain values the function never reaches. This page uses “range” to mean image; terminology varies between texts. Oxford’s definitions make that distinction explicit.

What profits are attainable?

Suppose a hypothetical trading project has already incurred a USD 16 setup cost. Let qq be the numerical quantity in shares, allowing fractional shares from 0 to 10. Its synthetic net-profit rule, with output measured in USD, is

Π(q)=−(q−5)2+9=−q2+10q−16,0≤q≤10.\Pi(q)=-(q-5)^2+9=-q^2+10q-16, \qquad 0\le q\le10.

The coefficient of q2q^2 represents a deliberately simplified size penalty; this is an illustrative model, not an estimated trading opportunity. The setup cost remains incurred even at q=0q=0, so the model reports a USD 16 loss there.

The square gives the bounds without calculus. Over the allowed quantities,

0≤(q−5)2≤25⟹−16≤Π(q)≤9.0\le(q-5)^2\le25 \quad\Longrightarrow\quad -16\le\Pi(q)\le9.

At q=5q=5 the profit is USD 9. At either q=0q=0 or q=10q=10 it is USD -16. Both bounds are attained. But bounds alone do not establish that every value between them is possible.

To check that no outputs are missing, choose any target yy between −16-16 and 99. The quantity

q=5−9−yq=5-\sqrt{9-y}

lies between 0 and 5 and satisfies Π(q)=y\Pi(q)=y. Thus every target in the interval is reached, and the range is exactly

Π([0,10])=[−16,9] USD.\boxed{\Pi([0,10])=[-16,9]\text{ USD}.}

Square brackets mean the endpoints belong to the set. Choosing R\mathbb{R} as the codomain is valid, but it does not make every real profit attainable: USD 12 is in that codomain and outside this range.

Synthetic profit curve for fractional quantities from 0 to 10 shares reaches every value from USD -16 to USD 9, including both endpoints. Whole-share quantities yield only USD -16, -7, 0, 5, 8 and 9.
Synthetic profit curve for fractional quantities from 0 to 10 shares reaches every value from USD -16 to USD 9, including both endpoints. Whole-share quantities yield only USD -16, -7, 0, 5, 8 and 9.
Original synthetic profit model. The vertical blue segment collects all attained heights; restricting quantity to whole shares leaves six distinct outputs.
The polynomial roots, q=2q=2 and q=8q=8, are the two inputs giving zero profit. The range instead collects the outputs from all allowed inputs. Repeated outputs count once: two break-even quantities contribute just one value, zero, to the range.

Change the allowed inputs, change the answer

The formula alone does not determine the range.

Allowed quantities, in sharesAttainable profits, in USD
Every real q∈[0,10]q\in[0,10]The entire interval [−16,9][-16,9]
Whole shares q∈{0,1,…,10}q\in\{0,1,\ldots,10\}The set {−16,−7,0,5,8,9}\{-16,-7,0,5,8,9\}
Every real q∈[0,3]q\in[0,3]The interval [−16,5][-16,5]
Every real q∈(0,10)q\in(0,10)The interval (−16,9](-16,9]

Whole shares leave gaps: USD 6 is attainable with a fractional quantity q=5−3q=5-\sqrt3, but no integer quantity gives it. The minimum and maximum remain the same, so reporting only those two numbers would hide the change.

On the smaller closed domain [0,3][0,3], the function rises from −16-16 to 55; the original peak at q=5q=5 is unavailable. On the open domain (0,10)(0,10), neither endpoint quantity is allowed, so USD -16 is approached but never reached. USD 9 remains attainable at q=5q=5. An excluded input removes an output only if no remaining input produces it.

In practice, state the domain before claiming a profit range. Quantity limits, indivisibility and model restrictions can all alter it. And a range is a set of possibilities under the model: it does not say how likely an output is, or guarantee that actual trading results will respect the model’s bounds.

To develop the graph viewpoint, the public full lesson Transformations, Compositions, and Building New Functions explains how shifts and reflections change output values.

Sources

  • University of Oxford, Introduction to University Mathematics (2025–26), §3: Functions, Definitions 3.2 and 3.7: domain, codomain and image.
  • OpenStax, Calculus Volume 1, §1.1: Review of Functions: domain, range and graphical representations.
  • Stewart, J. (2008). Single Variable Calculus: Early Transcendentals, 6th ed., Brooks/Cole, §1.1, “Four Ways to Represent a Function,” pp. 11–13.
Last updated
  • functions
  • range
  • domain
  • attainable values
← Back to the glossaryBack to top ↑