// Numbas version: finer_feedback_settings {"name": "Maths Support: Determinant of a matrix", "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "preventleave": false, "browse": true, "showfrontpage": false, "showresultspage": "never"}, "duration": 0.0, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "timing": {"timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "shufflequestions": false, "questions": [], "percentpass": 0.0, "allQuestions": true, "pickQuestions": 0, "type": "exam", "feedback": {"showtotalmark": true, "advicethreshold": 0.0, "showanswerstate": true, "showactualmark": true, "allowrevealanswer": true, "enterreviewmodeimmediately": false, "showexpectedanswerswhen": "never", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "Determinants ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hayley Bishop", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/93/"}], "functions": {}, "ungrouped_variables": ["a21", "a22", "b22", "b21", "b1", "s2", "s1", "b12", "b11", "tr1", "c12", "c11", "tr2", "tr4", "c22", "a11", "a12", "db", "dc", "da", "a1", "c21", "c1", "tr3", "a", "b", "s", "u", "t"], "tags": ["determinant of a matrix", "inverse", "inverse matrix", "matrix", "matrix inverse", "matrix multiplication", "multiply matrix"], "advice": "

a)

\n
Determinants.
\n

Here is the formula for the determinant of a $2 \\times 2$ matrix:
\\[M = \\begin{pmatrix} a & b \\\\ c&d \\end{pmatrix} \\Rightarrow \\mathrm{det}\\left(M\\right) = ad-bc \\]

\n

$\\mathrm{det}\\left(A\\right) = \\simplify[]{{a11}*{a22}-{a12}*{a21} = {dA}}$
$\\mathrm{det}\\left(B\\right) = \\simplify[]{{b11}*{b22}-{b12}*{b21} = {dB}}$
$\\mathrm{det}\\left(C\\right) = \\simplify[]{{c11}*{c22}-{c12}*{c21} = {dC}}$

\n
Determinant of a product of matrices.
\n

If we have two $n \\times n$ matrices $M$ and $N$ then:
\\[\\mathrm{det}\\left(MN\\right) = \\mathrm{det}\\left(M\\right)\\mathrm{det}\\left(N\\right)\\]
And it follows that if we have a third matrix $P$ that:
\\[\\mathrm{det}\\left(MNP\\right) = \\mathrm{det}\\left(M\\right)\\mathrm{det}\\left(N\\right)\\mathrm{det}\\left(P\\right)\\]

\n

Thus for our example we have:

\n

\\[\\begin{eqnarray*}\\mathrm{det}\\left(ABC\\right) &=& \\mathrm{det}\\left(A\\right)\\times\\mathrm{det}\\left(B\\right)\\times\\mathrm{det}\\left(C\\right)\\\\ &=& \\var{dA}\\times \\var{dB} \\times \\var{dC}\\\\ &=& \\var{dA*dB*dC} \\end{eqnarray*} \\]

\n
Inverse of a $2 \\times 2$ matrix
\n

Suppose $M$ is a $2 \\times 2$ matrix and $\\mathrm{det}\\left(M\\right) = \\Delta \\neq 0$.

\n

Then $M$ is invertible and:
\\[M = \\begin{pmatrix} a & b \\\\ c&d \\end{pmatrix} \\Rightarrow 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

\\[A^{-1} = \\begin{pmatrix} \\simplify[std]{{a22}/{dA}} &\\simplify[std]{{-a12}/{dA}}\\\\\\simplify[std]{{-a21}/{dA}}&\\simplify[std]{{a11}/{dA}}\\end{pmatrix}\\]

\n

c)

\n

\\[B^{-1} = \\begin{pmatrix} \\simplify[std]{{b22}/{dB}} &\\simplify[std]{{-b12}/{dB}}\\\\\\simplify[std]{{-b21}/{dB}}&\\simplify[std]{{b11}/{dB}}\\end{pmatrix}\\]

\n

d)

\n

\\[C^{-1} = \\begin{pmatrix} \\simplify[std]{{c22}/{dC}} &\\simplify[std]{{-c12}/{dC}}\\\\\\simplify[std]{{-c21}/{dC}}&\\simplify[std]{{c11}/{dC}}\\end{pmatrix}\\]

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "parts": [{"prompt": "

Calculate the determinants of these matrices:

\n

$\\mathrm{det}\\left(A\\right) = \\;\\;$[[0]]$,\\;\\;\\;\\mathrm{det}\\left(B\\right) = \\;\\;$[[1]]$,\\;\\;\\;\\mathrm{det}\\left(C\\right) = \\;\\;$[[2]]$,\\;\\;\\;\\mathrm{det}\\left(ABC\\right) = \\;\\;$[[3]]

", "marks": 0, "gaps": [{"allowFractions": false, "scripts": {}, "maxValue": "dA", "minValue": "dA", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "dB", "minValue": "dB", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "dC", "minValue": "dC", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "dA*dB*dC", "minValue": "dA*dB*dC", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 0.5, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "

Let
\\[A=\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix},\\;\\; B=\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix},\\;\\; C=\\begin{pmatrix} \\var{c11}&\\var{c12}\\\\ \\var{c21}&\\var{c22}\\\\ \\end{pmatrix}\\]

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a21": {"definition": "s2*random(1..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "a21", "description": ""}, "a22": {"definition": "if(tr1*a11=a21*a12,tr1+1,tr1)", "templateType": "anything", "group": "Ungrouped variables", "name": "a22", "description": ""}, "b22": {"definition": "if(tr3*b11=b21*b12,tr3+1,tr3)", "templateType": "anything", "group": "Ungrouped variables", "name": "b22", "description": ""}, "b21": {"definition": "s*random(1..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "b21", "description": ""}, "b1": {"definition": "t*random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "b12": {"definition": "random(-5..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "b12", "description": ""}, "b11": {"definition": "if(a11=tr2,tr2+1,tr2)", "templateType": "anything", "group": "Ungrouped variables", "name": "b11", "description": ""}, "tr1": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "tr1", "description": ""}, "c12": {"definition": "a12+b12", "templateType": "anything", "group": "Ungrouped variables", "name": "c12", "description": ""}, "c11": {"definition": "random(1,2,4)", "templateType": "anything", "group": "Ungrouped variables", "name": "c11", "description": ""}, "tr2": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "tr2", "description": ""}, "tr4": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "tr4", "description": ""}, "c22": {"definition": "if(tr4*c11=c21*c12,tr4+1,tr4)", "templateType": "anything", "group": "Ungrouped variables", "name": "c22", "description": ""}, "a11": {"definition": "s1*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a11", "description": ""}, "a12": {"definition": "random(-5..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a12", "description": ""}, "db": {"definition": "b11*b22-b21*b12", "templateType": "anything", "group": "Ungrouped variables", "name": "db", "description": ""}, "dc": {"definition": "c11*c22-c21*c12", "templateType": "anything", "group": "Ungrouped variables", "name": "dc", "description": ""}, "da": {"definition": "a11*a22-a21*a12", "templateType": "anything", "group": "Ungrouped variables", "name": "da", "description": ""}, "a1": {"definition": "random(2..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "c21": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "c21", "description": ""}, "c1": {"definition": "u*random(1..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}, "tr3": {"definition": "s1*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "tr3", "description": ""}, "a": {"definition": "random(1..3)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "s*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "s": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "u": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "u", "description": ""}, "t": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}}, "metadata": {"notes": "\n \t\t \t\t \t\t

10/07/2012:

\n \t\t \t\t \t\t

Added tags.

\n \t\t \t\t \t\t

Question appears to be working correctly.

\n \t\t \t\t \t\t

Corrected a typo in the Advice section.

\n \t\t \t\t \n \t\t \n \t\t", "description": "

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

", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": [], "custom_part_types": [], "resources": []}