Quick answer: A function is a relation in which every element of A is paired with exactly one element of B. A is the domain, B the codomain, and the set of actual outputs is the range, so range ⊆ codomain. To find the domain of a real function, remove values that make a denominator zero, an even root negative, or a logarithm's argument non-positive.
Functions are special relations; see types of relations for the general idea.
Function or not?
A relation from A to B is a function when:
- every element of A has an image, and
- no element of A has two different images.
| Relation on A = {1, 2, 3} to B = {p, q} | Function? |
|---|---|
| Yes | |
| No, 3 has no image | |
| No, 1 has two images |
Vertical line test: a curve is the graph of a function of x if every vertical line meets it at most once.
Number of functions from A to B with and is .
Finding the domain
| Expression contains | Condition |
|---|---|
| or |
For sums and products of functions, the domain is the intersection of the individual domains.
Example: needs and , so the domain is .
Finding the range
Common methods:
- Write , solve for x, and find the values of y for which x is real and in the domain.
- Use known bounds, such as or .
- Complete the square for quadratics.
Example: Range of , .
Step 1: , so .
Step 2: This is defined for every . Range: .
Standard real functions
| Function | Rule | Domain | Range |
|---|---|---|---|
| Identity | ℝ | ℝ | |
| Constant | ℝ | ||
| Modulus | ℝ | ||
| Greatest integer | , the largest integer ≤ x | ℝ | ℤ |
| Signum | if , if , if | ℝ | |
| Reciprocal | |||
| Square root | |||
| Exponential | , , | ℝ | |
| Logarithm | ℝ |
Greatest integer function facts
- and .
- for any integer .
- .
- The fractional part lies in .
Worked examples
Example 1: domain with a logarithm
Find the domain of .
, so . Domain: .
Example 2: range by bounds
Find the range of .
Since , the range is .
Example 3: counting functions
How many functions are there from a 3-element set to a 2-element set?
.
Example 4: greatest integer equation
Solve .
, so .
Summary table
| Idea | Key point |
|---|---|
| Function | Each input has exactly one output |
| Range vs codomain | Range ⊆ codomain |
| Domain rules | No zero denominators, no negative even roots, log argument > 0 |
| Number of functions | |
| Largest integer ≤ x |
Exam tips
- For domain questions, list every restriction and take the intersection.
- For range questions, solving for x in terms of y is the most reliable method.
- Be careful with negative numbers in : .
Next, read one-one, onto and composite functions, or browse the NIMCET Set Theory chapter.
Common mistakes
- Treating the codomain as the range.
- Forgetting values that make the denominator zero after simplifying.
- Writing instead of .
- Counting functions from A to B as instead of .
Frequently Asked Questions
What is the difference between codomain and range?
The codomain is the set B in f : A → B. The range is the set of outputs actually produced, which is a subset of the codomain.
How do you find the domain of a function?
Find all real x for which the expression is defined: no zero denominators, no negative values under even roots, and positive arguments for logarithms.
How many functions are there from A to B?
If n(A) = m and n(B) = n, there are nᵐ functions.
What is the greatest integer function?
[x] is the largest integer less than or equal to x. For example, [2.7] = 2 and [−2.7] = −3.
Is every relation a function?
No. A relation is a function only if every element of the domain has exactly one image.