// Numbas version: finer_feedback_settings {"name": "Quiz copy of Find determinants and inverses of 2x2 matrices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "functions": {"inverse": {"parameters": [["m", "matrix"]], "type": "matrix", "definition": "matrix([\n [m[1][1], -m[0][1]],\n [-m[1][0], m[0][0]]\n])/det(m)", "language": "jme"}}, "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)}} \\]

", "variables": {"c11": {"templateType": "anything", "definition": "random(1,2,4)", "group": "Ungrouped variables", "name": "c11", "description": ""}, "c22": {"templateType": "anything", "definition": "if(tr4*c11=c21*c12,tr4+1,tr4)", "group": "Ungrouped variables", "name": "c22", "description": ""}, "a": {"templateType": "anything", "definition": "matrix([ [a11,a12],[a21,a22] ])", "group": "Unnamed group", "name": "a", "description": ""}, "a11": {"templateType": "anything", "definition": "random(-9..9 except 0)", "group": "Ungrouped variables", "name": "a11", "description": ""}, "a21": {"templateType": "anything", "definition": "random(-6..6 except 0)", "group": "Ungrouped variables", "name": "a21", "description": ""}, "c21": {"templateType": "anything", "definition": "random(2..5)", "group": "Ungrouped variables", "name": "c21", "description": ""}, "a12": {"templateType": "anything", "definition": "random(-5..5)", "group": "Ungrouped variables", "name": "a12", "description": ""}, "b22": {"templateType": "anything", "definition": "if(tr3*b11=b21*b12,tr3+1,tr3)", "group": "Ungrouped variables", "name": "b22", "description": ""}, "c": {"templateType": "anything", "definition": "matrix([ [c11,c12], [c21,c22] ])", "group": "Unnamed group", "name": "c", "description": ""}, "b12": {"templateType": "anything", "definition": "random(-5..5)", "group": "Ungrouped variables", "name": "b12", "description": ""}, "tr2": {"templateType": "anything", "definition": "random(1..9)", "group": "Ungrouped variables", "name": "tr2", "description": ""}, "b11": {"templateType": "anything", "definition": "if(a11=tr2,tr2+1,tr2)", "group": "Ungrouped variables", "name": "b11", "description": ""}, "b21": {"templateType": "anything", "definition": "random(-6..6 except 0)", "group": "Ungrouped variables", "name": "b21", "description": ""}, "c12": {"templateType": "anything", "definition": "a12+b12", "group": "Ungrouped variables", "name": "c12", "description": ""}, "tr1": {"templateType": "anything", "definition": "random(1..9)", "group": "Ungrouped variables", "name": "tr1", "description": ""}, "a22": {"templateType": "anything", "definition": "if(tr1*a11=a21*a12,tr1+1,tr1)", "group": "Ungrouped variables", "name": "a22", "description": ""}, "tr4": {"templateType": "anything", "definition": "random(1..9)", "group": "Ungrouped variables", "name": "tr4", "description": ""}, "b": {"templateType": "anything", "definition": "matrix([ [b11,b12], [b21,b22] ])", "group": "Unnamed group", "name": "b", "description": ""}, "tr3": {"templateType": "anything", "definition": "random(-9..9 except 0)", "group": "Ungrouped variables", "name": "tr3", "description": ""}}, "statement": "

Let

\n

\\begin{align} \\mathbf{A} &= \\var{a}, & \\mathbf{B} &= \\var{b}, & \\mathbf{C} &= \\var{c} \\end{align}

", "tags": [], "name": "Quiz copy of Find determinants and inverses of 2x2 matrices", "ungrouped_variables": ["a11", "a12", "a21", "a22", "b11", "b12", "b21", "b22", "c11", "c12", "c21", "c22", "tr1", "tr2", "tr3", "tr4"], "variable_groups": [{"variables": ["a", "b", "c"], "name": "Unnamed group"}], "parts": [{"showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

Calculate the determinants of these matrices.

\n

$\\mathrm{det}\\left(A\\right) = $ [[0]]

\n

$\\mathrm{det}\\left(B\\right) = $ [[1]]

\n

", "type": "gapfill", "unitTests": [], "gaps": [{"mustBeReducedPC": 0, "showCorrectAnswer": true, "correctAnswerFraction": false, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "scripts": {}, "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "type": "numberentry", "maxValue": "det(a)", "unitTests": [], "allowFractions": false, "variableReplacements": [], "marks": 0.5, "minValue": "det(a)", "correctAnswerStyle": "plain"}, {"mustBeReducedPC": 0, "showCorrectAnswer": true, "correctAnswerFraction": false, "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "scripts": {}, "extendBaseMarkingAlgorithm": true, "mustBeReduced": false, "type": "numberentry", "maxValue": "det(b)", "unitTests": [], "allowFractions": false, "variableReplacements": [], "marks": 0.5, "minValue": "det(b)", "correctAnswerStyle": "plain"}], "variableReplacements": [], "marks": 0, "scripts": {}, "sortAnswers": false}, {"showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "

Find the inverses of the following matrices. Input all matrix entries as fractions or integers and not as decimals.

\n

$\\mathbf{A}^{-1} = $ [[0]]

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

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

", "type": "gapfill", "unitTests": [], "gaps": [{"showCorrectAnswer": true, "showFeedbackIcon": true, "tolerance": 0, "allowResize": false, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "correctAnswer": "inverse(b)", "extendBaseMarkingAlgorithm": true, "type": "matrix", "allowFractions": true, "unitTests": [], "numColumns": "2", "variableReplacements": [], "marks": "2", "correctAnswerFractions": true, "scripts": {}, "markPerCell": false, "numRows": "2"}], "variableReplacements": [], "marks": 0, "scripts": {}, "sortAnswers": false}], "preamble": {"css": "", "js": ""}, "extensions": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "type": "question", "contributors": [{"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}]}]}], "contributors": [{"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}]}