Quick answer: A function is one-one (injective) if different inputs give different outputs, onto (surjective) if every element of B is an output, and bijective if it is both. Only bijective functions have an inverse. The composite applies f first, then g, and in general .
This continues from functions, domain, codomain and range.
Definitions and tests
| Type | Definition | Quick test |
|---|---|---|
| One-one | Horizontal line meets the graph at most once | |
| Many-one | Two inputs share an output | Some horizontal line meets the graph twice |
| Onto | Range = codomain | Every y in B has a solution x |
| Into | Range ⊂ codomain, range ≠ codomain | Some y has no pre-image |
| Bijective | One-one and onto | Both tests pass |
A function that keeps increasing (or keeps decreasing) over its whole domain, with no flat stretch, is one-one; checking the sign of the derivative is a fast test.
Standard examples
| Function | One-one | Onto |
|---|---|---|
| , | Yes | Yes |
| , | No | No |
| , | Yes | Yes |
| , | Yes | Yes |
| , | Yes | No |
| , | No | No |
The same rule can change type when the domain or codomain changes, as shows.
Counting functions
For and :
| Type | Number |
|---|---|
| All functions | |
| One-one () | |
| Bijections () | |
| Onto () |
Example: onto functions from a 4-element set to a 2-element set: (all functions minus the 2 constant ones).
Composite functions
This is defined when the range of f lies inside the domain of g.
| Property | Statement |
|---|---|
| Not commutative | in general |
| Associative | |
| One-one | If f and g are one-one, so is |
| Onto | If f and g are onto, so is |
Example: and . Then and , which are different.
Inverse functions
If is a bijection, its inverse satisfies .
Method: write , solve for x, then swap the letters.
Example: .
Step 1: , so .
Step 2: .
Key facts:
- and .
- .
- The graph of is the reflection of the graph of f in the line .
Worked examples
Example 1: testing one-one
Is one-one on ℝ? No: .
Example 2: testing onto
Is , onto? For any y, is real, so yes.
Example 3: counting one-one functions
How many one-one functions are there from to ?
.
Example 4: composite value
If and , find .
, then .
Summary table
| Concept | Key result |
|---|---|
| One-one | Distinct inputs give distinct outputs |
| Onto | Range equals codomain |
| Bijection | Has an inverse |
| One-one count | |
Exam tips
- Always check the stated domain and codomain before deciding onto or one-one.
- For onto questions, try to solve for a general y.
- For two-element codomains, onto count .
- Read the order of composition carefully: means f first.
Continue with mathematical logic and truth tables, or see the NIMCET Set Theory chapter.
Common mistakes
- Deciding onto without looking at the codomain.
- Writing ; the order reverses.
- Assuming every one-one function is onto.
- Confusing with .
Frequently Asked Questions
What is a one-one function?
A function is one-one if different inputs always give different outputs, that is, f(x₁) = f(x₂) implies x₁ = x₂.
What is an onto function?
A function f : A → B is onto if every element of B is the image of at least one element of A.
How many bijections are there between two sets of n elements?
There are n! bijections.
When does a function have an inverse?
A function has an inverse only when it is bijective (one-one and onto).
Is fog equal to gof?
Not in general. Composition of functions is not commutative.