relations
Functions
You should know: natural numbers
Overview
A function is a rule that assigns exactly one output to each input from a given set. Functions are the central object of essentially all of mathematics beyond arithmetic — calculus studies how functions change, linear algebra studies a special class of functions (linear transformations), and analysis studies which functions are continuous, differentiable, or integrable.
Intuition
Think of a function as a machine: you feed it an input, it processes it, and exactly one output comes out the other side. Put the same input in twice, you always get the same output — that determinism is the whole definition. A vending machine is a function from button-presses to snacks; it would be broken (not a function) if pressing B4 sometimes gave you chips and sometimes gave you nothing.
Interactive Graph
Formal Definition
A function f from a set A (the domain) to a set B (the codomain) assigns to every element of A exactly one element of B.
f is a function from A to B
Every input has exactly one output (the ! means 'exactly one')
Notation
| Notation | Meaning |
|---|---|
| The output of function f when the input is x | |
| The domain: the set of valid inputs | |
| The set of actual outputs produced | |
| f maps elements of A to elements of B |
Properties
Injective (one-to-one)
Example: f(x) = 2x is injective; f(x) = x^2 on all reals is not (f(-2)=f(2)).
Surjective (onto)
Bijective
Applications
Worked Examples
Every real x squared gives exactly one real output, so yes, it's a function.
But f(-3) = 9 = f(3), two different inputs give the same output.
Answer: It is a function, but not injective.
Practice Problems
Which of the following relations is NOT a function of x?
A parking garage charges a $5 base fee plus $2 per hour. Write the cost as a function C(h) of hours parked, and find the cost for 3.5 hours.
A projectile's height is h(t) = 20t − 5t² (metres, t in seconds). What is the realistic domain of this function, and why?
Common Mistakes
Assuming every equation relating x and y is a function of x.
A relation is only a function if every x-value maps to exactly one y-value (the vertical line test).
Quiz
Flashcards
Historical Background
The word 'function' was introduced by Gottfried Wilhelm Leibniz in 1673, though the underlying concept — a quantity depending on another — appears implicitly in Descartes' analytic geometry. The modern set-theoretic definition (a function as a set of ordered pairs) was formalized in the early 20th century, notably through the work of Nicolas Bourbaki.
- 1673
Leibniz introduces the term 'function'
Gottfried Wilhelm Leibniz
- 1837
Dirichlet gives the modern general definition: a function is any rule assigning outputs to inputs
Peter Gustav Lejeune Dirichlet
- 20th century
Set-theoretic formalization as a set of ordered pairs (Bourbaki)
Summary
- A function assigns exactly one output to each input.
- Domain = valid inputs, range = actual outputs, codomain = the target set.
- Injective: no two inputs share an output. Surjective: every codomain element is reached. Bijective: both.
- The vertical line test checks whether a graph represents a function of x.
- Functions are the basic object of study in calculus, analysis, and much of modern mathematics.
Mathematics