Functions and Their Types
Explore the building blocks: functions, their properties, and graphs.
A Function as a Map
Another way to think about a function is as a mapping. It takes every element in the Domain and maps it to exactly one element in the Range. This visual metaphor helps reinforce the "one output for every input" rule.
- Domain: The set of all possible input values (the 'x' values), also known as the pre-image.
- Range: The set of all *actual* output values that the function produces (the 'f(x)' values), also known as the image. It's also possible for multiple inputs to map to the same output, as shown with x₁ and x₄ below.
An illustration showing how each element in the domain (pre-image) is mapped to exactly one element in the range (image).
What makes this NOT a function?
The diagram above shows a valid function. However, if we were to add the red dashed line, the mapping would no longer be a function. This is because the input x₂ would now map to two different outputs: f(x₂) and f(x₃), violating the "exactly one output" rule. A relation that does this is not a function.
Injective, Surjective, and Bijective Functions
Beyond the basic definition of a function, we can classify them further based on how their inputs and outputs are paired. These classifications are crucial in higher-level mathematics.
Injective (One-to-One)
Each input maps to a unique output. No two different inputs share the same output.
f(x) = 2x is injective because every distinct x-value will produce a distinct y-value.Note that y₄ in the range is unmapped, which is allowed.
Surjective (Onto)
Every element in the range is mapped to by at least one input. The range is "full".
f(x) = x³ from ℝ to ℝ is surjective. For any real number y, we can find an x such that x³ = y.Note that y₁ is mapped to by both x₁ and x₄, which is allowed.
Bijective (One-to-One and Onto)
A function that is both injective and surjective. A perfect pairing.
f(x) = x + 1 from ℝ to ℝ is bijective. It's one-to-one and every real number output can be generated.Every input has a unique output, and every output is mapped to. The sets are perfectly matched.
Classifying Functions by their Behavior
Functions can be classified in many ways based on their properties and the shapes of their graphs. Understanding these classifications helps us predict their behavior and apply the correct calculus techniques.
Increasing & Decreasing
An increasing function's graph goes up as you move from left to right (positive slope). A decreasing function's graph goes down (negative slope).
Continuous & Discontinuous
A continuous function can be drawn without lifting your pen. A discontinuous function has a break or "jump".
Differentiable & Non-Differentiable
A function is differentiable at points where it's a smooth curve. It is non-differentiable at sharp corners or cusps.
The Differential Coefficient at a point on a curve represents the slope of the tangent to the curve at that point. At a sharp point infinite number of tangents can be drawn. So there can be infinite no. of possible values of slope of tangent and hence infinite no. of possible values (no unique value) of differential coefficient at the sharp point. Therefore the function is not differentiable at the sharp point
Common Function Types
Explore the shapes of common functions like the Modulus function |x|, a smooth Trigonometric function like sin(x), or the Fractional Part function {x}, where {x} = x - [x].
Example Problems
Check Your Understanding
Fundamental Counting Principles
Inclusion-Exclusion Principle
The Inclusion-Exclusion Principle is a counting technique used to find the number of elements in the union of two or more sets.
|A ∪ B| = |A| + |B| - |A ∩ B|In simple terms, to find the total number of elements in either set, we add the sizes of the individual sets and then subtract the size of their intersection to avoid double-counting the elements that are in both sets.
Solution: |F ∪ C| = |F| + |C| - |F ∩ C| = 15 + 20 - 10 = 25. So, 25 students play at least one sport.
Pigeonhole Principle
The Pigeonhole Principle states that if you have more pigeons than pigeonholes, at least one pigeonhole must contain more than one pigeon.
If `n+1` items are put into `n` containers, then at least one container must contain more than one item.
This simple but powerful idea is used in proofs and problem-solving to guarantee the existence of a certain property or outcome without needing to find the specific instance.
Solution: There are 366 possible birthdays (including February 29). The people are the "pigeons" (367) and the birthdays are the "pigeonholes" (366). Since there are more people than possible birthdays, at least two people must share a birthday.
Number of Functions
Counting Functions Between Finite Sets
Given two finite sets, A (the domain) and B (the codomain), let |A| = m and |B| = n. We can calculate the total number of possible functions and the number of specific types of functions.
- Total number of functions: Each of the `m` elements in A can be mapped to any of the `n` elements in B. Therefore, the total number of functions from A to B is
n * n * ... * n(`m` times), which isn^m. - Number of Injective (One-to-One) functions: This is only possible if m ≤ n. The first element of A has n choices in B, the second has n-1 choices, and so on. The number is P(n, m) =
n! / (n-m)!. If m > n, the number of injective functions is 0. - Number of Surjective (Onto) functions: This is only possible if m ≥ n. The formula uses the principle of inclusion-exclusion:
Σ from k=0 to n [(-1)^k * C(n, k) * (n-k)^m], where C(n, k) is the binomial coefficient "n choose k". - Number of Bijective functions: This is only possible if m = n. If so, the function must be both injective and surjective, meaning it's a permutation of the elements. The number is
n!. If m ≠ n, the number of bijective functions is 0.