A function is a specific kind of relation in mathematics where every element in the domain is associated with exactly one element in the range. While all functions are relations, not all relations are functions.
A function f from a set A (domain) to a set B (codomain) is a rule that assigns each element in A to a unique element in B.
Notation: f: A → B
Condition: No element in the domain has more than one image in the codomain.
Functions can be represented using ordered pairs (x, y)
, where x belongs to the domain and y belongs to the range. Each value of x in a function is linked to a single, unique value of y.
Example: f = {(1, 2), (2, 4), (3, 6)}
is a function because each input has one unique output.
Mapping diagrams are commonly used to represent functions by linking every element in the domain to one specific element in the range.
Domain → Range 1 → 2 2 → 4 3 → 6
Every item in the domain (left side) is paired with a single, unique item in the range (right side).
f(x) = x + 5
. Given the domain {1, 2, 3}, the function evaluates as follows:
f(1) = 6
f(2) = 7
f(3) = 8
f(x) = x²
for domain {–2, –1, 0, 1, 2}
f(–2) = 4
f(–1) = 1
f(0) = 0
f(1) = 1
f(2) = 4