// Numbas version: exam_results_page_options {"name": "Andrew's copy of Matrices: Inverse Matrix Method ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "tags": [], "functions": {}, "parts": [{"gaps": [{"allowFractions": false, "marks": 1, "tolerance": 0, "numColumns": "2", "markPerCell": true, "allowResize": false, "showFeedbackIcon": true, "correctAnswer": "matrix([\n [a,b],\n [a1,b1]\n])", "numRows": "2", "correctAnswerFractions": false, "type": "matrix", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}, {"checkingtype": "absdiff", "marks": "0.25", "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "x", "type": "jme", "variableReplacements": [], "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"checkingtype": "absdiff", "marks": "0.25", "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "y", "type": "jme", "variableReplacements": [], "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"allowFractions": true, "marks": "0.5", "tolerance": 0, "numColumns": 1, "markPerCell": true, "allowResize": false, "showFeedbackIcon": true, "correctAnswer": "matrix([\n [c],\n [c1]\n])", "numRows": "2", "correctAnswerFractions": true, "type": "matrix", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "prompt": "

$A = $ [[0]]

\n\n\n\n\n\n\n\n\n\n\n\n
$v = \\;\\;\\Bigg($[[1]]$\\Bigg)$
[[2]]
\n

$b = $ [[3]]

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}, {"gaps": [{"allowFractions": true, "marks": "2", "tolerance": 0, "numColumns": "2", "markPerCell": true, "allowResize": false, "showFeedbackIcon": true, "correctAnswer": "matrix([\n [b1,-b],\n [-a1,a]\n])", "numRows": "2", "correctAnswerFractions": true, "type": "matrix", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}, {"checkingtype": "absdiff", "marks": 1, "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "1/{da}", "type": "jme", "variableReplacements": [], "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "prompt": "

Find the inverse of $A$. Input all numbers as fractions or integers and not as decimals. Simplify your fractions as much as possible!

\n

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

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}, {"gaps": [{"allowFractions": true, "marks": 1, "tolerance": 0, "numColumns": 1, "markPerCell": true, "allowResize": false, "showFeedbackIcon": true, "correctAnswer": "matrix([{c*b1-c1*b}/{b1*a-a1*b}],[{-c*a1+c1*a}/{b1*a-a1*b}])", "numRows": "2", "correctAnswerFractions": true, "type": "matrix", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "prompt": "

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

", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}, {"gaps": [{"checkingtype": "absdiff", "marks": 0.5, "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "{c*b1-c1*b}/{b1*a-a1*b}", "notallowed": {"message": "

Input as a fraction or an integer, not as a decimal

", "strings": ["."], "partialCredit": 0, "showStrings": false}, "type": "jme", "variableReplacements": [], "answersimplification": "std", "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}, {"checkingtype": "absdiff", "marks": 0.5, "expectedvariablenames": [], "vsetrangepoints": 5, "vsetrange": [0, 1], "showFeedbackIcon": true, "checkingaccuracy": 0.001, "answer": "{-c*a1+c1*a}/{b1*a-a1*b}", "notallowed": {"message": "

Input as a fraction or an integer, not as a decimal

", "strings": ["."], "partialCredit": 0, "showStrings": false}, "type": "jme", "variableReplacements": [], "answersimplification": "std", "showpreview": true, "scripts": {}, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "prompt": "\n \n \n

Now solve the equations, inputting all numbers as fractions or integers and not as decimals.
$x = \\;\\;$[[0]]

\n \n \n \n

$y = \\;\\;$[[1]]

\n \n \n \n ", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "marks": 0}], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "addortakeaway", "c", "b", "da", "a1", "sc", "ab", "sb1", "b1", "test", "sb", "sa", "sc1", "sa1", "c1", "inc"], "extensions": [], "statement": "

Write the following equations as a matrix equation
\\[Av=b\\]for a matrix $A$ and column vectors $v$ and $b$
\\[ \\begin{eqnarray*} \\simplify[std]{{a}x+{b}y}&=&\\var{c}\\\\ \\simplify[std]{{a1}x+{b1}y}&=&\\var{c1} \\end{eqnarray*} \\]

", "metadata": {"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. 

"}, "variables": {"c": {"definition": "sc*random(1..9)", "templateType": "anything", "description": "", "name": "c", "group": "Ungrouped variables"}, "sc1": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sc1", "group": "Ungrouped variables"}, "sa1": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sa1", "group": "Ungrouped variables"}, "sb1": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sb1", "group": "Ungrouped variables"}, "b": {"definition": "sb*random(1..9)", "templateType": "anything", "description": "", "name": "b", "group": "Ungrouped variables"}, "sb": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sb", "group": "Ungrouped variables"}, "b1": {"definition": "if(ab=1,sb1*random(2..9),if(ab=2 or ab=4 or ab=8,sb1*random(1,3,5,7,9), if(ab=3 or ab=6 or ab=9,sb1*random(1,2,4,5,6,8),if(ab=5,sb1*random(1,2,3,4,6,7,8,9),sb1*random(1,2,3,4,5,6,8,9)))))", "templateType": "anything", "description": "", "name": "b1", "group": "Ungrouped variables"}, "a": {"definition": "sa*random(1..9)", "templateType": "anything", "description": "", "name": "a", "group": "Ungrouped variables"}, "test": {"definition": "round(a*b1/b)", "templateType": "anything", "description": "", "name": "test", "group": "Ungrouped variables"}, "sa": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sa", "group": "Ungrouped variables"}, "ab": {"definition": "abs(b)", "templateType": "anything", "description": "", "name": "ab", "group": "Ungrouped variables"}, "inc": {"definition": "sa*random(1..9)", "templateType": "anything", "description": "", "name": "inc", "group": "Ungrouped variables"}, "a1": {"definition": "if(test+inc=0,test+inc+1,test+inc)", "templateType": "anything", "description": "", "name": "a1", "group": "Ungrouped variables"}, "c1": {"definition": "sc1*random(1..9)", "templateType": "anything", "description": "", "name": "c1", "group": "Ungrouped variables"}, "addortakeaway": {"definition": "if(b*b1<0,'add the equation','take away the equation')", "templateType": "anything", "description": "", "name": "addortakeaway", "group": "Ungrouped variables"}, "da": {"definition": "a*b1-a1*b", "templateType": "anything", "description": "", "name": "da", "group": "Ungrouped variables"}, "sc": {"definition": "random(1,-1)", "templateType": "anything", "description": "", "name": "sc", "group": "Ungrouped variables"}}, "name": "Andrew's copy of Matrices: Inverse Matrix Method ", "advice": "

a)

\n

The equations can be written in the matrix form:

\n

\\[\\begin{pmatrix} \\var{a} & \\var{b}\\\\ \\var{a1}&\\var{b1} \\end{pmatrix} \\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\begin{pmatrix} \\var{c} \\\\ \\var{c1} \\end{pmatrix}\\]

\n

b)

\n

Since $\\mathrm{det}(A) = \\simplify[]{{a}*{b1}-{b}*{a1}={dA}} \\neq 0$, $A$ is invertible and

\n

\\[A^{-1} = \\begin{pmatrix} \\simplify[std]{{b1}/{dA}}&\\simplify[std]{{-b}/{dA}}\\\\\\simplify[std]{{-a1}/{dA}}&\\simplify[std]{{a}/{dA}} \\end{pmatrix}\\]

\n

c)

\n

We have:

\n

\\[ \\begin{eqnarray*} A^{-1}b &=& \\begin{pmatrix} \\simplify[std]{{b1}/{dA}}&\\simplify[std]{{-b}/{dA}}\\\\\\simplify[std]{{-a1}/{dA}}&\\simplify[std]{{a}/{dA}} \\end{pmatrix}\\begin{pmatrix} \\var{c}\\\\\\var{c1}\\end{pmatrix} \\\\ &=& \\begin{pmatrix} \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\\\simplify[std]{{c1*a-c*a1}/{dA}}\\end{pmatrix} \\end{eqnarray*} \\]

\n

d)

\n

Note that $Av = b \\Rightarrow v = A^{-1}b$ hence we can read the solution from the last part as this gives:

\n

\\[\\begin{pmatrix} x\\\\y \\end{pmatrix} = \\begin{pmatrix} \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\ \\simplify[std]{{c1*a-c*a1}/{dA}}\\end{pmatrix}\\]

\n

Hence \\[\\begin{eqnarray*} x&=& \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\ y&=& \\simplify[std]{{c1*a-c*a1}/{dA}} \\end{eqnarray*} \\]

", "type": "question", "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}]}], "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}