// Numbas version: exam_results_page_options {"name": "Functions: surjective", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "variable_groups": [], "advice": "

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.

\n

There are two proof styles.

\n\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$

\n

and 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$.

\n

There 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}$

\n

and 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

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

\n

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

\n

What 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

"}, {"showFeedbackIcon": true, "maxMarks": 0, "maxAnswers": 0, "scripts": {}, "variableReplacementStrategy": "originalfirst", "shuffleChoices": false, "choices": ["

$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/"}]}