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