// Numbas version: exam_results_page_options {"name": "Functions: bijective", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"variableReplacements": [], "gaps": [{"variableReplacements": [], "checkVariableNames": false, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "type": "jme", "showCorrectAnswer": true, "showFeedbackIcon": true, "showPreview": true, "unitTests": [], "vsetRangePoints": 5, "marks": 1, "failureRate": 1, "customMarkingAlgorithm": "", "expectedVariableNames": [], "scripts": {}, "answer": "1/b"}], "prompt": "

Prove that $f(x)$ surjective.

\n

Assume that $b \\in \\mathbb R$. We must find some $a$ such that $f(a) = b$. There are two cases to consider.

\n

If $b=0$ then choose $a = 0$.

\n

Otherwise, $b \\neq 0$ and then choose $a = $ [[0]].

\n

In either case, $f(a) = b$ and so the function is surjective.

", "extendBaseMarkingAlgorithm": true, "type": "gapfill", "sortAnswers": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "unitTests": [], "marks": 0, "customMarkingAlgorithm": "", "scripts": {}, "variableReplacementStrategy": "originalfirst"}, {"variableReplacements": [], "gaps": [{"variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "correctAnswerFraction": false, "mustBeReduced": false, "type": "numberentry", "maxValue": "0", "mustBeReducedPC": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "unitTests": [], "marks": 1, "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "0", "scripts": {}, "variableReplacementStrategy": "originalfirst"}], "prompt": "

Prove that $f(x)$ is injective.

\n

Assume that $f(x_0) = f(x_1)$. We must prove that $x_0 = x_1$. There are two cases to consider.

\n

If $f(x_0) = f(x_1) = 0$ then $x_0 = x_1 = $ [[0]].

\n

Otherwise, $f(x_0) = f(x_1) \\neq 0$ and then

\n

$x_0 = \\frac{1}{f(x_0)} = \\frac{1}{f(x_1)} = x_1$.

\n

In either case, $x_0 = x_1$ and so the function is injective.

", "extendBaseMarkingAlgorithm": true, "type": "gapfill", "sortAnswers": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "unitTests": [], "marks": 0, "customMarkingAlgorithm": "", "scripts": {}, "variableReplacementStrategy": "originalfirst"}, {"variableReplacements": [], "gaps": [{"variableReplacements": [], "checkVariableNames": false, "vsetRange": [0, 1], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "type": "jme", "showCorrectAnswer": true, "showFeedbackIcon": true, "showPreview": true, "unitTests": [], "vsetRangePoints": 5, "marks": 1, "failureRate": 1, "customMarkingAlgorithm": "", "expectedVariableNames": [], "scripts": {}, "answer": "x"}], "prompt": "

Because $f$ is surjective and injective, it is bijective and therefore has an inverse.

\n

In this case we can actually see that $f$ is its own inverse because $f(f(x)) = $ [[0]].

", "extendBaseMarkingAlgorithm": true, "type": "gapfill", "sortAnswers": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "unitTests": [], "marks": 0, "customMarkingAlgorithm": "", "scripts": {}, "variableReplacementStrategy": "originalfirst"}], "tags": [], "statement": "

A function which is both surjective and injective is said to be bijective.

\n

This is an important property because it guarantees that $f: A \\mapsto B$ has an inverse function $f^{-1} : B \\mapsto A$.

\n
\n

Let's prove that the function $f: \\mathbb R \\mapsto \\mathbb R$ defined by

\n

$ f(x) = \\left\\{ \\begin{array}{cl} \\frac{1}x & x \\neq 0 \\\\ 0 & x = 0.\\end{array}\\right.$

\n

has an inverse.

\n

", "advice": "

This question summarizes the definitions of surjective and injective, and applies them to prove the existance of an inverse.

\n
\n

For continuous functions it is possible to prove that it injective by using the derivative. But $f$ is not continuous, and nor is it strictly increasing or strictly decreasing. In fact it is strictly decreasing for $x<0$ and strictly increasing for $x>0$.

\n

{myscript()}

\n

So we pretty much have to prove that $f$ is injective directly from the definition.

\n
\n

Since $f$ is a bijection we know that an inverse exists, but this information does not tell us how to find it. This example is special because the inverse is easy to find.

", "preamble": {"css": "", "js": ""}, "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution-ShareAlike 4.0 International", "description": "

This question summarizes the definitions of surjective and injective, and applies them to prove the existance of an inverse.

"}, "functions": {"myscript": {"definition": "// First, make the JSXGraph board.\n// The function provided by the JSXGraph extension wraps the board up in\n// a div tag so that it's easier to embed in the page.\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n {boundingBox: [-4,4,4,-4],\n axis: true,\n showNavigation: false,\n grid: true\n });\n\n// div.board is the object created by JSXGraph, which you use to\n// manipulate elements\nvar board = div.board;\n\n// Then do whatever you want with the board....\nboard.create('functiongraph',[function(x){ return (0 == x ? 0 : 1/x);},0.01,4]);\nboard.create('functiongraph',[function(x){ return (0 == x ? 0 : 1/x);},-4,0.01]);\nvar p = board.createElement('point',[0,0], {visible: true, size:1, color:'blue',fixed:true});\np.setLabel(\"\");\n\n//var theLine = board.create('line',[[-4,0],[4,0]],{visible: false});\n//var x = board.create('glider',[theLine],{name:'x'});\n//var pointoncurve = board.create('point',[x.X(),(0 == x.X() ? 0 : 1/x.X())],{name:'f2',visible:true,size:3,color:'blue'});\n\n\n// and return the container div\nreturn div;", "type": "html", "language": "javascript", "parameters": []}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "variable_groups": [], "extensions": ["jsxgraph"], "ungrouped_variables": [], "variables": {}, "name": "Functions: bijective", "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/"}]}