Totality and single-valuedness
Every element of the domain must have an image (total), and only one (well defined). A rule failing either is not a function.
A function is a relation from A to B in which every element of A appears exactly once as a first coordinate. Domain, codomain and image are three different sets, and confusing the last two causes most of the trouble.
Core ideas
Two conditions define a function: every input is used, and none is used twice. Everything else is vocabulary.
Every element of the domain must have an image (total), and only one (well defined). A rule failing either is not a function.
f : ℝ → ℝ with f(x) = x² has codomain ℝ and image [0, ∞). Surjectivity in “Injective, Surjective, Bijective” is exactly the question of whether they coincide.
x ↦ x² from ℝ to ℝ and from ℝ to [0, ∞) are different functions, and one is surjective while the other is not.
The material
The definition as a relation, then the vocabulary and the standard traps.
A function f : A → B is a relation f ⊆ A × B such that for every a ∈ A there is exactly one b ∈ B with (a, b) ∈ f. That b is written f(a).
The definition packs two conditions. At least one output for each input makes the function total — a rule undefined somewhere on its stated domain is not a function on that domain. At most one makes it well defined — a rule giving two answers for one input is not a function at all.
In f : A → B, A is the domain, B the codomain, and f(A) = {f(a) : a ∈ A} ⊆ B the image (or range).
f : ℝ → ℝ, f(x) = x² has image [0, ∞) ≠ ℝ. g : ℝ → [0, ∞), g(x) = x² has image equal to its codomain. h : [0, ∞) → [0, ∞), h(x) = x² is in addition one-to-one. Same formula, three different functions, three different answers in “Injective, Surjective, Bijective”.
A third failure is subtler and appears whenever a function is defined through a representative. "Define f([a]) = a mod 2 on classes mod 4" must be checked: [1] = [5], so f must give the same answer for 1 and 5, and it does. Had the rule been f([a]) = a mod 3, then 1 mod 3 = 1 and 5 mod 3 = 2, and f would not be well defined.
For S ⊆ A, f(S) = {f(a) : a ∈ S}. For T ⊆ B, the preimage f⁻¹(T) = {a ∈ A : f(a) ∈ T}. The preimage notation does not presuppose an inverse function.
That last remark matters. f⁻¹(T) is defined for every function and every T; it may be empty. The inverse function f⁻¹ exists only when f is a bijection, which is “Composition and Inverse Functions”.
⌊x⌋ is the largest integer ≤ x; ⌈x⌉ the smallest integer ≥ x. The identity id_A(a) = a. A sequence is a function ℕ → A, which is why Induction and Recursion's recurrences are functions on the naturals.
Interactive
Built by hand, classified by counting
Method
Two conditions, plus a third when classes are involved.
Division, square roots and logarithms are the usual places a rule quietly fails. Either restrict the domain or the rule is not a function on it.
One input, one output. If the rule offers a choice, the function is not specified until the choice is made.
Compute the rule on two representatives of the same class. Different answers mean the rule is not a function on classes at all.
It is part of the function. Declaring f : ℝ → ℝ rather than f : ℝ → [0,∞) changes the answer to “Injective, Surjective, Bijective”'s question.
Four candidate rules, with the domain stated in each case.
Case 4 is the one that needs an argument rather than an inspection. The rule is stated through a representative, so it is a function only because any two representatives of the same class mod 4 agree mod 2 — and that had to be proved, not assumed.
For f : ℤ → ℤ with f(n) = n², name all three, and then say what changes if the codomain is narrowed to the set of perfect squares. That narrowing is the whole difference “Injective, Surjective, Bijective” measures.
Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.
No recommendations yet for this lesson.