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 is defined by , the domain is all real numbers, the codomain is all real numbers, but the range is only .
- 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 : both and give .)
- Graphs, tables, and arrow diagrams are all useful ways to visualize these input-output pairings.
Function notation
- means "the function evaluated at input ." The parentheses don't mean multiplication.
- is set-theoretic notation, stating that maps elements from set to set .
- 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 , then .
- 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: is one-to-one. But on all of is not, since .
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 in the codomain and show there exists some in the domain with .
- Example: defined by is onto, because for any real number , you can solve .
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 , 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: .
- The domain excludes any value where .
- 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., ): model growth and decay
- Logarithmic (e.g., ): the inverse of exponential functions
- Trigonometric (e.g., , ): 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, is continuous at if .
- Continuous functions satisfy the Intermediate Value Theorem: if is continuous on and , then there exists some in with .
- 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: is continuous at but not differentiable there (it has a sharp corner).
- Differentiable functions allow you to analyze rates of change and solve optimization problems.

Monotonicity
A function is monotonically increasing if implies , and strictly increasing if implies (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: means increasing, means decreasing.
Periodicity
A function is periodic if there exists a positive number such that for all . The smallest such is the period.
- and have period . has period .
- Periodic functions are central to modeling waves, oscillations, and any cyclical phenomenon.
Function operations
Composition of functions
Composition chains two functions together: . You evaluate the inner function first, then feed its output into the outer function.
- Start with input .
- Apply to get .
- Apply to to get .
The domain of is the set of all in the domain of such that is in the domain of . Composition is not commutative: in general.
Inverse functions
The inverse of , written , reverses the mapping: if , then .
- An inverse function exists only when is bijective (one-to-one and onto).
- and for all valid inputs.
- Graphically, the inverse is a reflection of the original function across the line .
To find an inverse algebraically:
- Write .
- Swap and .
- Solve for . The result is .
Addition and subtraction
and
The domain of the resulting function is the intersection of the domains of and (both functions must be defined at ).
Multiplication and division
and
For division, you must also exclude any where .
Graphing functions
Cartesian coordinate system
The Cartesian plane uses two perpendicular axes (horizontal , vertical ) to represent points as ordered pairs . A function's graph is the set of all points for in the domain.
Function transformations
Transformations modify a function's graph in predictable ways:
- Vertical shift: shifts the graph up by (down if )
- Horizontal shift: shifts the graph right by (left if )
- Vertical stretch/compression: stretches vertically by factor ; reflects across the -axis if
- Horizontal stretch/compression: compresses horizontally by factor ; reflects across the -axis if
A common source of confusion: horizontal transformations work in the "opposite" direction from what you might expect. 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 .
- 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 . On a graph, these are the -intercepts.
Methods for finding zeros:
- Factoring: rewrite the expression as a product and set each factor to zero
- Quadratic formula: for degree-2 polynomials,
- Graphical/numerical methods: useful when algebraic methods are impractical

Extrema and optimization
- A local maximum is a point where 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 or 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 is , which is the slope of the secant line.
- The instantaneous rate of change at a point is the derivative , 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:
When working with piecewise functions, always check behavior at the boundary points to determine continuity.
Parametric functions
Instead of expressing directly as a function of , parametric equations express both coordinates in terms of a third variable (the parameter, often ):
This allows you to represent curves that fail the vertical line test, like circles. Parametric representations are common in physics (projectile motion: , ) and computer graphics.
Implicit functions
An implicit function defines a relationship between and without isolating . For example, the unit circle defines implicitly as a function of (though you'd need to restrict to the upper or lower semicircle to get a true function).
Implicit differentiation lets you find without solving for first.
Applications of functions
Modeling real-world phenomena
Functions translate real-world relationships into mathematical form:
- Exponential growth: population models like , where is the growth rate
- Exponential decay: radioactive decay with half-life,
- Linear models: direct proportional relationships like distance = rate 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
- 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, 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 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.