Introduction
A function is any rule that maps each input (in a domain), to only one output (in a Codomain).
A function may be injective, surjective, or bijective, depending on how the function maps the inputs (in its domain) to the outputs (in its Codomain).
Basically, an INJECTIVE function is a function that MAPS ONE INPUT TO ONE OUTPUT and another input cannot map to that same output, i.e, no two distinct elements in the domain can map to the same element in the range; a SURJECTIVE function is any function that has ATLEAST ONE corresponding INPUT FOR EACH AND EVERY OUTPUT in the codomain; while a BIJECTIVE function is a function that is both injective and surjective, i.e, each of every output has only one unique input, and every input has a unique output.
Contents
Learning Objectives
By the end of this section, you will be able to:
- Explain Injective functions and injection.
- Explain Surjective functions.
- Explain Bijective functions.
Injective function
Let us assume that we have a function ; then we take random values for ;
When ,
From the above, it is seen that each and every produced a unique , which is not [or cannot be] produced by another ; even if we take many more values for , the value that will be given [for each ] is one that has not been produced by any previous , and will not be produced by any other ; this type of function is called an Injective Function.
In simple terms, an injective function is a function that has each element ( ) in its range (output) paired with EXACTLY ONE element ( ) in its domain (input).
In other words, for each output value of an injective function, there is at most one input value which produces that output.
This means that no two distinct elements ( ) in the domain of an injective function are mapped to the same element ( ) in the range, only one is mapped to one .
An Injective function is one which has a unique for each (via wikimedia commons)
Mathematicians explain that every element of an injective function's codomain is the image of at most one element of its domain.
An injective function is also sometimes called a one-to-one function or an injection.
There's a simple trick to test if a function is Injective:
To see if a function is injective, we equate
If we get , then the function is an Injective function.
Equivalently, if we get , then and such function is not injective.
E.g we want to test if is Injective:
We equate ;
Since we arrived at , then the function is an Injective function.
Surjective function
A function is said to be surjective if EVERY ELEMENT in the CODOMAIN of the function is MAPPED TO by at least one ELEMENT in the DOMAIN of the function.
This means that for a function to be surjective, all outputs must have inputs, i.e no output is without its own input; (the inputs are not necessarily unique).
Let us assume that a function is defined by , such function is surjective if its range (or image) is equal to ; this shows us that, the RANGE of every surjective function is EQUAL to the CODOMAIN of the function.
A surjective function is also called an onto function.
What this means is that every element in the codomain is "hit" by the function, hence the name "onto".
Function is not surjective because there's a leftover output (D) while function is surjective because there's no leftover output.
Examples of surjective functions (for functions defined by
Bijective function
A function is bijective if it is both injective and surjective.
Recall that we said each s of an injective function has unique s, and every of a surjective function has a ;
A bijective function is then a type of function in which every s produces unique s and at the same time, there is no which does not have its [unique] .
A bijective function is a type of function which has no leftover input and output, and each input has a unique output;
You can picture it like a universal marriage in which every husband has only one wife, and every wife has only one husband.
A bijective function is also called a [perfect] one–to–one correspondence, and they are invertible functions [means that their inverses can be gotten, and are also valid functions].
How do we see if a function is bijective or not?
Every function that is defined by , is bijective if it has a domain and range that are both set of all real numbers, and .
We can also make use of a horizontal line test if the function is represented graphically.
Horizontal Line Test
Just as the name implies, a horizontal line test is carried out by drawing horizontal lines on every section on the graph of a function;
You can choose to picture the horizontal lines (abstractly) crossing the graph of a function at all sections, or you could actually draw the horizontal lines on the graph of the function by yourself.
A horizontal line test is used to see if a function is injective, surjective and/or bijective.
How do we use a horizontal line test to determine whether the graph of a function is injective, surjective or bijective?
Horizontal Line Test for surjection:
If horizontal lines are drawn across every section on the graph of a function, and every horizontal line cuts through the graph, the graph is the graph of a surjective function.
If horizontal lines are drawn across every section on the graph of a function, and there's atleast one horizontal line which does not cut through the graph, the graph is not the graph of a surjective function.
Horizontal Line Test for injection:
If horizontal lines are drawn across every section on the graph of a function, and every horizontal line which cuts through the graph cuts only once, the graph is the graph of an injective function.
A horizontal line cuts the graph of an Injective function at only one point.
If horizontal lines are drawn across every section on the graph of a function, and there's atleast one horizontal line which cuts through the graph at more than one point (simultaneously), the graph is not the graph of an injective function.
A horizontal line simultaneously crossing more than one point on a graph shows that the function is not injective.
Horizontal Line Test for Bijection:
If horizontal lines are drawn across every section on the graph of a function, and every horizontal line cuts through the graph only once (at only one point), and at the same time there is no horizontal line through which the graph does not pass through, the graph is the graph of a bijective function.
If horizontal lines are drawn across every section on the graph of a function, and every horizontal line cuts through the graph only once, but there is/are horizontal lines through which the graph does not pass through, the graph is not the graph of a bijective function, but the graph of an injective function.
If horizontal lines are drawn across every section on the graph of a function, and atleast one horizontal line cuts through the graph at more than one point, and at the same time there is no horizontal line that does not cut through the graph, the graph is not the graph of a bijective function, but the graph of a surjective function.
Summary
📌 An injective function is a function that maps each element of its domain to a unique element of its range, i.e no two distinct elements in the domain can map to the same element in the range.
📌 A surjective function maps to every element in its range, meaning there are no "missing" elements in the output.
📌 A bijective function is a one-to-one and onto function, where every element in the domain is paired with a unique element in the range, and every element in the range has a corresponding element in the domain.
📌 If a horizontal line intersects the graph of a function in more than one place, then the function is not one-to-one, and therefore not injective. On the other hand, if the line intersects the graph at most once, then the function is one-to-one, and therefore injective.
Practice Questions
Question 1
A functionA. Yes
B. No
Explanation
We check if
This makes us to see that
Question 2
A functionA. Yes
B. No
Explanation
To check for surjectivity we first get the range of the function;
[Read domain, codomain and range if you don't know how we got the range]
Since Range is equal to codomain, the function is surjectiveQuestion 3
A function that is surjective and injective is a(n)...A. Onto function
B. Bijective function
C. One to one function
D. None of the above options
Explanation
A bijective function is a function that is both injective and surjective.
Question 4
Assume the codomain is
A. Injective
B. Bijective
C. Surjective
D. Not a function
Explanation
Using the horizontal line test:
The graph is not injective because there are horizontal lines which cross more than one point on the graph.
The graph is not bijective because a bijective function must be both injective and surjective.
The graph is surjective because there is no horizontal line which does not cut through the graph
Question 5
Which of the following relations is a one-to-one function?A.
B.
C.
D.
Explanation
A one-to-one function maps one input to one unique output.
Question 6
Consider the functionIs the function onto?
A. The function is one-to-one and onto
B. The function is neither one-to-one nor onto
C. The function is one-to-one but it is not onto
D. The function is not one-to-one but it is onto
Explanation
We check for injectivity and surjectivity of
To check for injectivity, we equated
[Adding to both sides]
[Dividing both sides by ]
This confirms that our function is injective/one-to-one.
This confirms that our function is injective/one-to-one.
To check for surjectivity, we get the range for ;
Getting the inverse function:
[Adding to both sides]
[Dividing both sides by ]
Since range is equal to codomain, is surjective/onto.
Getting the inverse function:
Since range is equal to codomain,
Question 7
For all functionsA. Their domain is
B. Their codomain is
C. Their range is
D. None of the above options
Explanation
For every surjection, their range is equal to their codomain, and since the function is defined by
Question 8
A functionA. Yes
B. No
Explanation
For the function
Question 9
A functionA. Yes
B. No
Explanation
For a function to be surjective, its range must be equal to its codomain.
Question 10
A horizontal line must cut the graph of an injective function...A. Only once
B. Only twice
C. at no point
D. at the origin
Explanation
For a graph to pass the horizontal line test for injection, every horizontal line which cuts through the graph must cut at only one point and not more than one point.