Fact-checked by Grok 2 weeks ago

Range of a function

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. 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. 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. The concept of range is fundamental in analyzing functions across various mathematical disciplines, including , , and linear algebra, as it helps determine the function's behavior and surjectivity—whether the function covers all elements of the . For instance, consider the function f(x) = x^2 from the real numbers to the real numbers; its is the set of non-negative real numbers, since no negative outputs are possible regardless of the input. In contrast, for functions, the can be explicitly listed as a of distinct outputs. 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. 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.

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 \}. 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. For example, consider the f: \mathbb{[R](/page/R)} \to \mathbb{[R](/page/R)} defined by f(x) = x^2. The 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.

Notation and Terminology

The of a f: X \to Y is standardly denoted by f(X), where X denotes the of f. 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 of f and \operatorname{Ran}(f) for the of f. In modern mathematical literature, the term "" serves as a for "," and it is often preferred in formal contexts to denote the set of actual outputs. The word "" originates from its broader English meaning of extent or span, reflecting the collection of values spanned by the function's outputs. Field-specific variations exist; for instance, in , the is frequently referred to as the "output set" to align with programming paradigms that map inputs to outputs. To prevent with the statistical —defined as the difference between the values in a —the set-theoretic notation f(X) is recommended for clarity in mathematical discussions.

Codomain Comparison

In the specification of a f: X \to Y, the is the set Y, which represents the collection of all possible output values that elements of the X could map to under f. Unlike the , which consists precisely of the values that f actually attains, the Y is a prescribed set that may encompass values never produced by the ./07:_Functions/7.01:_Definition_and_Notation) The fundamental distinction between range and codomain lies in their roles: the , denoted f(X), is the 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. The codomain can be selected arbitrarily as long as it contains the , whereas the is intrinsically determined by the function's mapping behavior and remains unchanged regardless of codomain choice. 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 coincides with the entire . 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}. 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. A prevalent misconception is that the and are synonymous unless otherwise noted, leading to oversight of the codomain's role in specification; in reality, the codomain must be explicitly stated in a 's , as the alone does not fully capture the intended output space.

Image and Preimage Relations

In the context of a f: X \to Y, the is synonymous with the direct of the , denoted f(X) = \{f(x) \mid x \in X\}, which consists of all in the Y that are actually attained by applying f to some input in X. This direct contrasts with the , 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 mapping to that specific y. A key relational property links the to preimages: the 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 identifies the "reachable" elements in the under the function's mapping. For surjective functions, where the range equals the entire , 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 subsets Y by excluding those y with empty preimages, highlighting the 's selective output.

Properties of the Range

Surjectivity and Coverage

A f: X \to Y is surjective if and only if its equals the Y, meaning that for every y \in Y, there exists at least one x \in X such that f(x) = y. This condition ensures that every element in the is attained by the , with the f(X) fully covering Y. The implications of this coverage are significant: when the range is a proper of the , 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 , 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 \{c\}, which fails to cover larger . 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.

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. Similarly, \lvert \mathrm{range}(f) \rvert \leq \lvert B \rvert by definition, as the range is a subset of the codomain B. 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. In finite settings, these cardinality constraints have direct implications via the . 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 ./03%3A_Counting/14%3A_Cardinality_Rules/14.08%3A_The_Pigeonhole_Principle) Conversely, for injective functions, the range has the same as the (\lvert \mathrm{range}(f) \rvert = \lvert A \rvert), requiring \lvert A \rvert \leq \lvert B \rvert to embed the domain injectively into the codomain. The 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 ), illustrating that the range can match the domain's cardinality while being a proper of larger codomains if specified. 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. A function is surjective precisely when \lvert \mathrm{range}(f) \rvert = \lvert B \rvert (detailed in Surjectivity and Coverage). In more advanced contexts like , the of the range relates to , which generalize surjective functions in the ; an epimorphism f: A \to B requires \lvert B \rvert \leq \lvert A \rvert to ensure the can be covered without exceeding the domain's size. 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 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 constitute the . 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 reveals bounds on the outputs. Consider a f(x) = ax^2 + bx + c with a > 0; yields f(x) = a(x + \frac{b}{2a})^2 + (c - \frac{b^2}{4a}), where the minimum value occurs at the y = c - \frac{b^2}{4a}, so the range is \left[ c - \frac{b^2}{4a}, \infty \right). 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. 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. 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. Vertical asymptotes and holes from discontinuities further exclude certain outputs, as they correspond to undefined inputs that limit achievable y-values. 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.

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, and the Intermediate Value Theorem ensures the range is the closed interval [\min(f), \max(f)]. 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. 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. 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. 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.

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}. For quadratic functions, the range depends on the leading coefficient and the . 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 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). The function f(x) = |x| folds the at the , producing non-negative outputs that start at 0 and extend to , thus having [0, \infty) over domain \mathbb{R}. 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\}. 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].

Periodic and Trigonometric Functions

Periodic functions, such as the , 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]. Similarly, the cosine function f(x) = \cos x traces the x-coordinates on the unit circle, also yielding a range of [-1, 1]. 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 , as its approaches vertical asymptotes at the endpoints without bound. 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. 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]. 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. 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.

Applications and Extensions

In Calculus and Analysis

In and , the range of a defined on a connected , such as an in numbers, is itself connected, meaning it forms an (possibly 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 , the (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 , the may approach certain values without including them. For instance, the f(x) = \frac{1}{x} defined on the open (0, \infty) has a 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 affects the 's endpoints. For bounded ranges, the Heine-Borel theorem plays a key role: in \mathbb{R}, a set is compact it is closed and bounded. Thus, the continuous image of a compact , such as a closed bounded , is compact, implying the is closed and bounded. This ensures the 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. 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." In , the of a X: \Omega \to \mathbb{R} refers to the set of possible outcomes, often synonymous with the of the , which is the smallest set containing all values with positive probability. This usage aligns with the mathematical but emphasizes probabilistic measure, distinguishing it from the purely set-theoretic by focusing on outcomes weighted by their likelihood rather than mere attainability. In , particularly for functions defined on finite sets, the is the of the , such as in where an adjacency maps each to its set of neighbors, yielding the neighbor sets as the for that . This interpretation highlights connectivity in structures like graphs, where the captures relational outputs within bounded domains. Care must be taken with terminology, as in the term "" commonly denotes the difference between the values of a , rather than the of a ; for the latter, consult the on of a .