// Numbas version: exam_results_page_options {"name": "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": [{"name": "Determinant and inverse of 2x2 matrices", "tags": [], "metadata": {"description": "

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

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

Do the following matrix problems.

", "advice": "

Determinant of a $2 \\times 2$ matrix

\n

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 \\]

\n

If 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) \\]

\n

And 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) \\]

\n

a)

\n

Thus 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}

\n

\\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}

\n

Inverse of a $2 \\times 2$ matrix

\n

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$.

\n

Then $\\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}\\]

\n

Applying this to these examples we obtain:

\n

b)

\n

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

\n

c)

\n

\\[ \\simplify[fractionnumbers]{matrix:B^(-1)={inverse(b)}} \\]

\n

d)

\n

\\[ \\simplify[fractionnumbers]{matrix:C^(-1)={inverse(c)}} \\]

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "extensions": [], "variables": {"c22": {"name": "c22", "group": "Matrix C", "definition": "random(1..9 except c21*c12/c11)", "description": "", "templateType": "anything"}, "a21": {"name": "a21", "group": "Matrix A", "definition": "random(-6..6 except 0) ", "description": "", "templateType": "anything"}, "a22": {"name": "a22", "group": "Matrix A", "definition": "random(1..9 except a21*a12/a11)", "description": "", "templateType": "anything"}, "c21": {"name": "c21", "group": "Matrix C", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Matrix A", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Matrix A", "definition": "random(-5..5)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Matrix C", "definition": "matrix([\n [c11,c12],\n [c21,c22]\n])", "description": "", "templateType": "anything"}, "b21": {"name": "b21", "group": "Matrix B", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything"}, "b22": {"name": "b22", "group": "Matrix B", "definition": "random(-9..9 except [0,b21*b12/b11])", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Matrix B", "definition": "matrix([\n [b11,b12],\n [b21,b22]\n])", "description": "", "templateType": "anything"}, "b12": {"name": "b12", "group": "Matrix B", "definition": "random(-5..5)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Matrix A", "definition": "matrix([\n [a11,a12],\n [a21,a22]\n])", "description": "", "templateType": "anything"}, "b11": {"name": "b11", "group": "Matrix B", "definition": "random(1..9 except a11)\n//if(a11=tr2,tr2+1,tr2)", "description": "", "templateType": "anything"}, "c12": {"name": "c12", "group": "Matrix C", "definition": "a12+b12", "description": "", "templateType": "anything"}, "c11": {"name": "c11", "group": "Matrix C", "definition": "random(1,2,4)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "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"]}], "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, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

Let

\n

\\[\\mathrm{A} = \\var{a},\\;\\; \\mathrm{B} = \\var{b},\\;\\; \\mathrm{C} = \\var{c}\\]

\n

Calculate 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]] 

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(a)", "maxValue": "det(a)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(b)", "maxValue": "det(b)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(c)", "maxValue": "det(c)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(a*b*c)", "maxValue": "det(a*b*c)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "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]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "inverse(a)", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": "0.01", "markPerCell": false, "allowFractions": true}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\mathrm{B}^{-1} = $ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "inverse(b)", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": "0.01", "markPerCell": false, "allowFractions": true}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$\\mathrm{C}^{-1} = $ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "inverse(c)", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": "0.01", "markPerCell": false, "allowFractions": true}], "sortAnswers": false}], "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/"}]}]}], "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/"}]}