// Numbas version: exam_results_page_options {"name": "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": [{"tags": ["checked2015", "determinant of a matrix", "inverse", "inverse matrix", "MAS1602", "matrices", "matrix", "matrix inverse", "matrix multiplication", "multiplication of matrices", "tested1"], "parts": [{"scripts": {}, "type": "gapfill", "showCorrectAnswer": true, "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]]

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

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

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

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

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

", "marks": 0, "gaps": [{"correctAnswer": "inverse(c)", "scripts": {}, "numRows": "2", "type": "matrix", "numColumns": "2", "marks": "2", "showCorrectAnswer": true, "allowResize": false, "tolerance": 0, "markPerCell": false, "correctAnswerFractions": true, "allowFractions": true}]}], "type": "question", "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"}}, "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)}} \\]

", "metadata": {"description": "

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

", "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.

", "licence": "Creative Commons Attribution 4.0 International"}, "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

Let

\n

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

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "name": "Find determinants and inverses of 2x2 matrices", "question_groups": [{"name": "", "pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": []}], "showQuestionGroupNames": false, "ungrouped_variables": ["a11", "a12", "a21", "a22", "b11", "b12", "b21", "b22", "c11", "c12", "c21", "c22", "tr1", "tr2", "tr3", "tr4"], "variables": {"b11": {"name": "b11", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(a11=tr2,tr2+1,tr2)"}, "c12": {"name": "c12", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "a12+b12"}, "c21": {"name": "c21", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)"}, "c": {"name": "c", "description": "", "templateType": "anything", "group": "Unnamed group", "definition": "matrix([ [c11,c12], [c21,c22] ])"}, "a22": {"name": "a22", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(tr1*a11=a21*a12,tr1+1,tr1)"}, "tr3": {"name": "tr3", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)"}, "b12": {"name": "b12", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)"}, "a12": {"name": "a12", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)"}, "c11": {"name": "c11", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2,4)"}, "c22": {"name": "c22", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(tr4*c11=c21*c12,tr4+1,tr4)"}, "b": {"name": "b", "description": "", "templateType": "anything", "group": "Unnamed group", "definition": "matrix([ [b11,b12], [b21,b22] ])"}, "b22": {"name": "b22", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(tr3*b11=b21*b12,tr3+1,tr3)"}, "tr2": {"name": "tr2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)"}, "tr4": {"name": "tr4", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)"}, "a": {"name": "a", "description": "", "templateType": "anything", "group": "Unnamed group", "definition": "matrix([ [a11,a12],[a21,a22] ])"}, "tr1": {"name": "tr1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)"}, "a21": {"name": "a21", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)"}, "a11": {"name": "a11", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)"}, "b21": {"name": "b21", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)"}}, "variable_groups": [{"name": "Unnamed group", "variables": ["a", "b", "c"]}], "preamble": {"js": "", "css": ""}, "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/"}]}]}], "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/"}]}