// Numbas version: exam_results_page_options {"name": "Blathnaid's copy of Solve simultaneous equations by finding inverse matrix,", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["ma", "a00", "a01", "a10", "a11", "mb", "ma_inverse", "x", "y"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variables": {"x": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "x", "definition": "(ma_inverse*mb)[0][0]"}, "mb": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "mb", "definition": "matrix([\n [random(-9..9 except 0)],\n [random(-9..9 except 0)]\n])"}, "a01": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "a01", "definition": "random(-9..9 except 0)"}, "y": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "y", "definition": "(ma_inverse*mb)[1][0]"}, "ma_inverse": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "ma_inverse", "definition": "matrix([\n [ma[1][1], -ma[0][1]],\n [-ma[1][0], ma[0][0]]\n])/det(ma)"}, "a10": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "a10", "definition": "random(-9..9 except [0,a00,-a00,a00*a11/a01])"}, "a00": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "a00", "definition": "random(-9..9 except 0)"}, "a11": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "a11", "definition": "random(-9..9 except [0,a01,-a01])"}, "ma": {"description": "
Matrix A. a10 is picked so it's non-singular, and a11 is never $\\pm a01$.
\nNo entry is 0.
", "group": "Ungrouped variables", "templateType": "anything", "name": "ma", "definition": "matrix([\n [a00,a01],\n [a10,a11]\n])"}}, "functions": {}, "showQuestionGroupNames": false, "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question", "metadata": {"notes": "20/06/2012:
\nAdded, edited tags.
\nEdited advice so that it gave the correct solution for $y$ (as in the answer).
\n4/07/2012:
Column vectors v and b have the bracket in the incorrect place.
\n\n
10/07/2012:
Added tags.
Question appears to be working correctly.
\nColumn vectors v and b still have brackets in incorrect places.
\n24/12/2012:
\nChecked calculations, OK. Added tested1 tag.
\nImproved display as requested above.
", "description": "Putting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix.
", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"js": "", "css": ""}, "statement": "Rewrite the following system of equations as a matrix equation
\n\\[ \\mathbf{Av} = \\mathbf{b} \\]
\nfor a matrix $\\mathbf{A}$ and column vectors $\\mathbf{v}$ and $\\mathbf{b}$.
\n\\begin{align}
\\simplify[std]{ {ma[0][0]}x + {ma[0][1]}y} &= \\var{mb[0][0]} \\\\
\\simplify[std]{ {ma[1][0]}x + {ma[1][1]}y} &= \\var{mb[1][0]}
\\end{align}
Input all numbers as fractions or integers and not as decimals.
", "variable_groups": [], "tags": ["checked2015", "inverse of a matrix", "linear equations", "linear equations in matrix form", "MAS1602", "MAS2223", "matrices", "matrix", "matrix equations", "matrix form", "matrix multiplication", "multiply matrices", "multiply matrix", "solving linear equations", "system of linear equations", "tested1"], "question_groups": [{"pickQuestions": 0, "name": "", "pickingStrategy": "all-ordered", "questions": []}], "parts": [{"marks": 0, "prompt": "$\\mathbf{A} = $ [[0]]
\n[[1]] | \n
[[2]] | \n
$\\mathbf{b} = $ [[3]]
Find the inverse of $\\mathbf{A}$.
\n$\\mathbf{A}^{-1} = $ [[0]]
", "showCorrectAnswer": true, "gaps": [{"numRows": "2", "correctAnswerFractions": true, "correctAnswer": "ma_inverse", "markPerCell": false, "marks": "2", "showCorrectAnswer": true, "allowFractions": true, "numColumns": "2", "tolerance": 0, "allowResize": false, "scripts": {}, "type": "matrix"}], "scripts": {}, "type": "gapfill"}, {"marks": 0, "prompt": "Now find $\\mathbf{A}^{-1}\\mathbf{b}$.
\n$\\mathbf{A}^{-1}\\mathbf{b} = $ [[0]]
", "showCorrectAnswer": true, "gaps": [{"numRows": "2", "correctAnswerFractions": true, "correctAnswer": "ma_inverse*mb", "markPerCell": false, "marks": 1, "showCorrectAnswer": true, "allowFractions": true, "numColumns": 1, "tolerance": 0, "allowResize": false, "scripts": {}, "type": "matrix"}], "scripts": {}, "type": "gapfill"}, {"marks": 0, "prompt": "Finally, solve the equations.
\n$x = $ [[0]]
\n$y = $ [[1]]
", "showCorrectAnswer": true, "gaps": [{"showPrecisionHint": false, "marks": "0.5", "maxValue": "x", "allowFractions": true, "correctAnswerFraction": true, "showCorrectAnswer": true, "minValue": "x", "scripts": {}, "type": "numberentry"}, {"showPrecisionHint": false, "marks": "0.5", "maxValue": "y", "allowFractions": true, "correctAnswerFraction": true, "showCorrectAnswer": true, "minValue": "y", "scripts": {}, "type": "numberentry"}], "scripts": {}, "type": "gapfill"}], "advice": "The equations can be written in the matrix form
\n\\[ \\var{ma}\\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\var{mb} \\]
\n$\\mathrm{det}(\\mathbf{A}) = \\simplify[]{ {ma[0][0]}*{ma[1][1]} - {ma[0][1]}*{ma[1][0]}} = \\var{det(ma)} \\neq 0$, so $\\mathbf{A}$ is invertible.
\n\\[ \\mathbf{A}^{-1} = \\simplify[fractionnumbers]{{ma_inverse}} \\]
\nWe have
\n\\begin{align}
\\mathbf{A}^{-1}\\mathbf{b} &= \\simplify[fractionnumbers]{{ma_inverse}*{mb}} \\\\
&= \\simplify[fractionnumbers]{{ma_inverse*mb}}
\\end{align}
Rearrange the equation $\\mathbf{Av}=\\mathbf{b}$ to make $\\mathbf{v}$ the subject:
\n\\begin{align}
\\mathbf{A}^{-1}\\mathbf{A}\\mathbf{v} &= \\mathbf{A}^{-1}\\mathbf{b} \\\\
\\mathbf{v} &= \\mathbf{A}^{-1}\\mathbf{b} \\\\ \\\\
\\end{align}
Hence,
\n\\[ \\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\simplify[fractionnumbers]{{ma_inverse*mb}} \\]
\nThat is,
\n\\begin{align}
x &= \\simplify[fractionnumbers]{{x}}, \\\\ \\\\
y &= \\simplify[fractionnumbers]{{y}}
\\end{align}