Fiveable

🧠Thinking Like a Mathematician Unit 4 Review

QR code for Thinking Like a Mathematician practice questions

4.7 Functions

4.7 Functions

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🧠Thinking Like a Mathematician
Unit & Topic Study Guides

Definition of functions

A function is a rule that assigns each element from one set (the input set) to exactly one element in another set (the output set). This "exactly one" requirement is what separates functions from more general relations. In the context of set theory, a function is a special type of relation where no input is paired with more than one output.

Domain and codomain

The domain is the set of all valid inputs for a function. The codomain is the set that contains all potential outputs.

A subtle but important distinction: the codomain is not the same as the range (also called the image). The range is the set of outputs the function actually produces, which may be a subset of the codomain.

  • For example, if f:RRf: \mathbb{R} \rightarrow \mathbb{R} is defined by f(x)=x2f(x) = x^2, the domain is all real numbers, the codomain is all real numbers, but the range is only [0,)[0, \infty).
  • Identifying the domain often means finding which inputs won't cause problems (like division by zero or square roots of negatives).

Input vs output

  • Input values (independent variables) are what you feed into the function.
  • Output values (dependent variables) are what the function produces.
  • Each input maps to exactly one output, but multiple inputs can map to the same output. (Think of f(x)=x2f(x) = x^2: both x=3x = 3 and x=3x = -3 give f(x)=9f(x) = 9.)
  • Graphs, tables, and arrow diagrams are all useful ways to visualize these input-output pairings.

Function notation

  • f(x)f(x) means "the function ff evaluated at input xx." The parentheses don't mean multiplication.
  • f:XYf: X \rightarrow Y is set-theoretic notation, stating that ff maps elements from set XX to set YY.
  • Arrow diagrams visually show which elements in the domain map to which elements in the codomain, which is especially helpful when working with finite sets.

Types of functions

Different function types have different structural properties. In this course, the most important distinction is between injective, surjective, and bijective functions, since these connect directly to set theory and relations.

One-to-one functions

A function is one-to-one (injective) if different inputs always produce different outputs. Formally: if f(a)=f(b)f(a) = f(b), then a=ba = b.

  • No two elements in the domain share the same output.
  • Graphically, a function is one-to-one if every horizontal line crosses the graph at most once (the horizontal line test).
  • Example: f(x)=2x+3f(x) = 2x + 3 is one-to-one. But f(x)=x2f(x) = x^2 on all of R\mathbb{R} is not, since f(2)=f(2)=4f(2) = f(-2) = 4.

Onto functions

A function is onto (surjective) if every element in the codomain is the output of at least one input. In other words, the range equals the codomain.

  • To prove a function is onto, you take an arbitrary element yy in the codomain and show there exists some xx in the domain with f(x)=yf(x) = y.
  • Example: f:RRf: \mathbb{R} \rightarrow \mathbb{R} defined by f(x)=2x+3f(x) = 2x + 3 is onto, because for any real number yy, you can solve x=y32x = \frac{y - 3}{2}.

Bijective functions

A bijective function is both one-to-one and onto. Every element in the codomain is paired with exactly one element in the domain.

  • Bijections establish a perfect one-to-one correspondence between two sets.
  • This is why bijections matter in set theory: two sets have the same cardinality if and only if a bijection exists between them.
  • Only bijective functions have inverses that are also functions.

Polynomial functions

Polynomial functions have the form f(x)=anxn+an1xn1++a1x+a0f(x) = a_nx^n + a_{n-1}x^{n-1} + \cdots + a_1x + a_0, where all exponents are non-negative integers.

  • The degree (the highest exponent) determines the function's overall shape and the maximum number of roots.
  • Linear (degree 1), quadratic (degree 2), and cubic (degree 3) are the most common types.
  • Polynomials are continuous everywhere and are widely used for approximating more complex functions.

Rational functions

A rational function is a ratio of two polynomials: f(x)=p(x)q(x)f(x) = \frac{p(x)}{q(x)}.

  • The domain excludes any xx value where q(x)=0q(x) = 0.
  • These excluded values often produce vertical asymptotes or holes in the graph, depending on whether the factor cancels.
  • Rational functions appear in modeling scenarios like rates, concentrations, and economic supply-demand curves.

Transcendental functions

Transcendental functions cannot be built from polynomials using only addition, subtraction, multiplication, division, and root extraction. The major families are:

  • Exponential (e.g., f(x)=exf(x) = e^x): model growth and decay
  • Logarithmic (e.g., f(x)=ln(x)f(x) = \ln(x)): the inverse of exponential functions
  • Trigonometric (e.g., sin(x)\sin(x), cos(x)\cos(x)): model periodic/cyclical behavior

Properties of functions

Continuity

A function is continuous at a point if you can draw through that point without lifting your pen. More precisely, ff is continuous at x=ax = a if limxaf(x)=f(a)\lim_{x \to a} f(x) = f(a).

  • Continuous functions satisfy the Intermediate Value Theorem: if ff is continuous on [a,b][a, b] and f(a)<k<f(b)f(a) < k < f(b), then there exists some cc in (a,b)(a, b) with f(c)=kf(c) = k.
  • Polynomials are continuous everywhere. Rational functions are continuous everywhere except where the denominator is zero.

Differentiability

A function is differentiable at a point if it has a well-defined tangent line (derivative) there.

  • Differentiability implies continuity, but not the other way around. The classic example: f(x)=xf(x) = |x| is continuous at x=0x = 0 but not differentiable there (it has a sharp corner).
  • Differentiable functions allow you to analyze rates of change and solve optimization problems.
Domain and codomain, Domain and Range of Functions | College Algebra

Monotonicity

A function is monotonically increasing if a<ba < b implies f(a)f(b)f(a) \leq f(b), and strictly increasing if a<ba < b implies f(a)<f(b)f(a) < f(b) (similarly for decreasing).

  • A strictly monotonic function is always one-to-one, which is a useful shortcut for proving injectivity.
  • You can determine monotonicity by checking the sign of the derivative: f(x)>0f'(x) > 0 means increasing, f(x)<0f'(x) < 0 means decreasing.

Periodicity

A function is periodic if there exists a positive number TT such that f(x+T)=f(x)f(x + T) = f(x) for all xx. The smallest such TT is the period.

  • sin(x)\sin(x) and cos(x)\cos(x) have period 2π2\pi. tan(x)\tan(x) has period π\pi.
  • Periodic functions are central to modeling waves, oscillations, and any cyclical phenomenon.

Function operations

Composition of functions

Composition chains two functions together: (fg)(x)=f(g(x))(f \circ g)(x) = f(g(x)). You evaluate the inner function first, then feed its output into the outer function.

  1. Start with input xx.
  2. Apply gg to get g(x)g(x).
  3. Apply ff to g(x)g(x) to get f(g(x))f(g(x)).

The domain of fgf \circ g is the set of all xx in the domain of gg such that g(x)g(x) is in the domain of ff. Composition is not commutative: fggff \circ g \neq g \circ f in general.

Inverse functions

The inverse of ff, written f1f^{-1}, reverses the mapping: if f(a)=bf(a) = b, then f1(b)=af^{-1}(b) = a.

  • An inverse function exists only when ff is bijective (one-to-one and onto).
  • f(f1(x))=xf(f^{-1}(x)) = x and f1(f(x))=xf^{-1}(f(x)) = x for all valid inputs.
  • Graphically, the inverse is a reflection of the original function across the line y=xy = x.

To find an inverse algebraically:

  1. Write y=f(x)y = f(x).
  2. Swap xx and yy.
  3. Solve for yy. The result is f1(x)f^{-1}(x).

Addition and subtraction

(f+g)(x)=f(x)+g(x)(f + g)(x) = f(x) + g(x) and (fg)(x)=f(x)g(x)(f - g)(x) = f(x) - g(x)

The domain of the resulting function is the intersection of the domains of ff and gg (both functions must be defined at xx).

Multiplication and division

(fg)(x)=f(x)g(x)(f \cdot g)(x) = f(x) \cdot g(x) and (fg)(x)=f(x)g(x)\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}

For division, you must also exclude any xx where g(x)=0g(x) = 0.

Graphing functions

Cartesian coordinate system

The Cartesian plane uses two perpendicular axes (horizontal xx, vertical yy) to represent points as ordered pairs (x,y)(x, y). A function's graph is the set of all points (x,f(x))(x, f(x)) for xx in the domain.

Function transformations

Transformations modify a function's graph in predictable ways:

  • Vertical shift: f(x)+kf(x) + k shifts the graph up by kk (down if k<0k < 0)
  • Horizontal shift: f(xh)f(x - h) shifts the graph right by hh (left if h<0h < 0)
  • Vertical stretch/compression: af(x)a \cdot f(x) stretches vertically by factor a|a|; reflects across the xx-axis if a<0a < 0
  • Horizontal stretch/compression: f(bx)f(bx) compresses horizontally by factor b|b|; reflects across the yy-axis if b<0b < 0

A common source of confusion: horizontal transformations work in the "opposite" direction from what you might expect. f(x3)f(x - 3) shifts right, not left.

Asymptotes and limits

  • Vertical asymptotes occur where the function grows without bound (often where a denominator equals zero).
  • Horizontal asymptotes describe the function's behavior as x±x \rightarrow \pm\infty.
  • Slant (oblique) asymptotes occur when the degree of the numerator is exactly one more than the degree of the denominator in a rational function.
  • Limits formalize the idea of "approaching" a value. A function can have a limit at a point even if it's not defined there.

Function analysis

Zeros and roots

The zeros (or roots) of a function are the input values where f(x)=0f(x) = 0. On a graph, these are the xx-intercepts.

Methods for finding zeros:

  • Factoring: rewrite the expression as a product and set each factor to zero
  • Quadratic formula: for degree-2 polynomials, x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
  • Graphical/numerical methods: useful when algebraic methods are impractical
Domain and codomain, Domain and Range of Functions | College Algebra

Extrema and optimization

  • A local maximum is a point where f(x)f(x) is greater than all nearby values; a local minimum is where it's less.
  • A global maximum/minimum is the largest/smallest value over the entire domain.
  • To find extrema using calculus: find where f(x)=0f'(x) = 0 or f(x)f'(x) is undefined (critical points), then use the first or second derivative test to classify them.

Rates of change

  • The average rate of change over an interval [a,b][a, b] is f(b)f(a)ba\frac{f(b) - f(a)}{b - a}, which is the slope of the secant line.
  • The instantaneous rate of change at a point is the derivative f(x)f'(x), which is the slope of the tangent line.
  • In applied contexts, rates of change describe velocity (physics), marginal cost (economics), and reaction rates (chemistry).

Special functions

Piecewise functions

A piecewise function uses different formulas on different intervals of the domain. For example:

f(x)={x2if x<02x+1if x0f(x) = \begin{cases} x^2 & \text{if } x < 0 \\ 2x + 1 & \text{if } x \geq 0 \end{cases}

When working with piecewise functions, always check behavior at the boundary points to determine continuity.

Parametric functions

Instead of expressing yy directly as a function of xx, parametric equations express both coordinates in terms of a third variable (the parameter, often tt):

x=g(t),y=h(t)x = g(t), \quad y = h(t)

This allows you to represent curves that fail the vertical line test, like circles. Parametric representations are common in physics (projectile motion: x=v0tcosθx = v_0 t \cos\theta, y=v0tsinθ12gt2y = v_0 t \sin\theta - \frac{1}{2}gt^2) and computer graphics.

Implicit functions

An implicit function defines a relationship between xx and yy without isolating yy. For example, the unit circle x2+y2=1x^2 + y^2 = 1 defines yy implicitly as a function of xx (though you'd need to restrict to the upper or lower semicircle to get a true function).

Implicit differentiation lets you find dydx\frac{dy}{dx} without solving for yy first.

Applications of functions

Modeling real-world phenomena

Functions translate real-world relationships into mathematical form:

  • Exponential growth: population models like P(t)=P0ertP(t) = P_0 e^{rt}, where rr is the growth rate
  • Exponential decay: radioactive decay with half-life, N(t)=N0(0.5)t/hN(t) = N_0 \cdot (0.5)^{t/h}
  • Linear models: direct proportional relationships like distance = rate ×\times time

Choosing the right function type depends on the pattern in observed data.

Problem-solving with functions

  • Optimization: find the input that maximizes or minimizes a quantity (e.g., minimizing material cost for a container of fixed volume)
  • Inverse problems: given an output, determine what input produced it (e.g., finding the time at which a population reaches a certain size)
  • Systems of equations: use multiple functions simultaneously to find where conditions intersect

Functions in other disciplines

  • Physics: position, velocity, and acceleration as functions of time
  • Economics: cost, revenue, and profit functions; supply and demand curves
  • Computer science: functions as subroutines; complexity functions like O(nlogn)O(n \log n)
  • Biology: logistic growth models for populations approaching carrying capacity

Advanced function concepts

Vector-valued functions

A vector-valued function maps an input (often a scalar) to a vector. For example, r(t)=cos(t),sin(t),t\mathbf{r}(t) = \langle \cos(t), \sin(t), t \rangle describes a helix in 3D space.

These functions are used to represent curves and paths in multiple dimensions, with applications in physics (describing the trajectory of a particle) and computer graphics.

Complex functions

Complex functions take complex numbers as inputs and produce complex numbers as outputs. A function f:CCf: \mathbb{C} \rightarrow \mathbb{C} can exhibit properties with no real-number analogue, such as analyticity (being differentiable everywhere in a region) and conformal mapping (preserving angles locally).

These appear in electrical engineering (AC circuit analysis), fluid dynamics, and quantum mechanics.

Functional analysis basics

Functional analysis treats entire functions as points in abstract spaces. Instead of studying individual numbers, you study spaces of functions equipped with notions of distance and convergence.

This is a graduate-level topic that underpins much of modern mathematics and theoretical physics, including the mathematical framework of quantum mechanics (Hilbert spaces) and the theory of differential equations.