// Numbas version: exam_results_page_options {"name": "Maria's 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": [{"name": "Maria's copy of Find determinants and inverses of 2x2 matrices", "variables": {"a": {"name": "a", "definition": "matrix([ [a11,a12],[a21,a22] ])", "templateType": "anything", "group": "Unnamed group", "description": ""}, "b11": {"name": "b11", "definition": "if(a11=tr2,tr2+1,tr2)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "tr2": {"name": "tr2", "definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "a12": {"name": "a12", "definition": "random(-5..5)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "c12": {"name": "c12", "definition": "a12+b12", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "c22": {"name": "c22", "definition": "if(tr4*c11=c21*c12,tr4+1,tr4)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "c": {"name": "c", "definition": "matrix([ [c11,c12], [c21,c22] ])", "templateType": "anything", "group": "Unnamed group", "description": ""}, "b12": {"name": "b12", "definition": "random(-5..5)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "tr1": {"name": "tr1", "definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "c21": {"name": "c21", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "a22": {"name": "a22", "definition": "if(tr1*a11=a21*a12,tr1+1,tr1)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "b": {"name": "b", "definition": "matrix([ [b11,b12], [b21,b22] ])", "templateType": "anything", "group": "Unnamed group", "description": ""}, "b21": {"name": "b21", "definition": "random(-6..6 except 0)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "tr4": {"name": "tr4", "definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "tr3": {"name": "tr3", "definition": "random(-9..9 except 0)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "a11": {"name": "a11", "definition": "random(-9..9 except 0)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "c11": {"name": "c11", "definition": "random(1,2,4)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "b22": {"name": "b22", "definition": "if(tr3*b11=b21*b12,tr3+1,tr3)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "a21": {"name": "a21", "definition": "random(-6..6 except 0)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "notes": "

10/07/2012:

\n

Added tags.

\n

Question appears to be working correctly.

\n

Corrected a typo in the Advice section.

\n

24/12/2012:

\n

Checked calculations, OK. Added tested1 tag.

", "description": "

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

"}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "functions": {"inverse": {"definition": "matrix([\n [m[1][1], -m[0][1]],\n [-m[1][0], m[0][0]]\n])/det(m)", "language": "jme", "type": "matrix", "parameters": [["m", "matrix"]]}}, "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)}} \\]

", "variablesTest": {"maxRuns": 100, "condition": ""}, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "preamble": {"js": "", "css": ""}, "statement": "

Let

\n

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

", "ungrouped_variables": ["a11", "a12", "a21", "a22", "b11", "b12", "b21", "b22", "c11", "c12", "c21", "c22", "tr1", "tr2", "tr3", "tr4"], "parts": [{"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]]

", "scripts": {}, "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"allowFractions": false, "scripts": {}, "showPrecisionHint": false, "type": "numberentry", "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 0.5, "maxValue": "det(a)", "minValue": "det(a)"}, {"allowFractions": false, "scripts": {}, "showPrecisionHint": false, "type": "numberentry", "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 0.5, "maxValue": "det(b)", "minValue": "det(b)"}, {"allowFractions": false, "scripts": {}, "showPrecisionHint": false, "type": "numberentry", "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 0.5, "maxValue": "det(c)", "minValue": "det(c)"}, {"allowFractions": false, "scripts": {}, "showPrecisionHint": false, "type": "numberentry", "showCorrectAnswer": true, "correctAnswerFraction": false, "marks": 0.5, "maxValue": "det(a*b*c)", "minValue": "det(a*b*c)"}], "marks": 0}, {"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]]

", "scripts": {}, "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"tolerance": 0, "scripts": {}, "showCorrectAnswer": true, "numRows": "2", "allowResize": false, "allowFractions": true, "type": "matrix", "markPerCell": false, "marks": "2", "correctAnswer": "inverse(a)", "correctAnswerFractions": true, "numColumns": "2"}], "marks": 0}, {"prompt": "

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

", "scripts": {}, "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"tolerance": 0, "scripts": {}, "showCorrectAnswer": true, "numRows": "2", "allowResize": false, "allowFractions": true, "type": "matrix", "markPerCell": false, "marks": "2", "correctAnswer": "inverse(b)", "correctAnswerFractions": true, "numColumns": "2"}], "marks": 0}, {"prompt": "

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

", "scripts": {}, "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"tolerance": 0, "scripts": {}, "showCorrectAnswer": true, "numRows": "2", "allowResize": false, "allowFractions": true, "type": "matrix", "markPerCell": false, "marks": "2", "correctAnswer": "inverse(c)", "correctAnswerFractions": true, "numColumns": "2"}], "marks": 0}], "tags": ["checked2015", "determinant of a matrix", "inverse", "inverse matrix", "MAS1602", "matrices", "matrix", "matrix inverse", "matrix multiplication", "multiplication of matrices", "tested1"], "variable_groups": [{"name": "Unnamed group", "variables": ["a", "b", "c"]}], "showQuestionGroupNames": false, "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}