In mathematics, the range of a function, also known as the image of the function, is the set consisting of all possible output values that the function attains when applied to every element of its domain.[1] This set represents the actual values produced by the function, distinguishing it from the codomain, which is the broader set of potential output values specified in the function's definition.[2] For a function f: A \to B, where A is the domain and B is the codomain, the range is a subset of B containing precisely those elements in B that are f(x) for some x \in A.[3]The concept of range is fundamental in analyzing functions across various mathematical disciplines, including algebra, calculus, and linear algebra, as it helps determine the function's behavior and surjectivity—whether the function covers all elements of the codomain.[4] For instance, consider the function f(x) = x^2 from the real numbers to the real numbers; its range is the set of non-negative real numbers, since no negative outputs are possible regardless of the input.[5] In contrast, for discrete functions, the range can be explicitly listed as a finite set of distinct outputs.[6]Determining the range often involves solving inequalities or analyzing the function's graph to identify achievable y-values, which is crucial for applications in optimization, modeling real-world phenomena, and understanding function composition.[7] While the domain focuses on valid inputs, the range provides insight into the function's output constraints, enabling precise descriptions in both theoretical and applied contexts.[8]
Core Definitions
Set-Theoretic Definition
In set theory, a function f: X \to Y is formally defined as a subset of the Cartesian product X \times Y such that for every x \in X, there is exactly one y \in Y with (x, y) \in f. The range of f, also known as the image of X under f and denoted \operatorname{im}(f) or f(X), is the set \{ y \in Y \mid \exists x \in X \text{ such that } f(x) = y \}.[9] This construction ensures the range is precisely the subset of the codomain Y consisting of all actual output values attained by the function.The range is the smallest subset of Y that contains every value in the image of f, excluding any elements of Y that are not reached by applying f to some input from X. As such, it captures the effective outputs of the function without assuming surjectivity onto the entire codomain.The term "range" for this concept gained prominence in early 20th-century mathematical literature, particularly through G. H. Hardy's 1908 textbook A Course of Pure Mathematics, where it is used to denote the set of all values assumed by the function, distinguishing it clearly from the domain.[10]For example, consider the function f: \mathbb{[R](/page/R)} \to \mathbb{[R](/page/R)} defined by f(x) = x^2. The range is [0, \infty), since for every y \geq 0 there exists x = \sqrt{y} such that f(x) = y, but no negative values are attained.[9]
Notation and Terminology
The range of a function f: X \to Y is standardly denoted by f(X), where X denotes the domain of f.[11] This notation emphasizes the set of all output values attained by applying f to elements of X. Alternative abbreviations include \operatorname{Im}(f) for the image of f and \operatorname{Ran}(f) for the range of f.[11][12]In modern mathematical literature, the term "image" serves as a synonym for "range," and it is often preferred in formal contexts to denote the set of actual outputs.[11] The word "range" originates from its broader English meaning of extent or span, reflecting the collection of values spanned by the function's outputs.[13]Field-specific variations exist; for instance, in computer science, the range is frequently referred to as the "output set" to align with programming paradigms that map inputs to outputs.[14] To prevent ambiguity with the statistical range—defined as the difference between the maximum and minimum values in a dataset—the set-theoretic notation f(X) is recommended for clarity in mathematical discussions.
Distinctions from Related Concepts
Codomain Comparison
In the specification of a function f: X \to Y, the codomain is the set Y, which represents the collection of all possible output values that elements of the domain X could map to under f.[15] Unlike the range, which consists precisely of the values that f actually attains, the codomain Y is a prescribed set that may encompass values never produced by the function./07:_Functions/7.01:_Definition_and_Notation)The fundamental distinction between range and codomain lies in their roles: the range, denoted f(X), is the subset of the codomain comprising exactly the outputs generated by applying f to elements of X, so f(X) \subseteq Y always holds, but equality is not guaranteed.[16] The codomain can be selected arbitrarily as long as it contains the range, whereas the range is intrinsically determined by the function's mapping behavior and remains unchanged regardless of codomain choice.[17] This flexibility in defining the codomain allows functions to be viewed in different contexts without altering their core action, though it influences properties like surjectivity— a function is surjective only if its range coincides with the entire codomain.[18]For instance, consider the squaring function f(x) = x^2 with domain the real numbers \mathbb{[R](/page/R)}; if the codomain is also \mathbb{[R](/page/R)}, the range is [0, \infty), excluding negative values, so f is not surjective onto \mathbb{R}.[16] Redefining the codomain to [0, \infty) preserves the same range but renders f surjective, illustrating how codomain adjustments affect functional properties without impacting the range itself.[17]A prevalent misconception is that the range and codomain are synonymous unless otherwise noted, leading to oversight of the codomain's role in function specification; in reality, the codomain must be explicitly stated in a function's definition, as the range alone does not fully capture the intended output space.[19]
Image and Preimage Relations
In the context of a function f: X \to Y, the range is synonymous with the direct image of the domain, denoted f(X) = \{f(x) \mid x \in X\}, which consists of all elements in the codomain Y that are actually attained by applying f to some input in X.[20] This direct image contrasts with the inverseimage, or preimage, of an element y \in Y, defined as f^{-1}(y) = \{x \in X \mid f(x) = y\}, which identifies the set of domainelements mapping to that specific y.[21]A key relational property links the range to preimages: the range comprises precisely those elements y \in Y for which the preimage f^{-1}(y) is non-empty, meaning there exists at least one x \in X such that f(x) = y./08%3A_New_Page/8.04%3A_New_Page) Formally, this is expressed as \operatorname{[range](/page/Range)}(f) = \{y \in Y \mid f^{-1}(y) \neq \emptyset\}./08%3A_New_Page/8.04%3A_New_Page) Thus, the range identifies the "reachable" elements in the codomain under the function's mapping.For surjective functions, where the range equals the entire codomain, every y \in Y has a non-empty preimage, ensuring full coverage of Y./08%3A_New_Page/8.04%3A_New_Page) In non-surjective cases, the range subsets Y by excluding those y with empty preimages, highlighting the function's selective output.[21]
Properties of the Range
Surjectivity and Coverage
A function f: X \to Y is surjective if and only if its range equals the codomain Y, meaning that for every y \in Y, there exists at least one x \in X such that f(x) = y.[22] This condition ensures that every element in the codomain is attained by the function, with the range f(X) fully covering Y.[23]The implications of this coverage are significant: when the range is a proper subset of the codomain, f(X) \subsetneq Y, the function exhibits partial coverage, leaving some elements of Y unmapped to by any input in X. In contrast, total coverage occurs precisely when the range equals the codomain, characterizing surjectivity. For instance, constant functions, where f(x) = c for some fixed c \in Y and all x \in X, are non-surjective unless |Y| = 1, as their range is the singleton \{c\}, which fails to cover larger codomains.[24]For finite sets X and Y, the cardinality of the range satisfies |f(X)| \leq \min(|X|, |Y|), a consequence of the pigeonhole principle that bounds the possible outputs. Equality |f(X)| = |Y| implies surjectivity provided |X| \geq |Y|, since the function must then map onto every element of Y without shortfall.[25]
Cardinality and Size Constraints
The cardinality of the range of a function f: A \to B, denoted \lvert \mathrm{range}(f) \rvert, is always at most the cardinality of the domain \lvert A \rvert, since each element in the range arises from at most one or more elements in the domain, and the image cannot exceed the domain in size under the cardinal ordering.[26] Similarly, \lvert \mathrm{range}(f) \rvert \leq \lvert B \rvert by definition, as the range is a subset of the codomain B.[26] These inequalities hold for both finite and infinite sets, with infinite cardinals following the same partial order where \kappa \leq \lambda if there exists an injection from a set of cardinality \kappa to one of cardinality \lambda.[27]In finite settings, these cardinality constraints have direct implications via the pigeonhole principle. If \lvert A \rvert < \lvert B \rvert, then any function f: A \to B must have \lvert \mathrm{range}(f) \rvert \leq \lvert A \rvert < \lvert B \rvert, precluding a surjective function where the range equals the codomain./03%3A_Counting/14%3A_Cardinality_Rules/14.08%3A_The_Pigeonhole_Principle) Conversely, for injective functions, the range has the same cardinality as the domain (\lvert \mathrm{range}(f) \rvert = \lvert A \rvert), requiring \lvert A \rvert \leq \lvert B \rvert to embed the domain injectively into the codomain.[26] The pigeonhole principle further ensures that if \lvert A \rvert > \lvert B \rvert, no injection exists, forcing some elements of the codomain to remain outside the range while multiple domain elements map to the same codomain element./03%3A_Counting/14%3A_Cardinality_Rules/14.08%3A_The_Pigeonhole_Principle)For infinite sets, the cardinality constraints allow the range to achieve cardinalities up to that of the domain. For instance, the function f(x) = \tan x defined on the domain (- \pi/2, \pi/2) has range \mathbb{R}, both of which have cardinality $2^{\aleph_0} (the continuum), illustrating that the range can match the domain's cardinality while being a proper subset of larger codomains if specified.[28] In general, no function can produce a range with cardinality strictly greater than the domain's, as this would violate the injection from the range back to the domain via the function's fibers.[27] A function is surjective precisely when \lvert \mathrm{range}(f) \rvert = \lvert B \rvert (detailed in Surjectivity and Coverage).In more advanced contexts like category theory, the cardinality of the range relates to epimorphisms, which generalize surjective functions in the category of sets; an epimorphism f: A \to B requires \lvert B \rvert \leq \lvert A \rvert to ensure the codomain can be covered without exceeding the domain's size.[29] However, in basic set-theoretic terms, these constraints underscore the range's role as a measure of how much of the codomain is "reached" relative to the domain's available elements.
Determining the Range
Algebraic Techniques
One fundamental algebraic technique to determine the range of a function involves finding its inverse by setting y = f(x) and solving for x in terms of y; the values of y that yield real solutions for x within the function's domain constitute the range.[30] This method is particularly effective for functions where the equation can be rearranged explicitly, as it directly identifies the permissible output values without relying on graphical or analytical tools.For polynomial functions, algebraic manipulation such as factoring or completing the square reveals bounds on the outputs. Consider a quadratic function f(x) = ax^2 + bx + c with a > 0; completing the square yields f(x) = a(x + \frac{b}{2a})^2 + (c - \frac{b^2}{4a}), where the minimum value occurs at the vertex y = c - \frac{b^2}{4a}, so the range is \left[ c - \frac{b^2}{4a}, \infty \right).[31] If a < 0, the parabola opens downward, and the range becomes (-\infty, c - \frac{b^2}{4a}]. Higher-degree polynomials may require factoring to identify local minima or maxima algebraically, though explicit ranges often depend on the leading coefficient's sign and degree parity.[30]Rational functions, expressed as f(x) = \frac{p(x)}{q(x)} where p and q are polynomials with no common factors, have ranges determined by solving y = \frac{p(x)}{q(x)} for x and analyzing the resulting quadratic or higher inequality for real roots, excluding values where the denominator vanishes.[32] Horizontal asymptotes, found by comparing degrees of p and q, provide bounds: if degrees are equal, the asymptote is y = \frac{a}{b} (leading coefficients), indicating the function approaches but may not cross this line, thus restricting the range.[33] Vertical asymptotes and holes from discontinuities further exclude certain outputs, as they correspond to undefined inputs that limit achievable y-values.[30]In all cases, domain restrictions—such as exclusions for even roots or zero denominators—propagate to the range through substitution in the inverted equation; for instance, if the domain requires x \geq k, only y-values producing such x are included. This step-by-step process ensures the range reflects both algebraic solvability and input constraints without introducing extraneous solutions.[34]
Analytical Methods for Real Functions
Analytical methods for determining the range of real-valued functions rely on calculus tools such as derivatives and limits to analyze the function's behavior, particularly for continuous functions where extrema and boundary conditions define the output interval. For a differentiable function f: I \to \mathbb{R} defined on an interval I, critical points are found by solving f'(x) = 0 or identifying points where f' is undefined; these, along with evaluations at endpoints if I is closed, yield local maxima and minima that bound the range. The first derivative test classifies these points as local maxima or minima by checking sign changes in f' around them, while the second derivative test uses f''(c) > 0 for minima and f''(c) < 0 for maxima at critical points c.For continuous functions on a closed interval [a, b], the Extreme Value Theorem guarantees the existence of absolute maximum and minimum values,[35] and the Intermediate Value Theorem ensures the range is the closed interval [\min(f), \max(f)].[36] Specifically, if f is continuous on [a, b] and k is any real number between f(a) and f(b), there exists c \in [a, b] such that f(c) = k.[36]On unbounded domains, limits at infinity provide bounds: \lim_{x \to \infty} f(x) and \lim_{x \to -\infty} f(x) indicate asymptotic behavior, often revealing horizontal asymptotes that restrict the range. For instance, for f(x) = e^x, \lim_{x \to -\infty} e^x = 0 and \lim_{x \to \infty} e^x = \infty, with f strictly increasing and continuous on \mathbb{R}, so the range is (0, \infty). Vertical asymptotes, found via \lim_{x \to c^\pm} f(x) = \pm \infty, may exclude certain values or extend the range unboundedly.Discontinuous functions require piecewise analysis, as jumps or removable discontinuities can create gaps in the range.[36] For a function with a jump discontinuity at x = c, the range may exclude values between the left and right limits if not attained elsewhere, necessitating separate range determination on each continuous subinterval.[36] Removable discontinuities, where \lim_{x \to c} f(x) exists but f(c) differs, can be filled by redefining f(c), potentially closing gaps in the range without altering overall bounds from derivatives and limits.[36]
Illustrative Examples
Elementary Functions
Elementary functions provide foundational examples for understanding the range, as their outputs can often be determined explicitly from their algebraic forms and domains. Consider the linear function defined by f(x) = mx + b, where m \neq 0 and the domain is the set of all real numbers \mathbb{R}. As x varies over \mathbb{R}, the output f(x) covers every real number exactly once, making the range \mathbb{R} and rendering the function surjective onto \mathbb{R}.[37][38]For quadratic functions, the range depends on the leading coefficient and the vertex. The basic quadratic f(x) = x^2 over \mathbb{R} achieves a minimum value of 0 at x=0 and increases without bound, so its range is [0, \infty). In general, for f(x) = ax^2 + bx + c with a > 0, the vertex form f(x) = a(x - h)^2 + k reveals a minimum at k, yielding a range of [k, \infty).[39]The absolute value function f(x) = |x| folds the real line at the origin, producing non-negative outputs that start at 0 and extend to infinity, thus having range [0, \infty) over domain \mathbb{R}.[40]Constant functions, such as f(x) = c for some real constant c and domain \mathbb{R}, output only the single value c regardless of input, so the range is the singleton set \{c\}.[41]The range can change significantly with domain restrictions, even for simple functions. For instance, the identity function f(x) = x over the full domain \mathbb{R} has range \mathbb{R}, but restricting the domain to [0, 1] limits the outputs to [0, 1].[42]
Periodic and Trigonometric Functions
Periodic functions, such as the trigonometric functions, exhibit repeating patterns that influence their ranges. The sine function f(x) = \sin x, defined over all real numbers, attains values corresponding to the y-coordinates of points on the unit circle, which are bounded between -1 and 1, resulting in a range of [-1, 1].[43][44] Similarly, the cosine function f(x) = \cos x traces the x-coordinates on the unit circle, also yielding a range of [-1, 1].[43][45]The tangent function f(x) = \tan x, restricted to intervals like (-\pi/2, \pi/2) to avoid discontinuities, has a range of all real numbers \mathbb{R}, as its graph approaches vertical asymptotes at the endpoints without bound.[46][47] These asymptotes occur where the cosine component is zero, allowing the ratio \sin x / \cos x to extend indefinitely in both positive and negative directions.[48]Periodicity plays a key role in determining the range over specific intervals. For the sine function over one full period, such as [0, 2\pi], the range remains [-1, 1], covering all possible output values due to the complete oscillation. However, on restricted intervals like [0, \pi/2], the sine function increases from 0 to 1, producing a subinterval range of [0, 1].[49] This demonstrates how domain restrictions limit the range to portions of the full periodic output.For inverse trigonometric functions, the arcsine function \arcsin x has a domain of [-1, 1] and a range of [-\pi/2, \pi/2], ensuring that inputs within the sine's range yield the complete principal values without repetition.[50] When composed with sine, such as \sin(\arcsin x), the output returns to x for x \in [-1, 1], confirming the full coverage of the principal range under the restricted domain.[51]
Applications and Extensions
In Calculus and Analysis
In calculus and real analysis, the range of a continuous function defined on a connected domain, such as an interval in the real numbers, is itself connected, meaning it forms an interval (possibly infinite or degenerate). This follows from the fundamental theorem that the continuous image of a connected set is connected. For a continuous function f: [a, b] \to \mathbb{R} on a closed bounded interval, the intermediate value theorem (IVT) further guarantees that the range includes all values between f(a) and f(b), ensuring no gaps within the attained values unless introduced by discontinuities elsewhere. Discontinuities in the function can create gaps in the range, as the IVT applies only to continuous segments.When considering limits at the boundaries of the domain, the range may approach certain values without including them. For instance, the function f(x) = \frac{1}{x} defined on the open interval (0, \infty) has a range of (0, \infty), where values approach 0 as x \to \infty but never attain 0, and approach \infty as x \to 0^+. This behavior highlights how the openness of the domain affects the range's endpoints.For bounded ranges, the Heine-Borel theorem plays a key role: in \mathbb{R}, a set is compact if and only if it is closed and bounded. Thus, the continuous image of a compact domain, such as a closed bounded interval, is compact, implying the range is closed and bounded. This ensures the range attains its supremum and infimum.Even for discontinuous functions, certain classes like derivatives exhibit the Darboux property, meaning they attain all intermediate values between f(c) and f(d) for any c, d in the domain, despite potential discontinuities. This property holds for all derivatives, as established by Darboux's theorem, underscoring that the range of a derivative on an interval is an interval, though the function itself may not be continuous.
In Other Mathematical Contexts
In linear algebra, the range of a linear transformation T: V \to W between vector spaces is defined as the column space of its representing matrix, consisting of all vectors in W that are images of vectors in V under T.[52] The dimension of this range equals the rank of the matrix, which measures the linear independence of the columns and determines the transformation's "output dimensionality."[53]In probability theory, the range of a random variable X: \Omega \to \mathbb{R} refers to the set of possible outcomes, often synonymous with the support of the distribution, which is the smallest set containing all values with positive probability.[54] This usage aligns with the mathematical image but emphasizes probabilistic measure, distinguishing it from the purely set-theoretic range by focusing on outcomes weighted by their likelihood rather than mere attainability.[55]In discrete mathematics, particularly for functions defined on finite sets, the range is the image of the function, such as in graph theory where an adjacency function maps each vertex to its set of neighbors, yielding the neighbor sets as the range for that vertex.[56] This interpretation highlights connectivity in structures like graphs, where the range captures relational outputs within bounded domains.Care must be taken with terminology, as in statistics the term "range" commonly denotes the difference between the maximum and minimum values of a dataset, rather than the image of a function; for the latter, consult the article on image of a function.[57][58]