// Numbas version: exam_results_page_options {"name": "Lois's copy of Functions: bijective", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "tags": [], "advice": "

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

\n
\n

It is possible to prove that a continuous function is injective by using the derivative to show that it is either strictly increasing or strictly decreasing. 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 have to prove that $f$ is injective directly from the definition.

\n
\n

By showing that $f$ is a bijection we prove that an inverse exists, but we have not constructed the inverse function. This is an interesting case because we are able to explicitly construct the inverse, which also proves that the inverse exists.

", "metadata": {"description": "

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

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "extensions": ["jsxgraph"], "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": [], "parts": [{"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.

", "type": "gapfill", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"type": "jme", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "checkingtype": "absdiff", "showFeedbackIcon": true, "checkvariablenames": false, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "expectedvariablenames": [], "marks": 1, "answer": "1/b", "checkingaccuracy": 0.001, "showpreview": true}]}, {"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.

", "type": "gapfill", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"mustBeReducedPC": 0, "correctAnswerStyle": "plain", "type": "numberentry", "mustBeReduced": false, "allowFractions": false, "maxValue": "0", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "minValue": "0", "marks": 1, "correctAnswerFraction": false}]}, {"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]].

", "type": "gapfill", "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"type": "jme", "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "checkingtype": "absdiff", "showFeedbackIcon": true, "checkvariablenames": false, "showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "expectedvariablenames": [], "marks": 1, "answer": "x", "checkingaccuracy": 0.001, "showpreview": true}]}], "preamble": {"css": "", "js": ""}, "functions": {"myscript": {"type": "html", "parameters": [], "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;", "language": "javascript"}}, "name": "Lois's copy of Functions: bijective", "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

", "rulesets": {}, "variables": {}, "type": "question", "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}