// Numbas version: exam_results_page_options {"name": "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": [{"preamble": {"js": "", "css": ""}, "ungrouped_variables": ["ma", "a00", "a01", "a10", "a11", "mb", "ma_inverse", "x", "y"], "parts": [{"showCorrectAnswer": true, "prompt": "

$\\mathbf{A} = $ [[0]]

\n
$\\mathbf{v} = $ \n
\n
\n \n \n \n \n \n \n \n \n \n \n
[[1]]
[[2]]
\n \n
\n
\n

$\\mathbf{b} = $ [[3]]

", "gaps": [{"showCorrectAnswer": true, "marks": 1, "numColumns": "2", "numRows": "2", "correctAnswerFractions": false, "showFeedbackIcon": true, "variableReplacements": [], "type": "matrix", "tolerance": 0, "allowResize": false, "allowFractions": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "markPerCell": false, "correctAnswer": "ma", "customMarkingAlgorithm": ""}, {"showCorrectAnswer": true, "answer": "x", "marks": "0.25", "checkVariableNames": false, "failureRate": 1, "vsetRange": [0, 1], "showFeedbackIcon": true, "variableReplacements": [], "type": "jme", "vsetRangePoints": 5, "checkingType": "absdiff", "showPreview": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "checkingAccuracy": 0.001, "expectedVariableNames": [], "customMarkingAlgorithm": ""}, {"showCorrectAnswer": true, "answer": "y", "marks": "0.25", "checkVariableNames": false, "failureRate": 1, "vsetRange": [0, 1], "showFeedbackIcon": true, "variableReplacements": [], "type": "jme", "vsetRangePoints": 5, "checkingType": "absdiff", "showPreview": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "checkingAccuracy": 0.001, "expectedVariableNames": [], "customMarkingAlgorithm": ""}, {"showCorrectAnswer": true, "marks": "0.5", "numColumns": 1, "numRows": "2", "correctAnswerFractions": false, "showFeedbackIcon": true, "variableReplacements": [], "type": "matrix", "tolerance": 0, "allowResize": false, "allowFractions": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "markPerCell": false, "correctAnswer": "mb", "customMarkingAlgorithm": ""}], "marks": 0, "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill", "sortAnswers": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "customMarkingAlgorithm": ""}, {"showCorrectAnswer": true, "prompt": "

Find the inverse of $\\mathbf{A}$.

\n

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

", "gaps": [{"showCorrectAnswer": true, "marks": "2", "numColumns": "2", "numRows": "2", "correctAnswerFractions": true, "showFeedbackIcon": true, "variableReplacements": [], "type": "matrix", "tolerance": 0, "allowResize": false, "allowFractions": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "markPerCell": false, "correctAnswer": "ma_inverse", "customMarkingAlgorithm": ""}], "marks": 0, "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill", "sortAnswers": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "customMarkingAlgorithm": ""}, {"showCorrectAnswer": true, "prompt": "

Now find $\\mathbf{A}^{-1}\\mathbf{b}$.

\n

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

", "gaps": [{"showCorrectAnswer": true, "marks": 1, "numColumns": 1, "numRows": "2", "correctAnswerFractions": true, "showFeedbackIcon": true, "variableReplacements": [], "type": "matrix", "tolerance": 0, "allowResize": false, "allowFractions": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "markPerCell": false, "correctAnswer": "ma_inverse*mb", "customMarkingAlgorithm": ""}], "marks": 0, "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill", "sortAnswers": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "customMarkingAlgorithm": ""}, {"showCorrectAnswer": true, "prompt": "

Finally, solve the equations.

\n

$x = $ [[0]]

\n

$y = $ [[1]]

", "gaps": [{"showCorrectAnswer": true, "correctAnswerStyle": "plain", "correctAnswerFraction": true, "marks": "0.5", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "variableReplacements": [], "type": "numberentry", "mustBeReducedPC": 0, "allowFractions": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "x", "minValue": "x", "customMarkingAlgorithm": ""}, {"showCorrectAnswer": true, "correctAnswerStyle": "plain", "correctAnswerFraction": true, "marks": "0.5", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "variableReplacements": [], "type": "numberentry", "mustBeReducedPC": 0, "allowFractions": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "y", "minValue": "y", "customMarkingAlgorithm": ""}], "marks": 0, "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill", "sortAnswers": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "customMarkingAlgorithm": ""}], "statement": "

Rewrite the following system of equations as a matrix equation

\n

\\[ \\mathbf{Av} = \\mathbf{b} \\]

\n

for 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}

\n

Input all numbers as fractions or integers and not as decimals.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

a)

\n

The equations can be written in the matrix form

\n

\\[ \\var{ma}\\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\var{mb} \\]

\n

b)

\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}} \\]

\n

c)

\n

We have 

\n

\\begin{align}
\\mathbf{A}^{-1}\\mathbf{b} &= \\simplify[fractionnumbers]{{ma_inverse}*{mb}} \\\\
&= \\simplify[fractionnumbers]{{ma_inverse*mb}}
\\end{align}

\n

d)

\n

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}

\n

Hence,

\n

\\[ \\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\simplify[fractionnumbers]{{ma_inverse*mb}} \\]

\n

That is,

\n

\\begin{align}
x &= \\simplify[fractionnumbers]{{x}}, \\\\ \\\\
y &= \\simplify[fractionnumbers]{{y}}
\\end{align}

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "functions": {}, "tags": [], "name": "Solve simultaneous equations by finding inverse matrix", "metadata": {"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"}, "extensions": [], "variables": {"a00": {"group": "Ungrouped variables", "description": "", "definition": "random(-9..9 except 0)", "name": "a00", "templateType": "anything"}, "ma": {"group": "Ungrouped variables", "description": "

Matrix A. a10 is picked so it's non-singular, and a11 is never $\\pm a01$.

\n

No entry is 0.

", "definition": "matrix([\n [a00,a01],\n [a10,a11]\n])", "name": "ma", "templateType": "anything"}, "a10": {"group": "Ungrouped variables", "description": "", "definition": "random(-9..9 except [0,a00,-a00,a00*a11/a01])", "name": "a10", "templateType": "anything"}, "x": {"group": "Ungrouped variables", "description": "", "definition": "(ma_inverse*mb)[0][0]", "name": "x", "templateType": "anything"}, "ma_inverse": {"group": "Ungrouped variables", "description": "", "definition": "matrix([\n [ma[1][1], -ma[0][1]],\n [-ma[1][0], ma[0][0]]\n])/det(ma)", "name": "ma_inverse", "templateType": "anything"}, "a11": {"group": "Ungrouped variables", "description": "", "definition": "random(-9..9 except [0,a01,-a01])", "name": "a11", "templateType": "anything"}, "a01": {"group": "Ungrouped variables", "description": "", "definition": "random(-9..9 except 0)", "name": "a01", "templateType": "anything"}, "mb": {"group": "Ungrouped variables", "description": "", "definition": "matrix([\n [random(-9..9 except 0)],\n [random(-9..9 except 0)]\n])", "name": "mb", "templateType": "anything"}, "y": {"group": "Ungrouped variables", "description": "", "definition": "(ma_inverse*mb)[1][0]", "name": "y", "templateType": "anything"}}, "type": "question", "contributors": [{"name": "Blathnaid Sheridan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/447/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Morteza Shahpari", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2886/"}]}]}], "contributors": [{"name": "Blathnaid Sheridan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/447/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Morteza Shahpari", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2886/"}]}