// Numbas version: finer_feedback_settings {"name": "Ex 5 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": [{"statement": "
Do the following matrix problems.
", "variables": {"b22": {"templateType": "anything", "definition": "random(-9..9 except [0,b21*b12/b11])", "description": "", "name": "b22", "group": "Matrix B"}, "c": {"templateType": "anything", "definition": "matrix([\n [c11,c12],\n [c21,c22]\n])", "description": "", "name": "c", "group": "Matrix C"}, "c22": {"templateType": "anything", "definition": "random(1..9 except c21*c12/c11)", "description": "", "name": "c22", "group": "Matrix C"}, "c21": {"templateType": "anything", "definition": "random(2..5)", "description": "", "name": "c21", "group": "Matrix C"}, "a12": {"templateType": "anything", "definition": "random(-5..5)", "description": "", "name": "a12", "group": "Matrix A"}, "a22": {"templateType": "anything", "definition": "random(1..9 except a21*a12/a11)", "description": "", "name": "a22", "group": "Matrix A"}, "b": {"templateType": "anything", "definition": "matrix([\n [b11,b12],\n [b21,b22]\n])", "description": "", "name": "b", "group": "Matrix B"}, "b12": {"templateType": "anything", "definition": "random(-5..5)", "description": "", "name": "b12", "group": "Matrix B"}, "a11": {"templateType": "anything", "definition": "random(-9..9 except 0)", "description": "", "name": "a11", "group": "Matrix A"}, "a": {"templateType": "anything", "definition": "matrix([\n [a11,a12],\n [a21,a22]\n])", "description": "", "name": "a", "group": "Matrix A"}, "b11": {"templateType": "anything", "definition": "random(1..9 except a11)\n//if(a11=tr2,tr2+1,tr2)", "description": "", "name": "b11", "group": "Matrix B"}, "c12": {"templateType": "anything", "definition": "a12+b12", "description": "", "name": "c12", "group": "Matrix C"}, "b21": {"templateType": "anything", "definition": "random(-6..6 except 0)", "description": "", "name": "b21", "group": "Matrix B"}, "c11": {"templateType": "anything", "definition": "random(1,2,4)", "description": "", "name": "c11", "group": "Matrix C"}, "a21": {"templateType": "anything", "definition": "random(-6..6 except 0) ", "description": "", "name": "a21", "group": "Matrix A"}}, "parts": [{"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]]
", "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"minValue": "det(a)", "variableReplacementStrategy": "originalfirst", "marks": 0.5, "variableReplacements": [], "correctAnswerStyle": "plain", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "mustBeReducedPC": 0, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "maxValue": "det(a)", "allowFractions": false}, {"minValue": "det(b)", "variableReplacementStrategy": "originalfirst", "marks": 0.5, "variableReplacements": [], "correctAnswerStyle": "plain", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "mustBeReducedPC": 0, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "maxValue": "det(b)", "allowFractions": false}, {"minValue": "det(c)", "variableReplacementStrategy": "originalfirst", "marks": 0.5, "variableReplacements": [], "correctAnswerStyle": "plain", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "mustBeReducedPC": 0, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "maxValue": "det(c)", "allowFractions": false}, {"minValue": "det(a*b*c)", "variableReplacementStrategy": "originalfirst", "marks": 0.5, "variableReplacements": [], "correctAnswerStyle": "plain", "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "mustBeReducedPC": 0, "mustBeReduced": false, "type": "numberentry", "showCorrectAnswer": true, "maxValue": "det(a*b*c)", "allowFractions": false}], "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]]
", "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"correctAnswer": "inverse(a)", "variableReplacementStrategy": "originalfirst", "marks": 1, "allowResize": false, "variableReplacements": [], "showFeedbackIcon": true, "markPerCell": false, "scripts": {}, "numRows": "2", "tolerance": "0.01", "correctAnswerFractions": true, "type": "matrix", "showCorrectAnswer": true, "numColumns": "2", "allowFractions": true}], "scripts": {}}, {"prompt": "$\\mathrm{B}^{-1} = $ [[0]]
", "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"correctAnswer": "inverse(b)", "variableReplacementStrategy": "originalfirst", "marks": 1, "allowResize": false, "variableReplacements": [], "showFeedbackIcon": true, "markPerCell": false, "scripts": {}, "numRows": "2", "tolerance": "0.01", "correctAnswerFractions": true, "type": "matrix", "showCorrectAnswer": true, "numColumns": "2", "allowFractions": true}], "scripts": {}}, {"prompt": "$\\mathrm{C}^{-1} = $ [[0]]
", "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "showFeedbackIcon": true, "gaps": [{"correctAnswer": "inverse(c)", "variableReplacementStrategy": "originalfirst", "marks": 1, "allowResize": false, "variableReplacements": [], "showFeedbackIcon": true, "markPerCell": false, "scripts": {}, "numRows": "2", "tolerance": "0.01", "correctAnswerFractions": true, "type": "matrix", "showCorrectAnswer": true, "numColumns": "2", "allowFractions": true}], "scripts": {}}], "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)}} \\]
", "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {"inverse": {"type": "matrix", "language": "jme", "parameters": [["m", "matrix"]], "definition": "matrix([\n [m[1][1],-m[0][1]],\n [-m[1][0],m[0][0]]\n])/det(m)"}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Find the determinant and inverse of three $2 \\times 2$ invertible matrices.
"}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "variable_groups": [{"variables": ["a11", "a12", "a21", "a22", "a"], "name": "Matrix A"}, {"variables": ["b11", "b12", "b21", "b22", "b"], "name": "Matrix B"}, {"variables": ["c11", "c12", "c21", "c22", "c"], "name": "Matrix C"}], "extensions": [], "name": "Ex 5 Determinant and Inverse of 2x2 matrices", "tags": [], "ungrouped_variables": [], "preamble": {"css": "", "js": ""}, "type": "question", "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}]}]}], "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}]}