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