// Numbas version: finer_feedback_settings {"name": "John'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": [{"preamble": {"js": "", "css": ""}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "
Let
\n\\begin{align} \\mathbf{A} &= \\var{a}, & \\mathbf{B} &= \\var{b}, & \\mathbf{C} &= \\var{c} \\end{align}
", "parts": [{"marks": 0, "scripts": {}, "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]]
", "gaps": [{"allowFractions": false, "maxValue": "det(a)", "scripts": {}, "showCorrectAnswer": true, "minValue": "det(a)", "correctAnswerFraction": false, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "maxValue": "det(b)", "scripts": {}, "showCorrectAnswer": true, "minValue": "det(b)", "correctAnswerFraction": false, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "maxValue": "det(c)", "scripts": {}, "showCorrectAnswer": true, "minValue": "det(c)", "correctAnswerFraction": false, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "maxValue": "det(a*b*c)", "scripts": {}, "showCorrectAnswer": true, "minValue": "det(a*b*c)", "correctAnswerFraction": false, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}], "type": "gapfill"}, {"marks": 0, "scripts": {}, "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]]
", "gaps": [{"allowFractions": true, "scripts": {}, "correctAnswer": "inverse(a)", "allowResize": false, "showCorrectAnswer": true, "tolerance": 0, "marks": "2", "correctAnswerFractions": true, "numColumns": "2", "markPerCell": false, "numRows": "2", "type": "matrix"}], "type": "gapfill"}, {"marks": 0, "scripts": {}, "showCorrectAnswer": true, "prompt": "$\\mathbf{B}^{-1} = $ [[0]]
", "gaps": [{"allowFractions": true, "scripts": {}, "correctAnswer": "inverse(b)", "allowResize": false, "showCorrectAnswer": true, "tolerance": 0, "marks": "2", "correctAnswerFractions": true, "numColumns": "2", "markPerCell": false, "numRows": "2", "type": "matrix"}], "type": "gapfill"}, {"marks": 0, "scripts": {}, "showCorrectAnswer": true, "prompt": "$\\mathbf{C}^{-1} = $ [[0]]
", "gaps": [{"allowFractions": true, "scripts": {}, "correctAnswer": "inverse(c)", "allowResize": false, "showCorrectAnswer": true, "tolerance": 0, "marks": "2", "correctAnswerFractions": true, "numColumns": "2", "markPerCell": false, "numRows": "2", "type": "matrix"}], "type": "gapfill"}], "type": "question", "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"}], "question_groups": [{"pickingStrategy": "all-ordered", "name": "", "questions": [], "pickQuestions": 0}], "advice": "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 \\]
\nIf 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) \\]
\nAnd 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) \\]
\nThus 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}
\\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}
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$.
\nThen $\\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}\\]
\nApplying this to these examples we obtain:
\n\\[ \\simplify[fractionnumbers]{matrix:A^(-1)={inverse(a)}} \\]
\n\\[ \\simplify[fractionnumbers]{matrix:B^(-1)={inverse(b)}} \\]
\n\\[ \\simplify[fractionnumbers]{matrix:C^(-1)={inverse(c)}} \\]
", "tags": ["checked2015", "determinant of a matrix", "inverse", "inverse matrix", "MAS1602", "matrices", "matrix", "matrix inverse", "matrix multiplication", "multiplication of matrices", "tested1"], "variables": {"tr4": {"name": "tr4", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "description": ""}, "b": {"name": "b", "templateType": "anything", "group": "Unnamed group", "definition": "matrix([ [b11,b12], [b21,b22] ])", "description": ""}, "c21": {"name": "c21", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": ""}, "c11": {"name": "c11", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2,4)", "description": ""}, "b21": {"name": "b21", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": ""}, "b11": {"name": "b11", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(a11=tr2,tr2+1,tr2)", "description": ""}, "c22": {"name": "c22", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(tr4*c11=c21*c12,tr4+1,tr4)", "description": ""}, "tr2": {"name": "tr2", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "description": ""}, "a21": {"name": "a21", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": ""}, "b12": {"name": "b12", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": ""}, "a22": {"name": "a22", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(tr1*a11=a21*a12,tr1+1,tr1)", "description": ""}, "tr1": {"name": "tr1", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)", "description": ""}, "c": {"name": "c", "templateType": "anything", "group": "Unnamed group", "definition": "matrix([ [c11,c12], [c21,c22] ])", "description": ""}, "a11": {"name": "a11", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": ""}, "c12": {"name": "c12", "templateType": "anything", "group": "Ungrouped variables", "definition": "a12+b12", "description": ""}, "tr3": {"name": "tr3", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": ""}, "a": {"name": "a", "templateType": "anything", "group": "Unnamed group", "definition": "matrix([ [a11,a12],[a21,a22] ])", "description": ""}, "b22": {"name": "b22", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(tr3*b11=b21*b12,tr3+1,tr3)", "description": ""}, "a12": {"name": "a12", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": ""}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "notes": "10/07/2012:
\nAdded tags.
Question appears to be working correctly.
\nCorrected a typo in the Advice section.
24/12/2012:
\nChecked calculations, OK. Added tested1 tag.
", "description": "Find the determinant and inverse of three $2 \\times 2$ invertible matrices.
"}, "functions": {"inverse": {"language": "jme", "type": "matrix", "parameters": [["m", "matrix"]], "definition": "matrix([\n [m[1][1], -m[0][1]],\n [-m[1][0], m[0][0]]\n])/det(m)"}}, "name": "John's copy of Find determinants and inverses of 2x2 matrices", "showQuestionGroupNames": false, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "John Steele", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2218/"}, {"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": "John Steele", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2218/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}