This question introduces the surjective property of a function. You will need to be able to confidently identify the domain, codomain and range of a function before you can understand the surjective property.

\nThere are two proof styles.

\n- \n
- To prove that a function $f$ is surjective, start with a generic element $b$ from the codomain and, by solving $f(a) = b$ for $a$, show that $a$ is in the domain. \n
- Always prove that a function $f$ is not surjective by contradiction. Start with a specific element $b \\in B$ and, by solving $f(a) = b$ for $a$, show that $a$ is not in the domain. This contradiction proves it is not possible for the function to be surjective. \n

\n

The codomain of $f_1$ is $\\mathbb Z$. Suppose that $f_1$ is surjective, which means that the whole codomain gets mapped to, and in particular that there is some integer $a$ such that $f(a) = 1 \\in \\mathbb Z$. Then

\n$f_1(a) = 2a = 1$

\nand so $a = \\frac{1}{2}$. But $\\frac{1}{2} \\not\\in \\operatorname{Domain}(f_1) = \\mathbb Z$, so our assumption that $f_1$ is surjective must be false.

\n\n

The codomain of $f_2$ is $\\mathbb Z$. For any $b \\in \\mathbb Z$ suppose that $f(a) = b$. Then

\n$f_2(a) = \\lceil a \\rceil = b$.

\nThere are many values of $a$ which map to $b$, and one such value is just $a=b \\in \\operatorname{Domain}(f_2) = \\mathbb R$. So $f_2$ is surjective.

\n\n

The codomain of $f_3$ is the positive rationals $\\mathbb Q^+$. For any $\\frac{p}{q} \\in \\mathbb Q^+$ suppose that $f(a) = \\frac{p}{q}$. Then

\n$f_3(a) = \\frac{1}{a} = \\frac{p}{q}$

\nand so $a = \\frac{q}{p} \\in \\operatorname{Domain}(f_3) = \\mathbb Q^+$. So $f_3$ is surjective.

", "name": "Functions: surjective", "ungrouped_variables": [], "variables": {}, "tags": [], "statement": "Consider the example

\n$f: \\mathbb Z \\mapsto \\mathbb R, \\quad f(x) = \\left|x\\right|$.

\n- \n
- The set of possible inputs $\\mathbb Z$ is called the
**domain**. \n - The set of possible outputs $\\mathbb R$ is called the
**codomain**. \n

A function must be defined for every element of its domain, but the codomain may contain additional elements that are unused.

", "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "An introduction to terminology about the surjective property of a function.

"}, "parts": [{"showFeedbackIcon": true, "maxMarks": 0, "scripts": {}, "variableReplacementStrategy": "originalfirst", "shuffleChoices": true, "choices": ["$\\mathbb N$

", "$\\mathbb Z^+$

", "$\\mathbb Z$

", "$\\mathbb R$

"], "variableReplacements": [], "marks": 0, "showCorrectAnswer": true, "displayType": "radiogroup", "minMarks": 0, "matrix": ["1", 0, 0, 0], "distractors": ["", "$f(0) = 0 \\not\\in \\mathbb Z^+$, and the range must include all the elements that are mapped to.", "There is no integer $a$ such that $f(a) = a^2 = -1 \\in \\mathbb Z$.", "There is no integer $a$ such that $f(a) = a^2 = \\sqrt{2} \\in \\mathbb R$."], "displayColumns": 0, "type": "1_n_2", "prompt": "The set of *actual* outputs is called the **range** and may be different to the codomain. In other words, the range is the set of all elements that are actually mapped to, or in the language of sets

$\\operatorname{Range}(f) = \\left\\{ b | \\, f(a) = b, a \\in \\mathbb Z\\right\\}$.

\nWhat is the range of $f$?

"}, {"showFeedbackIcon": true, "maxMarks": 0, "scripts": {}, "variableReplacementStrategy": "originalfirst", "shuffleChoices": true, "choices": ["$\\mathbb Z$

", "$\\mathbb N$

", "$\\mathbb R$

"], "variableReplacements": [], "marks": 0, "showCorrectAnswer": true, "displayType": "radiogroup", "minMarks": 0, "matrix": [0, 0, "1"], "distractors": ["The question asked for codomain, but you selected the domain.", "The question asked for codomain, but you selected the range.", ""], "displayColumns": 0, "type": "1_n_2", "prompt": "If the codomain and range are equal the function is said to be **surjective** or **onto**. The function $f$ is not surjective because the codomain is different to the range. The codomain is

$f_1 : \\mathbb Z \\mapsto \\mathbb Z, \\quad f_1(x) = 2x$

", "$f_2 : \\mathbb R \\mapsto \\mathbb Z, \\quad f_2(x) = \\lceil x\\rceil$

", "$f_3 : \\mathbb Q^+ \\mapsto \\mathbb Q^+, \\quad f_3(x) = \\frac{1}{x}$

"], "variableReplacements": [], "marks": 0, "showCorrectAnswer": true, "distractors": ["The range of $f_1$ is the even integers, which is not the same as the codomain.", "", ""], "displayType": "checkbox", "minMarks": 0, "matrix": ["-1", "1", "1"], "minAnswers": 0, "displayColumns": 0, "type": "m_n_2", "prompt": "Select all functions that are surjective. For this question the set of positive rational numbers is denoted by $\\mathbb Q^+$.

", "warningType": "none"}], "extensions": [], "preamble": {"js": "", "css": ""}, "rulesets": {}, "type": "question", "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}]}]}], "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}]}