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

Calculate the determinants of these matrices.

\n

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

\n

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

\n

$\\mathrm{det}\\left(C\\right) = $ [[2]]

\n

$\\mathrm{det}\\left(ABC\\right) = $ [[3]]

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

Find the inverses of the following matrices. Input all matrix entries as fractions or integers and not as decimals ($1/2$ rather than $0.5$).

\n

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

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

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

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

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

", "variableReplacements": []}], "variable_groups": [{"variables": ["a", "b", "c"], "name": "Unnamed group"}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "functions": {"inverse": {"definition": "matrix([\n [m[1][1], -m[0][1]],\n [-m[1][0], m[0][0]]\n])/det(m)", "parameters": [["m", "matrix"]], "language": "jme", "type": "matrix"}}, "ungrouped_variables": ["a11", "a12", "a21", "a22", "b11", "b12", "b21", "b22", "c11", "c12", "c21", "c22", "tr1", "tr2", "tr3", "tr4"], "statement": "

Let

\n

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

", "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "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)}} \\]

", "name": "W1b - Find determinants and inverses of 2x2 matrices", "variables": {"c": {"group": "Unnamed group", "definition": "matrix([ [c11,c12], [c21,c22] ])", "description": "", "templateType": "anything", "name": "c"}, "c21": {"group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "name": "c21"}, "tr2": {"group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "name": "tr2"}, "c11": {"group": "Ungrouped variables", "definition": "random(1,2,4)", "description": "", "templateType": "anything", "name": "c11"}, "a": {"group": "Unnamed group", "definition": "matrix([ [a11,a12],[a21,a22] ])", "description": "", "templateType": "anything", "name": "a"}, "b12": {"group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything", "name": "b12"}, "b21": {"group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "name": "b21"}, "tr3": {"group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "name": "tr3"}, "a11": {"group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "name": "a11"}, "b11": {"group": "Ungrouped variables", "definition": "if(a11=tr2,tr2+1,tr2)", "description": "", "templateType": "anything", "name": "b11"}, "tr4": {"group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "name": "tr4"}, "b22": {"group": "Ungrouped variables", "definition": "if(tr3*b11=b21*b12,tr3+1,tr3)", "description": "", "templateType": "anything", "name": "b22"}, "b": {"group": "Unnamed group", "definition": "matrix([ [b11,b12], [b21,b22] ])", "description": "", "templateType": "anything", "name": "b"}, "a22": {"group": "Ungrouped variables", "definition": "if(tr1*a11=a21*a12,tr1+1,tr1)", "description": "", "templateType": "anything", "name": "a22"}, "c22": {"group": "Ungrouped variables", "definition": "if(tr4*c11=c21*c12,tr4+1,tr4)", "description": "", "templateType": "anything", "name": "c22"}, "a12": {"group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything", "name": "a12"}, "a21": {"group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "name": "a21"}, "c12": {"group": "Ungrouped variables", "definition": "a12+b12", "description": "", "templateType": "anything", "name": "c12"}, "tr1": {"group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "name": "tr1"}}, "preamble": {"css": "", "js": ""}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "extensions": [], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}]}