Functions
A function is a rule that assigns to each input exactly one output. Written , it maps every element of a domain to a single element of a codomain . Functions appear everywhere in mathematics, science, economics, and computing. The modern definition crystallized in the 19th century through the work of Dirichlet, Riemann, and others.
A function from a set to a set is a relation that pairs each element of with exactly one element of . The set is called the domain, and the codomain. Functions matter because they capture the idea of dependence — how one quantity is determined by another — and they are the central objects of calculus, algebra, and analysis. A surprising fact: a function does not need a formula at all; it can be defined by any rule, table, graph, or even a verbal description, as long as the "one input, one output" requirement holds.
The Core Insight
The defining feature of a function is single-valuedness: every input has one and only one output. The same output may come from many inputs, and not every element of the codomain must be used — but no input may point to two outputs. This is what separates a function from a general relation.
Formal Statement
Function
A function from a set (the domain) to a set (the codomain) is a rule assigning to each exactly one element . We write:
The defining condition (single-valuedness) is:
Here:
- is the independent variable (input, argument).
- is the value or image of (output).
- The range is the set of all actual outputs: .
Function as a Set of Ordered Pairs
Formally, a function is a set of ordered pairs such that:
This set-theoretic version makes the definition rigorous without referring to any formula or process.
Vertical Line Test
A curve in the Cartesian plane is the graph of a function if and only if every vertical line intersects the curve in at most one point.
Why It Holds / Derivation
Why the Vertical Line Test Works
We prove the Vertical Line Test follows directly from the definition.
- Suppose is a curve that is the graph of a function . By definition , each in the domain has exactly one value , so the only point of with first coordinate is .
- Therefore the vertical line meets in exactly one point (or none, if ) — never more than one.
- Conversely, suppose every vertical line meets in at most one point. Define as the set of -values appearing in . For each , there is exactly one with ; call it .
- This assignment satisfies , so is the graph of the function .
Peter Gustav Lejeune Dirichlet | 1805–1859
Dirichlet gave one of the first fully modern definitions of a function in 1837, freeing the concept from any requirement of a formula. He proposed that is a function of if to each value of there corresponds a unique value of — by any rule whatsoever. His famous example, the Dirichlet function (equal to 1 on rationals and 0 on irrationals), showed that functions need not be drawable or computable by a single expression. This abstraction reshaped analysis.
Building Intuition
Think of a function as a machine: you feed in an input, the machine processes it, and out comes exactly one output. Press the same button twice and you get the same result — that is single-valuedness. Different buttons may give the same result (that's allowed), but one button can never give two different results.
Other useful mental pictures:
- A mapping of arrows from a left-hand bag of inputs to a right-hand bag of outputs: every left dot has exactly one arrow leaving it.
- A table of values: each row's input column entry is unique to that row's output.
- A dependency: "distance depends on time," "price depends on quantity" — the output is determined by the input.
A function as a mapping between sets: every input arrow leaves exactly one dot
Worked Examples
Evaluating and Finding the Domain
Given: . Find: (a) , (b) the natural domain. Steps:- (a) Substitute :
- (b) Two restrictions: the radicand must be , so . The denominator must be nonzero, so .
Combining:
Composition of Functions
Given: and . Find: and . Steps:- The composition . Substitute into :
- For , first compute , then :
Note that in general — composition is not commutative.
Common Misconceptions
"A function must have a formula." False. A function is any single-valued assignment. It can be defined by a table, a graph, a piecewise rule, or words like " the -th prime." The formula is just one convenient way of specifying the rule. " means times ." No — denotes the output of at input , not multiplication. Confusing this with the distributive law leads to errors like writing , which is generally false.A Relation That Is Not a Function
Consider the unit circle . Solving for gives . At we get two outputs, and . Since one input yields two outputs, the circle is not a function of — it fails the Vertical Line Test. (We can split it into two functions: the upper and lower semicircles.)
Linearity Fails for Most Functions
Take . Then , but . Since , we see . Only special functions (linear ones, ) satisfy that additive property.
Connections
Functions are the connective tissue of mathematics. They generalize the idea of an Equation by emphasizing dependence rather than a single solution set. Special families — Linear Functions, Quadratic Functions, Polynomial Functions, Exponential Functions, and Trigonometric Functions — are studied individually but all obey the single-valuedness rule. The study of how outputs change with inputs leads directly to Derivatives in calculus, while accumulation leads to Integrals. Functions that "undo" each other are Inverse Functions, and combining functions yields Function Composition. The graphical view connects to Coordinate Geometry.
Real-World Applications
- Physics — kinematics: Position as a function of time, , lets engineers predict motion; velocity is the derivative .
- Economics — demand curves: Quantity demanded as a function of price guides pricing decisions.
- Computer science — pure functions: In programming, a function maps inputs to outputs deterministically; this underlies functional languages like Haskell.
- Engineering — transfer functions: A system's output signal as a function of its input characterizes circuits and control systems.
- Medicine — dose-response: Drug effect modeled as a function of dosage informs safe prescriptions.
- Cryptography — hash functions: Map data of any size to fixed-size outputs, central to digital security (e.g., SHA-256).
- Cartography — projections: A map projection is a function from the curved Earth's surface to a flat plane.
Historical Development
- c. 1350 — Nicole Oresme graphs varying quantities, an early intuition of functional dependence.
- 1637 — René Descartes links algebra and geometry in La Géométrie, enabling curves as relations between variables.
- 1673 — Gottfried Leibniz coins the term function (Latin functio) for quantities related to a curve.
- 1748 — Leonhard Euler, in Introductio in analysin infinitorum, defines a function as an analytic expression and introduces the notation .
- 1822 — Joseph Fourier represents arbitrary functions as trigonometric series, stretching the notion of "function."
- 1837 — Dirichlet gives the modern, formula-free definition: a unique output for each input by any rule.
- 1854 — Bernhard Riemann refines the concept while developing integration theory.
- 1872 — Karl Weierstrass exhibits a continuous-but-nowhere-differentiable function, challenging intuitions.
- 1900s — Set theory (Cantor, Zermelo) recasts functions as sets of ordered pairs, giving the rigorous modern foundation.
Subtleties & Limits
The modern set-theoretic definition treats a function as a completed set of pairs, but this raises deep questions explored in advanced mathematics. The Axiom of Choice is needed to guarantee certain functions exist (e.g., choosing one element from each set in an infinite collection), and its status was debated for decades. In computability theory, not every function can be computed by an algorithm — there are uncountably many functions but only countably many programs, so most functions are non-computable. Whether certain specific functions (e.g., the Busy Beaver function) are even well-defined for large inputs touches on the limits of what mathematics can decide.