|
|
Surjective functions

Consider all 50 states of the USA. Say for every state, there is at least one resident. We are then told to find a way to relate each of these residents to their respective states. 

Mockup Schule

Explore our app and discover over 50 million learning materials for free.

Surjective functions

Illustration

Lerne mit deinen Freunden und bleibe auf dem richtigen Kurs mit deinen persönlichen Lernstatistiken

Jetzt kostenlos anmelden

Nie wieder prokastinieren mit unseren Lernerinnerungen.

Jetzt kostenlos anmelden
Illustration

Consider all 50 states of the USA. Say for every state, there is at least one resident. We are then told to find a way to relate each of these residents to their respective states.

How do you think we could go about this? The answer lies in surjective functions!

Throughout this article, we shall be introduced to the concept of surjective functions (or surjective mappings) by identifying their properties and composition.

Surjective functions definition

Before we get into the subject of surjective functions, we shall first recall the definitions of a function, domain, codomain, and range.

A function is a relation in which each element of one set correlates to an element of another set. In other words, a function relates an input value to an output value. A function is often denoted by \(f\).

The domain of a function is the set of all input values for which the function is defined. In other words, these are the elements that can go into a function. An element within the domain is usually denoted by \(x\).

The codomain of a function is the set of possible output values the function may take.

The range of a function is the set of all images the function produces. An element within the range is usually denoted by y or \(f(x)\).

With that in mind, let us now move on to our main topic at hand.

A surjective function is a special type of function that maps every element in the codomain onto at least one element in the domain. This essentially means that every element in the codomain of a function is also part of the range, that is no element in the codomain is left out. That is to say, the codomain and range of a surjective function are equal.

We can thus define a surjective function as below.

A function is said to be surjective if every element b in the codomain B, there is at least one element a in the domain \(A\), for which \(f(a) = b\). Expressing this in set notation, we have

\[\forall b\in B, \exists a \in A \quad \text{such that}\quad f(a)=b\]

  • Surjective functions are also called onto functions.

Now that we have established the definition of a surjective function, let us refer back to our initial example involving residents of each state in the USA.

The domain of the function is the set of all residents. The codomain of the function is the set of all states within the country. Since all 50 states will have at least one resident in each state, this infers that the codomain also considers the range, and thus the mapping is a surjective function.

Let us now look at the following example of a surjective function.

Say we have the function below,

\[f:\mathbb{R}\mapsto \mathbb{R}\]

\[f(x)=3x\]

The domain of this function is the set of all real numbers.

The codomain of this function is the set of all real numbers.

Is this a surjective function?

Solution

In order to test if this function is surjective, we need to check whether the range and the codomain of the function \(f\) are the same.

Here the codomain is the set of real numbers as stated in the question.

Now, in order to determine the range, we should think of all the possible outcomes of the function into consideration. Taking into account that the inputs are the set of all real numbers, multiplying each of them by 3 to produce the set of outcomes, which is nothing but the range, will lead us also to the set of the real numbers.

Thus, the range and the codomain of the function are the same and hence the function is surjective.

Mapping Diagram of a Surjective Function

Let us now visualize surjective functions in a more comprehensive way through a mapping diagram.

Suppose we have two sets, \(A\) and \(B\), where \(A\) is the domain and \(B\) is the codomain. Say we have a function defined by \(f\). This is represented by an arrow. If the function is surjective, then every element in \(B\) must be pointed to by at least one element in \(A\).

Mapping Diagram of a Surjective Function, StudySmarter OriginalsFig. 1. Mapping Diagram of a Surjective Function.

Notice how all the elements in \(B\) correspond to one of the elements in \(A\) in the diagram above.

Let us now look at some more examples showing whether or not a given mapping diagram describes a surjective function. This is shown in the table below.

Mapping Diagram

Is it a Surjective Function?

Explanation

Example 1, StudySmarter Originals

Example 1, StudySmarter Originals

Yes

This is indeed a surjective function as all the elements in the Codomain are assigned to one element in the Domain.

Example 2, StudySmarter Originals

Example 2, StudySmarter Originals

Yes

This is indeed a surjective function as all the elements in the Codomain are assigned to at least one element in the Domain.

Example 3, StudySmarter Originals

Example 3, StudySmarter Originals

No

This is not a surjective function as there is one element in the Codomain that is not mapped to any elements in the Domain.

Example 4, StudySmarter Originals

Example 4, StudySmarter Originals

No

This is not a surjective function as there is one element in the Codomain that is not mapped to any elements in the Domain.

Properties of Surjective Functions

There are three important properties of surjective functions that we should remember. Given a surjective function, f, the characteristics are listed below.

  1. Every element in the codomain is mapped to at least one element in the domain,

  2. An element in the codomain can be mapped to more than one element in the domain,

  3. The codomain is equal to the range.

Composition of Surjective Functions

In this section, we shall look at the composition of a pair of surjective functions. We shall first define the composition of two functions, \(f\) and \(g\) as below.

Let \(f\) and \(g\) be functions defined by

\[f:A\mapsto B\]

\[g:B\mapsto C\]

then the composition of \(f\) and \(g\) is defined by

\[(g\circ f)(x)=g(f(x))\]

  • The composition of a pair of surjective functions will always result in a surjective function.
  • Conversely, if \(f\circ g\) is surjective, then \(f\) is surjective. In this case, the function \(g\) needs not necessarily be surjective.

Proof of the Composition of Surjective Functions

Suppose \(f\) and \(g\) are two surjective functions defined by

\[f:A\mapsto B\]

\[g:B\mapsto C\]

Assume that we have an element called \(z\) in set \(C\). Since \(g\) is surjective, there exists some element called \(y\) in set \(B\) such that \(g(y) = z\). Furthermore, since \(f\) is surjective, there exists some element called \(x\) in set \(A\) such that \(f(x) = y\). Therefore,

\[z=g(y)=g(f(x))=(g\circ f)(x)\]

This means that \(z\) falls inside the range of \(g\circ f\). We can thus conclude that \(g\circ f\) is also surjective.

We shall show this with an example.

Suppose we are given two surjective functions \(f\) and \(g\) where

\[f:\mathbb{R}\mapsto \mathbb{R} \quad\text{and}\quad g:\mathbb{R}\mapsto \mathbb{R}\]

The function \(f\) is defined by

\[f(x)=3x\]

The function \(g\) is defined by

\[g(x)=2x\]

Does the composition \(g\circ f\) yield a surjective function?

Solution

Since \(f:\mathbb{R}\mapsto\mathbb{R}\) and \(g:\mathbb{R}\mapsto\mathbb{R}\), then \(g\circ f:\mathbb{R}\mapsto\mathbb{R}\).

Let us consider an arbitrary element, \(z\) in the codomain of \(g\circ f\), our aim is to prove that for every \(z\) in the codomain of \(g\circ f\) there exists one element \(x\) in the domain of \(g\circ f\) such that \(z=g\circ f(x)=g(3x)=2(3x)=6x\).

Since \(g\) is surjective, there exists some arbitrary element \(y\) in \(\mathbb{R}\) such that \(g(y)=z\) but \(g(y)=2y\), thus \(z=g(y)=2y\).

Similarly, since \(f\) is surjective, there exists some arbitrary element \(x\) in \(\mathbb{R}\) such that

\[f(x)=y\]

but \(f(x)=3x\), thus \(y=f(x)=3x\).

Therefore, we have \(z=g(y)=2y=2(3x)=6x\).

We deduce thus that \(g\circ f\) is surjective.

Identifying Surjective Functions

In order to identify surjective functions, we shall work backward to obtain our goal. The phrase "working backward" simply means to find the inverse of the function and use it to show that \(f(x) = y\). We shall look at a worked example to clearly show this.

Given the function \(f\) where \(f:\mathbb{Z}\mapsto \mathbb{Z}\) defined over the set of integers, \(\mathbb{Z}\), where

\[f(x)=x+4\]

show whether this function is surjective or not.

Solution

We shall first claim that this function is surjective. We now need to show that for every integer \(y\), there exists an integer \(x\) such that \(f(x) = y\).

Taking our equation as

\[f(x)=y \Rightarrow y=x+4\]

We shall now work backward toward our goal by solving for \(x\). Assume that for any element \(y\in\mathbb{Z}\) there exists an element \(x\in\mathbb{Z}\) such that

\[x=y-4\]

This is done by rearranging the previous equation so that \(x\) becomes the subject. Then, by this choice of \(x\) and by the definition of \(f(x)\), we obtain

\[\begin{align}f(x)&=f(y-4)\\ \Rightarrow f(x)&=(y-4)+4\\ \Rightarrow f(x)&=y\end{align}\]

Hence, \(y\) is an output of \(f\) which indicates that \(f\) is indeed surjective.

Graphs of Surjective Functions

Another way to determine whether a given function is surjective is by looking at its graph. To do so, we simply compare the range with the codomain of the graph.

If the range is equal to the codomain, then the function is surjective. Otherwise, it is not a surjective function. Let us show this with two examples.

Say we are given the exponential function, \(f:\mathbb{R}\mapsto\mathbb{R}\) defined by

\[f(x)=e^x\]

Note that \(\mathbb{R}\) represents the set of real numbers. The graph of this function is shown below.

Exponential graph, StudySmarter Originals

Fig. 2. Exponential graph.

By observing this graph, determine whether the function surjective or not.

Solution

Here, the codomain is the set of real numbers as given in the question.

Referring to the graph, the range of this function is only defined over the set of positive real numbers including zero. In other words, the range of \(f\) is \(y\in [0,\infty)\). Since the codomain of \(f\) is not equal to the range of \(f\), we can conclude that \(f\) is not surjective.

Say we are given the standard cubic function, \(g:\mathbb{R}\mapsto\mathbb{R}\) defined by

\[g(x)=x^3\]

The graph of this function is shown below.

Standard cubic graph, StudySmarter OriginalsFig. 3. Standard cubic graph.

By observing this graph, determine whether the function surjective or not.

Solution

In this case, the codomain is the set of real numbers as given in the question.

Looking at the graph, notice that the range of this function is also defined over the set of real numbers. This means that the range of \(g\) is \(y\in\mathbb{R}\). As the codomain of \(g\) is equal to the range of \(g\), we can infer that \(g\) is surjective.

Horizontal Line Test

Speaking of graphs, we may also test that a function is surjective by applying the horizontal line test. The horizontal line test is a convenient method used to determine the type of a function, that is verifying whether it is injective, surjective, or bijective. It is also used to check whether a function has an inverse or not.

The horizontal line test is done by constructing a straight flat line segment on a given graph. We shall then observe the number of intersecting points in order to deduce the property of the function. Note that this line is drawn from end to end of a given graph. Furthermore, it is taken as arbitrary, meaning that we can test for any horizontal line \(y = c\), where \(c\) is a constant.

For a surjective function, any horizontal line will intersect the graph at least once, that is at one point or at more than one point. If there is an element in the range of a given function such that the horizontal line through this element does not intersect the graph, then the function fails the horizontal line test and is not surjective. Here are two examples that show this approach explicitly.

Using the horizontal line test, determine whether the graph below is surjective or not. The domain and range of this graph is the set of real numbers.

Example A, StudySmarter OriginalsFig. 4. Example A.

Solution

Let us construct three horizontal lines on the graph above, namely \(y=-1\), \(y=0.5\) and \(y=1.5\). This is shown below.

Solution to Example A, StudySmarter Originals

Fig. 5. Solution to Example A.

Now looking at the intersecting points on this graph, we observe at \(y=1.5\), the horizontal line intersects the graph once. At \(y=-1\) and \(y=0.5\), the horizontal line intersects the graph three times. In all three instances, the horizontal line intersects the graph at least once. Thus, the graph satisfies the condition for a function to be surjective.

As before, apply the horizontal line test to decide if the following graph is surjective or not. The domain and range of this graph is the set of real numbers.

Example B, StudySmarter Originals

Fig. 6. Example B.

Solution

As before, we shall construct three horizontal lines on the graph above, namely \(y=-5\), \(y=-2\) and \(y=1\). This is shown below.

Solution to Example B, StudySmarter Originals

Fig. 7. Solution to Example B.

Notice how at \(y=-5\) and \(y=1\) the horizontal line intersects the graph at one point. However, at \(y=-2\), the horizontal line test does not intersect the graph at all. Thus, the horizontal line test fails and is not surjective.

Graphs that have a discontinuity or a jump are not surjective either. You will find that although a horizontal line may intersect the graph at one or more points in certain areas of the graph, there will be a region within the discontinuity where a horizontal line will not cross the graph at all, just like the example above. Try it yourself!

Horizontal Line Test for Injective and Bijective Functions

For an injective function, any horizontal line will intersect the graph at most once, that is at one point or none at all. Here, we say that the function passes the horizontal line test. If a horizontal line intersects the graph at more than one point, then the function fails the horizontal line test and is not injective.

For a bijective function, any horizontal line passing through any element in the range should intersect the graph exactly once.

Difference between Surjective and Bijective Functions

In this segment, we shall compare the characteristics of a surjective function and a bijective function.

For this comparison, we shall assume that we have some function, \(f:A\mapsto B\) such that set \(A\) is the domain and set \(B\) is the codomain of \(f\). The difference between surjective and Bijective Functions is shown in the table below.

Surjective Functions

Bijective Functions

Every element in \(B\) has at least one corresponding element in \(A\).

Every element in \(B\) has exactly one corresponding element in \(A\).

Surjective functions are also called onto functions.

Bijective functions are both one-to-one and onto, i.e. they are both injective and surjective.

Injective functions (one-to-one functions) are functions such that every element in \(B\) corresponds to at most one element in \(A\), i.e. a function that maps distinct elements to distinct elements.

The function f is surjective if and only if for every y in \(B\), there is at least one \(x\) in \(A\) such that \(f(x) = y\). Essentially, \(f\) is surjective if and only if \(f(A) = B\).

The function f is bijective if for every \(y\) in \(B\), there is exactly one \(x\) in \(A\) such that \(f(x) = y\).

Does not have an inverse.

Has an inverse.

Examples of Surjective Functions

We shall end this discussion with several examples involving surjective functions.

Consider the standard square function, \(f:\mathbb{R}\mapsto\mathbb{R}\) defined by

\[f(x)=x^2\]

Check whether the function is surjective or not.

Solution

Let us sketch this graph.

Standard square graph, StudySmarter Originals

Fig. 8. Standard square graph.

Here, the codomain is the set of real numbers as given in the question.

Referring to the sketch above, the range of this function is only defined over the set of positive real numbers including zero. Thus, the range of \(f\) is \(y\in [0,\infty)\). However, the codomain includes all negative real numbers as well. Since the codomain of \(f\) is not equal to the range of \(f\), we can conclude that \(f\) is not surjective.

Suppose we have two sets, \(P\) and \(Q\) defined by \(P =\{3, 7, 11\}\) and \(Q = \{2, 9\}\). Suppose we have a function \(g\) such that

\[g = \{(3, 2), (7, 2), (11, 9)\}\]

Verify that this function is surjective from \(P\) to \(Q\).

Solution

The domain of set \(P\) is equal to \(\{3, 7, 11\}\). From our given function, we see that each element of set \(P\) is assigned to an element such that both \(3\) and \(7\) share the same image of \(2\) and \(11\) has an image of \(9\). This means that the range of the function is \(\{2, 9\}\).

Since the codomain \(Q\) is equal to \(\{2, 9\}\) as well, we find that the range of the function is also equal to set \(Q\). Thus, \(g:P\mapsto Q\) is a surjective function.

Given the function \(h:\mathbb{R}\mapsto\mathbb{R}\) defined by,

\[h(x)=2x-7\]

Check whether this function is surjective or not.

Solution

We shall first assume that this function is surjective. Our goal is to show that for every integer \(y\), there exists an integer \(x\) such that \(h(x) = y\).

Taking our equation as

\[h(x)=y\]

\[\Rightarrow 2x-7\]

We shall now work backward toward our goal by solving for \(x\). Suppose that for any element \(y\in \mathbb{R}\) there exists an element \(x\in\mathbb{R}\) such that

\[x=\dfrac{y+7}{2}\]

This is done by rearranging the previous equation so that \(x\) becomes the subject as below.

\[\begin{align}y&=2x-7\\ \Rightarrow 2x&=y+7\\ \Rightarrow x&=\dfrac{y+7}{2}\end{align}\]

Then, by this choice of \(x\) and by the definition of \(h(x)\), we obtain

\[\begin{align} h(x)&=h\left(\dfrac{y+7}{2}\right)\\ \Rightarrow h(x)&=\cancel{2}\left(\dfrac{y+7}{\cancel{2}}\right)-7\\ \Rightarrow h(x)&=y+7-7\\ \Rightarrow h(x)&=y \end{align}\]

Hence, \(y\) is an output of \(h\) which indicates that \(h\) is indeed surjective.

Surjective functions - Key takeaways

  • A surjective function is a special type of function that maps every element in the codomain onto at least one element in the domain.

  • A surjective function is also called an onto function.

  • Every element in the codomain is mapped to at least one element in the domain.

  • An element in the codomain can be mapped to more than one element in the domain.

  • The codomain of a surjective function is equal to its range.

Frequently Asked Questions about Surjective functions

A function f : A --> B is surjective if and only if for every element, y in B, there is at least one element, x in A such that f(x) = y,

To prove that a function is surjective, you must show that all elements of the co-domain are part of the range.

If we consider the domain and co-domain consisting of all real numbers, then a cubic function is injective, surjective and bijective.

We can tell that a function is surjective by its graph using the horizontal line test. Every horizontal line should intersect the graph of a surjective function at least once. 

Join over 22 million students in learning with our StudySmarter App

The first learning app that truly has everything you need to ace your exams in one place

  • Flashcards & Quizzes
  • AI Study Assistant
  • Study Planner
  • Mock-Exams
  • Smart Note-Taking
Join over 22 million students in learning with our StudySmarter App Join over 22 million students in learning with our StudySmarter App

Sign up to highlight and take notes. It’s 100% free.

Entdecke Lernmaterial in der StudySmarter-App

Google Popup

Join over 22 million students in learning with our StudySmarter App

Join over 22 million students in learning with our StudySmarter App

The first learning app that truly has everything you need to ace your exams in one place

  • Flashcards & Quizzes
  • AI Study Assistant
  • Study Planner
  • Mock-Exams
  • Smart Note-Taking
Join over 22 million students in learning with our StudySmarter App