// Numbas version: exam_results_page_options {"name": "Hina's copy of Determinant and inverse of 2x2 matrices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"inverse": {"definition": "matrix([\n [m[1][1],-m[0][1]],\n [-m[1][0],m[0][0]]\n])/det(m)", "type": "matrix", "parameters": [["m", "matrix"]], "language": "jme"}}, "ungrouped_variables": [], "name": "Hina's copy of Determinant and inverse of 2x2 matrices", "tags": ["determinant of a matrix", "inverse", "inverse matrix", "matrices", "matrix", "matrix inverse", "matrix multiplication", "multiplication of matrices", "tested1"], "type": "question", "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)}} \\]

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

Let

\n

\\[\\mathrm{A} = \\var{a},\\;\\; \\mathrm{B} = \\var{b},\\;\\; \\mathrm{C} = \\var{c}\\]

\n

Calculate the determinants of these matrices:

\n

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

\n

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

\n

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

\n

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "det(a)", "minValue": "det(a)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "showPrecisionHint": false, "type": "numberentry"}, {"allowFractions": false, "variableReplacements": [], "maxValue": "det(b)", "minValue": "det(b)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "showPrecisionHint": false, "type": "numberentry"}, {"allowFractions": false, "variableReplacements": [], "maxValue": "det(c)", "minValue": "det(c)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "showPrecisionHint": false, "type": "numberentry"}, {"allowFractions": false, "variableReplacements": [], "maxValue": "det(a*b*c)", "minValue": "det(a*b*c)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 0.5, "showPrecisionHint": false, "type": "numberentry"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Find the inverses of the matrices given above. Input all matrix entries as fractions or integers and not as decimals.

\n

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

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

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

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

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"variableReplacementStrategy": "originalfirst", "numColumns": "2", "tolerance": "0.01", "allowFractions": true, "variableReplacements": [], "markPerCell": false, "numRows": "2", "showCorrectAnswer": true, "correctAnswer": "inverse(c)", "scripts": {}, "correctAnswerFractions": true, "marks": 1, "type": "matrix", "allowResize": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

Do the following matrix problems.

", "variable_groups": [{"variables": ["a11", "a12", "a21", "a22", "a"], "name": "Matrix A"}, {"variables": ["b11", "b12", "b21", "b22", "b"], "name": "Matrix B"}, {"variables": ["c11", "c12", "c21", "c22", "c"], "name": "Matrix C"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"c22": {"definition": "random(1..9 except c21*c12/c11)", "templateType": "anything", "group": "Matrix C", "name": "c22", "description": ""}, "a21": {"definition": "random(-6..6 except 0) ", "templateType": "anything", "group": "Matrix A", "name": "a21", "description": ""}, "a22": {"definition": "random(1..9 except a21*a12/a11)", "templateType": "anything", "group": "Matrix A", "name": "a22", "description": ""}, "c21": {"definition": "random(2..5)", "templateType": "anything", "group": "Matrix C", "name": "c21", "description": ""}, "a11": {"definition": "random(-9..9 except 0)", "templateType": "anything", "group": "Matrix A", "name": "a11", "description": ""}, "a12": {"definition": "random(-5..5)", "templateType": "anything", "group": "Matrix A", "name": "a12", "description": ""}, "c": {"definition": "matrix([\n [c11,c12],\n [c21,c22]\n])", "templateType": "anything", "group": "Matrix C", "name": "c", "description": ""}, "b21": {"definition": "random(-6..6 except 0)", "templateType": "anything", "group": "Matrix B", "name": "b21", "description": ""}, "b22": {"definition": "random(-9..9 except [0,b21*b12/b11])", "templateType": "anything", "group": "Matrix B", "name": "b22", "description": ""}, "b": {"definition": "matrix([\n [b11,b12],\n [b21,b22]\n])", "templateType": "anything", "group": "Matrix B", "name": "b", "description": ""}, "b12": {"definition": "random(-5..5)", "templateType": "anything", "group": "Matrix B", "name": "b12", "description": ""}, "a": {"definition": "matrix([\n [a11,a12],\n [a21,a22]\n])", "templateType": "anything", "group": "Matrix A", "name": "a", "description": ""}, "b11": {"definition": "random(1..9 except a11)\n//if(a11=tr2,tr2+1,tr2)", "templateType": "anything", "group": "Matrix B", "name": "b11", "description": ""}, "c12": {"definition": "a12+b12", "templateType": "anything", "group": "Matrix C", "name": "c12", "description": ""}, "c11": {"definition": "random(1,2,4)", "templateType": "anything", "group": "Matrix C", "name": "c11", "description": ""}}, "metadata": {"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.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Hina Ahmed", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1160/"}]}]}], "contributors": [{"name": "Hina Ahmed", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1160/"}]}