Welcome to a lesson on Surjections,
Injections, and Bijections.
A function is surjective, meaning a surjunction or onto,
if every element of the codomain is an image
of at least one element from the domain.
Or we can say, in order for a function to be surjective,
every element of the codomain must have at least one input.
Looking at the mappings of the functions below,
the function on the left is surjective;
the function on the right is not surjective.
The function on the left is surjective
because the three elements in the codomain
are images of at least one element from the domain.
Notice the first two elements in the codomain
are images of exactly one element from the domain,
and the third element in the codomain
is an image of two elements from the domain.
This does satisfy the requirement
that every element of the codomain
is an image of at least one element from the domain.
At least one means one or more.
The function on the right is not surjective
because of this element in the middle in the codomain.
It is not an image,
or it's an image of zero elements from the domain.
And now, let's look at three examples of functions
and determine if the functions are surjective or not.
First we have the function f, which maps the set of integers
to the set of integers, defined by f of n equals 2n.
This function is not surjective.
For example, 1 is an element in the set of integers,
which is the codomain, and f of n equals 2n can't equal 1
for any n in the set of integers, which is the domain,
which means all the odd integers in the codomain
are images of zero elements from the domain.
Also, the codomain is the set of integers,
while the range is the set of even integers.
So the function is not surjective and not onto.
Next We have the function f, which maps the set
containing 1, 2, 3, and 4 to the set
containing a, b, c, and d,
defined by f given in two-line notation.
Analyzing the second row of the two-line notation,
f is surjective.
Every element of the codomain, which is the set
containing a, b, c, and d, is an output
of at least one element from the domain.
Or again, we can say every element in the codomain
is an image of at least one element from the domain.
In this case, each element in the codomain
is the image of exactly one element from the domain.
So again, f is surjective as well as onto.
And then we have c, which is the function g,
which maps the set containing 1, 2, 3, and 4
to the set containing a, b, c, and d,
defined by again the two-line notation.
Again, analyzing the second row of the two-line notation,
g is not surjective.
Notice the element of c is in the codomain,
but it is not the output
of at least one element from the domain,
which indicates every element of the codomain
is not an image of at least one element
from the domain because of the element c in the codomain.
G is not surjective and not onto.
And now let's define an injection.
A function is injective or an injection or one-to-one
if every element of the codomain
is the image of at most one element from the domain.
Let's notice the change in language here.
Here, every element of the codomain is the image
of at most one element from the domain.
Or we can say, for a function to be injective,
every element in the codomain must have at most one input.
So again, looking at the two mappings below,
the mapping on the left shows a function that is injective.
The five elements in the codomain
are images of at most one element from the domain.
Four of them are images
of exactly one element for the domain,
and the element in the middle here
is an image of zero elements from the domain,
and therefore the definition
for an injective function is satisfied.
The mapping on the right shows a function
that is not injective
because of this fourth element in the codomain.
Notice this element in the codomain
is an image of two elements from the domain,
which violates the definition for an injective function.
Let's go through the same three functions
and determine whether the functions are injective or not.
So again, going back to the first function given by a,
we have the function given by f of n equals 2n,
where both the domain and the codomain
are the set of integers.
F is injective.
Every element of the codomain is assigned
to at most one element in the set of integers.
Or more specifically,
all of the even integers of the codomain
are images of exactly one element from the domain,
and all of the odd integers from the codomain
are images of zero elements from the domain,
and therefore f is injective as well as one-to-one.
Going back to part b,
we have the function f given in two-line notation.
This function is injective.
Every output of the codomain,
which is the set a, b, c, and d, is only an output once,
where once again every element in the codomain
is an image of exactly one element from the domain,
which does satisfy the definition for an injective function.
Again, if every element of the codomain
is an image of at most one, meaning zero or one elements
from the domain, the function is injective.
And then for part c, we have the function g,
defined by the two-line notation.
G is not injective.
Notice a is an element in the codomain,
but it is the output of the inputs 2 and 3 from the domain,
which violates the rule of every element in the codomain
being an image of at most one element from the domain.
G is not surjective and not one-to-one.
We do need to be careful about surjective and injective.
They are not opposites.
Functions can be surjective but not injective,
injective but not surjective, both, or neither.
In the case when a function is both injective
and surjective, meaning both one-to-one and onto,
we say the function is a bijection,
or that the function is a bijective function.
In other words, if every element of the codomain
is an image of exactly one element of the domain,
a function is a bijection.
Notice the function f, given in part b,
is a bijection because it's surjective and injective,
meaning every element of the codomain
is the image of exactly one element of the domain.
And now, let's compare the two definitions side by side.
A function is injective provided every element
of the codomain is the image of at most one element
from the domain, and a function is surjective
provided every element of the codomain
is the image of at least one element from the domain.
So notice both properties are determined
by what happens to elements of the codomain.
They could be repeated as images,
or they could be missed, meaning not be images.
Injective functions do not have repeats
but might or might not have missed elements
from the codomain, which we see pictured here
in the mapping of an injective function.
And surjective functions do not miss elements
from the codomain, but might or might not have repeats,
which we see pictured here
in the mapping of the surjective function.
And bijective functions are those
that do not have repeats or missed elements
from the codomain.
I hope you found this helpful.