Introduction

Functions are the boring foundational language of all of mathematics. Every time you write y=x2y = x^2, describe a sequence, or model a physical process, you are implicitly working with a function. In competition math, functions appear everywhere: from AMC problems that ask for the range of a composite expression, to AIME problems that construct elaborate functional equations and ask you to evaluate f(2026)f(2026).

f(x)=6x+8f(x) = 6x + 8

The (x)(x) after ff on the left side indicates that we are putting xx into the function ff. When speaking, f(x)f(x) is read "f of x." The xx in the equation f(x)=6x+8f(x) = 6x + 8 is a variable, which means that it is essentially a placeholder. When we put a specific number in our function, we replace xx with that number in the equation f(x)=6x+8f(x) = 6x + 8 to determine what the machine outputs.

For example,

f(2)=6(2)+8f(2)=12+8=20f(2) = 6(2) + 8 \\ f(2) = 12 + 8 = 20

The Domain\textbf{Domain} of a function consists of all the values we are able to input to the function and get an output, and the Range\textbf{Range} of the function consists of all the values at can possibly come out of the function.

Taking f(x) = 1/(x - 9). The denominator cannot be zero, so x ≠ 9. Thus the domain of f is all real numbers except 9.

The function 1/y has range (-∞, 0) ∪ (0, ∞). Hence the range of f(x) = 1/(x - 9) is (-∞, 0) ∪ (0, ∞).

Note: We call a function that can only output real numbers a real-valued function, or, a real function.

Here are some definitions:

Function: A function ff from a set AA to a set BB is a rule that assigns to each element x∈Ax \in A exactly one element f(x)∈Bf(x) \in B. The key word is exactly one, a function cannot give two different outputs for the same input.

Domain: The set of all inputs for which the function is defined. If no domain is specified, assume it is the largest subset of R\mathbb{R} for which f(x)f(x) makes sense.

Codomain: The set BB that outputs are declared to land in. Not every element of BB need actually be achieved.

Range (Image): The set of all values f(x)f(x) actually takes as xx ranges over the domain. The range is always a subset of the codomain.

Range(f)={f(x)∣x∈Domain(f)}\text{Range}(f) = \{f(x) \mid x \in \text{Domain}(f)\}

The distinction between codomain and range trips people up. If f:R→Rf : \mathbb{R} \to \mathbb{R} is defined by f(x)=x2f(x) = x^2, the codomain is R\mathbb{R} but the range is [0,∞)[0, \infty).

Is It Even a Function? The Validity Test

Not every rule or curve defines a function. Before you can even talk about domain and range, you need to check whether it's a function at all !!!

Numerical / Algebraic Test

A rule is a function if every input produces at most one output. If you can find a single xx that maps to two different values, it fails.

Example: Is y2=xy^2 = x a function of xx?

For x=4x = 4, we get y=2y = 2 and y=−2y = -2. Two outputs for one input, so, not a function. However, y=xy = \sqrt{x} (taking only the positive root) is a function of x .

Example: Is f(x)=x2−1x−1f(x) = \dfrac{x^2 - 1}{x - 1} a function on all of R\mathbb{R}?

At x=1x = 1, the expression is 00\tfrac{0}{0}, which is undefined. So ff is not defined on all of R\mathbb{R}; its natural domain excludes x=1x = 1.

Graphical Test: The Vertical Line Test

A curve in the xyxy-plane is the graph of a function y=f(x)y = f(x) if and only if every vertical line x=cx = c intersects the curve in at most one point.

Why? A vertical line x=cx = c hits the graph at every point (c,y)(c, y) where f(c)=yf(c) = y. If there are two such points, (c,y1)(c, y_1) and (c,y2)(c, y_2) with y1≠y2y_1 \neq y_2, then cc has two outputs, which violates the definition of a function.

Here are some examples to understand this concept.

  • Circle x2+y2=1x^2 + y^2 = 1: fails since the vertical line x=0x = 0 hits at (0,1)(0, 1) and (0,−1)(0, -1).
  • Parabola y=x2y = x^2: passes since each vertical line hits at exactly one point.
  • The upper semicircle y=1−x2y = \sqrt{1 - x^2}: passes since taking only positive yy removes the ambiguity of double roots.

Finding Domain and Range: General Strategy

Finding the domain (algebraic approach): Start with all real numbers and remove values of xx that cause problems:

  1. Denominator equal to zero (division undefined).
  2. Even root of a negative number (not real).
  3. Logarithm of a non-positive number.
  4. Any other specified restriction.

Finding the range (three approaches):

Method 1 : Solve for xx in terms of yy. Set y=f(x)y = f(x), solve for xx, and identify which values of yy allow a real solution. This is the most reliable general method.

Method 2 : Graphical reasoning. Sketch the graph and read off the yy-values it achieves.

Method 3 : Calculus / monotonicity. If f is monotone on its domain, the range is the interval [f(left endpoint), f(right endpoint)] or similar.

For competition problems, Method 1 is usually the best.

Types of Functions: Domain and Range in Detail

Polynomial Functions

A polynomial function of degree nn has the form

f(x)=anxn+an−1xn−1+⋯+a1x+a0,an≠0f(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0, \qquad a_n \neq 0

Special cases you will see constantly:

  • Linear: f(x)=ax+bf(x) = ax + b (degree 1)
  • Quadratic: f(x)=ax2+bx+cf(x) = ax^2 + bx + c (degree 2)
  • Cubic: f(x)=ax3+bx2+cx+df(x) = ax^3 + bx^2 + cx + d (degree 3)

Domain: Always (−∞,∞)(-\infty, \infty). Polynomials are defined for every real number (Since no denominators, no roots, no logs)

Range:

  • Odd degree (linear, cubic, ...): Range is (−∞,∞)(-\infty, \infty). An odd-degree polynomial goes to +∞+\infty in one direction and −∞-\infty in the other, so by the Intermediate Value Theorem it hits every real number.
  • Even degree (quadratic, quartic, ...): The range depends on the leading coefficient and the global extremum.
    • For a quadratic f(x)=a(x−h)2+kf(x) = a(x-h)^2 + k in vertex form: the vertex (h,k)(h, k) is the minimum if a>0a > 0 and the maximum if a<0a < 0.
      Range=[k,∞)ifa>0;  (−∞,k]ifa<0Range = [k, \infty) if a > 0; \; (-\infty, k] if a < 0
    • For higher even degrees, find the global minimum or maximum by calculus or by completing the analysis of the leading term.

Example: Find the range of f(x)=2x2−8x+3f(x) = 2x^2 - 8x + 3.

Complete the square: f(x)=2(x2−4x)+3=2(x−2)2−8+3=2(x−2)2−5f(x) = 2(x^2 - 4x) + 3 = 2(x-2)^2 - 8 + 3 = 2(x-2)^2 - 5.

Since a=2>0a = 2 > 0, the vertex is a minimum at k=−5k = -5. Range: [−5,∞)[-5, \infty).

Rational Functions

A rational function is a ratio of two polynomials:

f(x)=P(x)Q(x),Q(x)≢0f(x) = \frac{P(x)}{Q(x)}, \qquad Q(x) \not\equiv 0

Domain: All real numbers except the zeros of Q(x)Q(x). Set Q(x)=0Q(x) = 0, solve, and exclude those values.

Range: Set y=f(x)y = f(x), cross-multiply to get a polynomial equation in xx with yy as a parameter, and determine which values of yy allow a real solution. The values that force an inconsistency (e.g., make a discriminant negative or a leading coefficient zero with no solution) are excluded.

Example: Find the domain and range of f(x)=x+2x−3f(x) = \dfrac{x+2}{x-3}.

Domain: Q(x)=x−3=0⇒x=3Q(x) = x - 3 = 0 \Rightarrow x = 3 excluded. Domain: (−∞,3)∪(3,∞)(-\infty, 3) \cup (3, \infty).

Range: Set y=x+2x−3y = \dfrac{x+2}{x-3}. Then y(x−3)=x+2⇒yx−3y=x+2⇒x(y−1)=3y+2⇒x=3y+2y−1y(x-3) = x+2 \Rightarrow yx - 3y = x + 2 \Rightarrow x(y-1) = 3y + 2 \Rightarrow x = \dfrac{3y+2}{y-1}.

This is undefined when y=1y = 1, which means y=1y = 1 is never achieved. Range: (−∞,1)∪(1,∞)(-\infty, 1) \cup (1, \infty).

Competition tip: The excluded value from the range of a simple rational function ax+bcx+d\dfrac{ax+b}{cx+d} is always the horizontal asymptote y=a/cy = a/c. Memorize this.

Vertical asymptotes occur at zeros of QQ that are not cancelled by a zero of PP. If both PP and QQ vanish at x=ax = a, factor out (x−a)(x-a) from both and cancel; what remains is a hole (removable discontinuity), not a vertical asymptote.

Radical Functions

A radical function involves an expression under a root:

f(x)=g(x)nf(x) = \sqrt[n]{g(x)}

Domain:

  • Even root (n=2,4,6,…n = 2, 4, 6, \ldots): The radicand must be non-negative. Solve g(x)≥0g(x) \geq 0.
  • Odd root (n=3,5,7,…n = 3, 5, 7, \ldots): Defined for all real numbers; odd roots of negative numbers are real and negative.

Range:

  • Even root: Output is always ≥0\geq 0 (before any vertical shift). For f(x)=g(x)+kf(x) = \sqrt{g(x)} + k, range starts at kk: [k,∞)[k, \infty).
  • Odd root: Range is (−∞,∞)(-\infty, \infty).

Example: Find the domain and range of f(x)=9−x2f(x) = \sqrt{9 - x^2}.

Domain: 9−x2≥0⇒x2≤9⇒−3≤x≤39 - x^2 \geq 0 \Rightarrow x^2 \leq 9 \Rightarrow -3 \leq x \leq 3. Domain: [−3,3][-3, 3].

Range: At x=0x = 0, f=3f = 3 (maximum). At x=±3x = \pm 3, f=0f = 0 (minimum). Range: [0,3][0, 3].

(Geometrically, this is the upper semicircle of radius 3.)

Example: Find the domain of f(x)=1x2−5x+6f(x) = \dfrac{1}{\sqrt{x^2 - 5x + 6}}.

We need both x2−5x+6≠0x^2 - 5x + 6 \neq 0 (denominator nonzero) and x2−5x+6>0x^2 - 5x + 6 > 0 (under even root). Factoring: (x−2)(x−3)>0(x-2)(x-3) > 0, giving x<2x < 2 or x>3x > 3. Domain: (−∞,2)∪(3,∞)(-\infty, 2) \cup (3, \infty).

Note that combining both constraints at once (strictly greater than zero) handles both automatically.

Exponential Functions

An exponential function has the form

f(x)=a⋅bx+c,b>0, b≠1f(x) = a \cdot b^x + c, \qquad b > 0,\ b \neq 1

The variable is in the exponent, not the base. (b=1b = 1 gives a constant, which is boring.)

Domain: (−∞,∞)(-\infty, \infty) (Since you can raise a positive base to any real power.)

Range: Since bx>0b^x > 0 for all xx and all positive bb, we have a⋅bx>0a \cdot b^x > 0 (if a>0a > 0) or a⋅bx<0a \cdot b^x < 0 (if a<0a < 0), and the vertical shift by cc then moves the asymptote:

Range={(c,∞)if a>0(−∞,c)if a<0\text{Range} = \begin{cases} (c, \infty) & \text{if } a > 0 \\ (-\infty, c) & \text{if } a < 0 \end{cases}

The horizontal asymptote is always y=cy = c, never achieved.

Key behaviors: If b>1b > 1, the function grows as x→∞x \to \infty. If 0<b<10 < b < 1, the function decays as x→∞x \to \infty.

Example: Range of f(x)=3⋅2x−7f(x) = 3 \cdot 2^x - 7. Here a=3>0a = 3 > 0, c=−7c = -7. Range: (−7,∞)(-7, \infty).

Logarithmic Functions

The logarithmic function f(x)=log⁡b(x)f(x) = \log_b(x) (with b>0b > 0, b≠1b \neq 1) is the inverse of bxb^x. The natural log ln⁡x=log⁡ex\ln x = \log_e x and common log log⁡x=log⁡10x\log x = \log_{10} x are the most frequent.

Domain: The argument must be strictly positive. For f(x)=log⁡b(g(x))f(x) = \log_b(g(x)), solve g(x)>0g(x) > 0.

Range: (−∞,∞)(-\infty, \infty) (Since the logarithm achieves every real number.)

Example: Find the domain of f(x)=log⁡2(x2−4)f(x) = \log_2(x^2 - 4).

Need x2−4>0⇒(x−2)(x+2)>0⇒x<−2x^2 - 4 > 0 \Rightarrow (x-2)(x+2) > 0 \Rightarrow x < -2 or x>2x > 2. Domain: (−∞,−2)∪(2,∞)(-\infty, -2) \cup (2, \infty).

Key log identities you will use constantly:

log⁡b(mn)=log⁡bm+log⁡bn\log_b(mn) = \log_b m + \log_b n
log⁡b ⁣(mn)=log⁡bm−log⁡bn\log_b\!\left(\frac{m}{n}\right) = \log_b m - \log_b n
log⁡b(mk)=klog⁡bm\log_b(m^k) = k \log_b m
log⁡bm=log⁡amlog⁡ab(change of base)\log_b m = \frac{\log_a m}{\log_a b} \quad \text{(change of base)}

Absolute Value Functions

The absolute value function is

f(x)=∣x∣={xx≥0−xx<0f(x) = |x| = \begin{cases} x & x \geq 0 \\ -x & x < 0 \end{cases}

Its graph is V-shaped with vertex at the origin.

Domain: (−∞,∞)(-\infty, \infty) (Since absolute value is defined for all reals.)

Range: ∣x∣≥0|x| \geq 0 always, so for f(x)=a∣x−h∣+kf(x) = a|x - h| + k:

Range={[k,∞)if a>0(−∞,k]if a<0\text{Range} = \begin{cases} [k, \infty) & \text{if } a > 0 \\ (-\infty, k] & \text{if } a < 0 \end{cases}

The vertex of y=a∣x−h∣+ky = a|x - h| + k is (h,k)(h, k).

Solving absolute value equations: ∣A∣=B|A| = B has solutions A=BA = B or A=−BA = -B (provided B≥0B \geq 0; if B<0B < 0, no solution). ∣A∣=∣B∣|A| = |B| means A=BA = B or A=−BA = -B.

Solving absolute value inequalities:

  • ∣A∣<B  ⟺  −B<A<B|A| < B \iff -B < A < B
  • ∣A∣>B  ⟺  A<−B|A| > B \iff A < -B or A>BA > B

Example: Range of f(x)=−2∣x+1∣+5f(x) = -2|x + 1| + 5. Vertex at (−1,5)(-1, 5), a=−2<0a = -2 < 0. Range: (−∞,5](-\infty, 5].

Trigonometric Functions

The six trigonometric functions have the most intricate domain-range profiles, owing to their periodicity.

FunctionDomainRange
sin⁡x\sin x(−∞,∞)(-\infty, \infty)[−1,1][-1, 1]
cos⁡x\cos x(−∞,∞)(-\infty, \infty)[−1,1][-1, 1]
tan⁡x\tan xx≠π2+kπ, k∈Zx \neq \frac{\pi}{2} + k\pi,\ k \in \mathbb{Z}(−∞,∞)(-\infty, \infty)
csc⁡x\csc xx≠kπ, k∈Zx \neq k\pi,\ k \in \mathbb{Z}(−∞,−1]∪[1,∞)(-\infty, -1] \cup [1, \infty)
sec⁡x\sec xx≠π2+kπ, k∈Zx \neq \frac{\pi}{2} + k\pi,\ k \in \mathbb{Z}(−∞,−1]∪[1,∞)(-\infty, -1] \cup [1, \infty)
cot⁡x\cot xx≠kπ, k∈Zx \neq k\pi,\ k \in \mathbb{Z}(−∞,∞)(-\infty, \infty)

For transformed sinusoids f(x)=Asin⁡(Bx+C)+Df(x) = A\sin(Bx + C) + D:

  • Amplitude: ∣A∣|A| (half the height of the wave)
  • Period: 2π∣B∣\dfrac{2\pi}{|B|}
  • Phase shift: −C/B-C/B (horizontal shift)
  • Vertical shift: DD (moves the midline)
  • Range: [D−∣A∣, D+∣A∣][D - |A|,\ D + |A|]

Example: Range of f(x)=3sin⁡(2x−π)+1f(x) = 3\sin(2x - \pi) + 1. Here A=3A = 3, D=1D = 1. Range: [1−3,1+3]=[−2,4][1 - 3, 1 + 3] = [-2, 4].

Part 2

Graphical Representation, Transformations, Composite, and Inverse Functions are continued in part 2.

Module Progress:

Join the Discord Community!

Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.