// Numbas version: finer_feedback_settings {"name": "Inverse of a 2x2 matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Inverse of a 2x2 matrix", "tags": [], "metadata": {"description": "

Find the determinant and inverse of three $2 \\times 2$ invertible matrices.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

$2 \\times 2$ Matrix Inverse

\n

Find the inverse of the following matrix:

", "advice": "

To find the inverse of a matrix we first need to find the determinant:

\n

$$
\\det \\boldsymbol{A} = \\var{a[0][0]} \\times \\var{a[1][1]} - \\var{a[0][1]} \\times \\var{a[1][0]} = \\var{det(a)}
$$

\n

Since $\\det \\boldsymbol{A}\\neq 0$, we know that $\\boldsymbol{A}$ is invertible with:

\n

$$
\\begin{aligned}
\\boldsymbol{A}^{-1} &= \\frac{1}{\\det \\boldsymbol{A}} \\begin{pmatrix} d & -b\\\\ -c& a \\end{pmatrix} \\\\
&= \\frac{1}{\\var{det(a)}} \\begin{pmatrix} \\var{a[1][1]} & \\var{-a[0][1]}\\\\ \\var{-a[1][0]}& \\var{a[0][0]} \\end{pmatrix} \\\\
\\end{aligned}
$$

\n

Which gives us our inverse:

\n

$$
\\simplify[fractionnumbers]{matrix:A^(-1)={inverse(a)}}
$$

\n

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a21": {"name": "a21", "group": "Matrix A", "definition": "random(-5..5) ", "description": "", "templateType": "anything", "can_override": false}, "a22": {"name": "a22", "group": "Matrix A", "definition": "random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "a11": {"name": "a11", "group": "Matrix A", "definition": "random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "a12": {"name": "a12", "group": "Matrix A", "definition": "random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Matrix A", "definition": "matrix([\n [a11,a12],\n [a21,a22]\n])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "det(a)<>0", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Matrix A", "variables": ["a11", "a12", "a21", "a22", "a"]}], "functions": {"inverse": {"parameters": [["m", "matrix"]], "type": "matrix", "language": "jme", "definition": "matrix([\n [m[1][1],-m[0][1]],\n [-m[1][0],m[0][0]]\n])/det(m)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Let:

\n

$$
\\boldsymbol{A} = \\var{a}
$$

\n

Calculate $\\boldsymbol{A}^{-1}$

\n

Input all the elements of the matrix as fractions or integers and not as decimals.

\n

$\\boldsymbol{A}^{-1} = $ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "inverse(a)", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": "0.01", "markPerCell": false, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}]}