// Numbas version: finer_feedback_settings {"name": "MATH6058 Determinant and Inverse of 2x2 matrices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "name": "MATH6058 Determinant and Inverse of 2x2 matrices", "functions": {"inverse": {"parameters": [["m", "matrix"]], "definition": "matrix([\n [m[1][1],-m[0][1]],\n [-m[1][0],m[0][0]]\n])/det(m)", "language": "jme", "type": "matrix"}}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "metadata": {"description": "
Find the determinant and inverse of three $2 \\times 2$ invertible matrices.
", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "prompt": "Let
\n\\[\\mathrm{A} = \\var{a},\\;\\; \\mathrm{B} = \\var{b},\\;\\; \\mathrm{C} = \\var{c}\\]
\nCalculate the determinants of these matrices:
\n$\\det\\left(\\mathrm{A}\\right) = $ [[0]]
\n$\\det\\left(\\mathrm{B}\\right) = $ [[1]]
\n$\\det\\left(\\mathrm{C}\\right) = $ [[2]]
\n$\\det\\left(\\mathrm{ABC}\\right) = $ [[3]]
", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 0, "type": "gapfill", "variableReplacements": [], "gaps": [{"variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "minValue": "det(a)", "allowFractions": false, "variableReplacements": [], "maxValue": "det(a)", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": 0.5, "type": "numberentry", "mustBeReduced": false}, {"variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "minValue": "det(b)", "allowFractions": false, "variableReplacements": [], "maxValue": "det(b)", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": 0.5, "type": "numberentry", "mustBeReduced": false}, {"variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "minValue": "det(c)", "allowFractions": false, "variableReplacements": [], "maxValue": "det(c)", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": 0.5, "type": "numberentry", "mustBeReduced": false}, {"variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "minValue": "det(a*b*c)", "allowFractions": false, "variableReplacements": [], "maxValue": "det(a*b*c)", "correctAnswerStyle": "plain", "correctAnswerFraction": false, "scripts": {}, "mustBeReducedPC": 0, "showFeedbackIcon": true, "marks": 0.5, "type": "numberentry", "mustBeReduced": false}]}, {"variableReplacementStrategy": "originalfirst", "scripts": {}, "prompt": "Find the inverses of the matrices given above. Input all matrix entries as fractions or integers and not as decimals.
\n$\\mathrm{A}^{-1} = $ [[0]]
", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 0, "type": "gapfill", "variableReplacements": [], "gaps": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "numColumns": "2", "allowFractions": true, "markPerCell": false, "tolerance": "0.01", "allowResize": false, "correctAnswer": "inverse(a)", "correctAnswerFractions": true, "variableReplacements": [], "showFeedbackIcon": true, "numRows": "2", "scripts": {}, "type": "matrix", "marks": 1}]}, {"variableReplacementStrategy": "originalfirst", "scripts": {}, "prompt": "$\\mathrm{B}^{-1} = $ [[0]]
", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 0, "type": "gapfill", "variableReplacements": [], "gaps": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "numColumns": "2", "allowFractions": true, "markPerCell": false, "tolerance": "0.01", "allowResize": false, "correctAnswer": "inverse(b)", "correctAnswerFractions": true, "variableReplacements": [], "showFeedbackIcon": true, "numRows": "2", "scripts": {}, "type": "matrix", "marks": 1}]}, {"variableReplacementStrategy": "originalfirst", "scripts": {}, "prompt": "$\\mathrm{C}^{-1} = $ [[0]]
", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 0, "type": "gapfill", "variableReplacements": [], "gaps": [{"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "numColumns": "2", "allowFractions": true, "markPerCell": false, "tolerance": "0.01", "allowResize": false, "correctAnswer": "inverse(c)", "correctAnswerFractions": true, "variableReplacements": [], "showFeedbackIcon": true, "numRows": "2", "scripts": {}, "type": "matrix", "marks": 1}]}], "extensions": [], "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "statement": "Do the following matrix problems.
", "variables": {"b21": {"definition": "random(-6..6 except 0)", "name": "b21", "group": "Matrix B", "description": "", "templateType": "anything"}, "c22": {"definition": "random(1..9 except c21*c12/c11)", "name": "c22", "group": "Matrix C", "description": "", "templateType": "anything"}, "c12": {"definition": "a12+b12", "name": "c12", "group": "Matrix C", "description": "", "templateType": "anything"}, "b11": {"definition": "random(1..9 except a11)\n//if(a11=tr2,tr2+1,tr2)", "name": "b11", "group": "Matrix B", "description": "", "templateType": "anything"}, "a22": {"definition": "random(1..9 except a21*a12/a11)", "name": "a22", "group": "Matrix A", "description": "", "templateType": "anything"}, "b": {"definition": "matrix([\n [b11,b12],\n [b21,b22]\n])", "name": "b", "group": "Matrix B", "description": "", "templateType": "anything"}, "c": {"definition": "matrix([\n [c11,c12],\n [c21,c22]\n])", "name": "c", "group": "Matrix C", "description": "", "templateType": "anything"}, "a12": {"definition": "random(-5..5)", "name": "a12", "group": "Matrix A", "description": "", "templateType": "anything"}, "b22": {"definition": "random(-9..9 except [0,b21*b12/b11])", "name": "b22", "group": "Matrix B", "description": "", "templateType": "anything"}, "a21": {"definition": "random(-6..6 except 0) ", "name": "a21", "group": "Matrix A", "description": "", "templateType": "anything"}, "b12": {"definition": "random(-5..5)", "name": "b12", "group": "Matrix B", "description": "", "templateType": "anything"}, "a": {"definition": "matrix([\n [a11,a12],\n [a21,a22]\n])", "name": "a", "group": "Matrix A", "description": "", "templateType": "anything"}, "c21": {"definition": "random(2..5)", "name": "c21", "group": "Matrix C", "description": "", "templateType": "anything"}, "a11": {"definition": "random(-9..9 except 0)", "name": "a11", "group": "Matrix A", "description": "", "templateType": "anything"}, "c11": {"definition": "random(1,2,4)", "name": "c11", "group": "Matrix C", "description": "", "templateType": "anything"}}, "advice": "The determinant of a matrix $\\mathrm{M} = \\begin{pmatrix} a&b \\\\ c&d \\end{pmatrix}$ is given by
\n\\[ \\det\\left(\\mathrm{M}\\right) = ad-bc \\]
\nIf we have two $n \\times n$ matrices $M$ and $N$, then
\n\\[ \\det\\left(\\mathrm{MN}\\right) = \\det\\left(\\mathrm{M}\\right)\\det\\left(\\mathrm{N}\\right) \\]
\nAnd it follows that if we have a third matrix $P$,
\n\\[ \\det\\left(\\mathrm{MNP}\\right) = \\det\\left(\\mathrm{M}\\right)\\det\\left(\\mathrm{N}\\right)\\det\\left(\\mathrm{P}\\right) \\]
\nThus for our example we have:
\n\\begin{align}
\\det\\left(\\mathrm{A}\\right) &= \\simplify[]{{a11}*{a22}-{a12}*{a21} = {det(a)}} \\\\
\\det\\left(\\mathrm{B}\\right) &= \\simplify[]{{b11}*{b22}-{b12}*{b21} = {det(b)}} \\\\
\\det\\left(\\mathrm{C}\\right) &= \\simplify[]{{c11}*{c22}-{c12}*{c21} = {det(c)}}
\\end{align}
\\begin{align}
\\det\\left( \\mathrm{ABC} \\right) &= \\det(\\mathrm{A}) \\det(\\mathrm{B}) \\det(\\mathrm{C}) \\\\
&= \\simplify[]{{det(a)}*{det(b)}*{det(c)}} \\\\
&= \\var{det(a*b*c)}
\\end{align}
Suppose $\\mathrm{M} = \\begin{pmatrix} a&b \\\\ c&d \\end{pmatrix}$ is a $2 \\times 2$ matrix and $\\det\\left(\\mathrm{M}\\right) = \\Delta \\neq 0$.
\nThen $\\mathrm{M}$ is invertible and
\n\\[ \\mathrm{M}^{-1} = \\frac{1}{\\Delta} \\begin{pmatrix} d & -b\\\\ -c& a \\end{pmatrix}=\\begin{pmatrix} \\frac{d}{\\Delta} & -\\frac{b}{\\Delta}\\\\ -\\frac{c}{\\Delta}& \\frac{a}{\\Delta} \\end{pmatrix}\\]
\nApplying this to these examples we obtain:
\n\\[ \\simplify[fractionnumbers]{matrix:A^(-1)={inverse(a)}} \\]
\n\\[ \\simplify[fractionnumbers]{matrix:B^(-1)={inverse(b)}} \\]
\n\\[ \\simplify[fractionnumbers]{matrix:C^(-1)={inverse(c)}} \\]
", "variable_groups": [{"name": "Matrix A", "variables": ["a11", "a12", "a21", "a22", "a"]}, {"name": "Matrix B", "variables": ["b11", "b12", "b21", "b22", "b"]}, {"name": "Matrix C", "variables": ["c11", "c12", "c21", "c22", "c"]}], "type": "question", "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}]}]}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}]}