// Numbas version: exam_results_page_options {"name": "Matrix Equations", "metadata": {"description": "

Try to solve some simultaneous equations using matrix inverses.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [""], "questions": [{"name": "Alexander's copy of Solve simultaneous equations by finding inverse matrix,", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}], "variable_groups": [], "variables": {"mb": {"group": "Ungrouped variables", "templateType": "anything", "definition": "matrix([\n [random(-9..9 except 0)],\n [random(-9..9 except 0)]\n])", "description": "", "name": "mb"}, "x": {"group": "Ungrouped variables", "templateType": "anything", "definition": "(ma_inverse*mb)[0][0]", "description": "", "name": "x"}, "ma": {"group": "Ungrouped variables", "templateType": "anything", "definition": "matrix([\n [a00,a01],\n [a10,a11]\n])", "description": "

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

\n

No entry is 0.

", "name": "ma"}, "a10": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except [0,a00,-a00,a00*a11/a01])", "description": "", "name": "a10"}, "ma_inverse": {"group": "Ungrouped variables", "templateType": "anything", "definition": "matrix([\n [ma[1][1], -ma[0][1]],\n [-ma[1][0], ma[0][0]]\n])/det(ma)", "description": "", "name": "ma_inverse"}, "a01": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except 0)", "description": "", "name": "a01"}, "y": {"group": "Ungrouped variables", "templateType": "anything", "definition": "(ma_inverse*mb)[1][0]", "description": "", "name": "y"}, "a11": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except [0,a01,-a01])", "description": "", "name": "a11"}, "a00": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except 0)", "description": "", "name": "a00"}}, "ungrouped_variables": ["ma", "a00", "a01", "a10", "a11", "mb", "ma_inverse", "x", "y"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"allowFractions": true, "correctAnswer": "ma", "showCorrectAnswer": true, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "markPerCell": false, "marks": 1}, {"answer": "x", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": "0.25", "vsetrangepoints": 5}, {"answer": "y", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": false, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": "0.25", "vsetrangepoints": 5}, {"allowFractions": true, "correctAnswer": "mb", "showCorrectAnswer": true, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": 1, "tolerance": 0, "markPerCell": false, "marks": "0.5"}], "type": "gapfill", "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]]

", "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": true, "correctAnswer": "ma_inverse", "showCorrectAnswer": true, "allowResize": false, "correctAnswerFractions": true, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "markPerCell": false, "marks": "2"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

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

\n

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

", "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": true, "correctAnswer": "ma_inverse*mb", "showCorrectAnswer": true, "allowResize": false, "correctAnswerFractions": true, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": 1, "tolerance": 0, "markPerCell": false, "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

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

\n

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

", "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "showPrecisionHint": false, "allowFractions": true, "scripts": {}, "type": "numberentry", "correctAnswerFraction": true, "minValue": "x", "maxValue": "x", "marks": "0.5"}, {"showCorrectAnswer": true, "showPrecisionHint": false, "allowFractions": true, "scripts": {}, "type": "numberentry", "correctAnswerFraction": true, "minValue": "y", "maxValue": "y", "marks": "0.5"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

Finally, solve the equations.

\n

$x = $ [[0]]

\n

$y = $ [[1]]

", "marks": 0}], "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.

", "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"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

20/06/2012:

\n

Added, edited tags.

\n

Edited advice so that it gave the correct solution for $y$ (as in the answer).

\n

4/07/2012:

\n

Column vectors v and b have the bracket in the incorrect place.

\n

 

\n

10/07/2012:

\n

Added tags.

\n

Question appears to be working correctly.

\n

Column vectors v and b still have brackets in incorrect places.

\n

24/12/2012:

\n

Checked calculations, OK. Added tested1 tag.

\n

Improved display as requested above.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Putting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix. 

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "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}

"}]}], "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "contributors": [{"name": "Alexander Corner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5328/"}], "extensions": [], "custom_part_types": [], "resources": []}