// Numbas version: finer_feedback_settings {"name": "Unit 9: Question 8", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "addortakeaway", "c", "b", "da", "a1", "sc", "ab", "sb1", "b1", "test", "sb", "sa", "sc1", "sa1", "c1", "inc"], "name": "Unit 9: Question 8", "tags": ["Linear equations", "inverse of a matrix", "linear equations", "linear equations in matrix form", "matrices", "matrix", "matrix equations", "matrix form", "matrix multiplication", "multiply matrices", "multiply matrix", "solving linear equations", "system of linear equations"], "advice": "
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}\\]
\nSince $\\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}\\]
\nWe 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*} \\]
\nNote 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}\\]
\nHence \\[\\begin{eqnarray*} x&=& \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\ y&=& \\simplify[std]{{c1*a-c*a1}/{dA}} \\end{eqnarray*} \\]
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "$A = $ [[0]]
\n$v = \\;\\;\\Bigg($ | \n[[1]] | \n$\\Bigg)$ | \n
[[2]] | \n
$b = $ [[3]]
", "marks": 0, "gaps": [{"numColumns": "2", "type": "matrix", "tolerance": 0, "allowFractions": false, "scripts": {}, "markPerCell": false, "numRows": "2", "showCorrectAnswer": true, "correctAnswer": "matrix([\n [a,b],\n [a1,b1]\n])", "correctAnswerFractions": false, "marks": "0.5", "allowResize": false}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "scripts": {}, "marks": "0.25", "answer": "x", "checkingtype": "absdiff", "checkvariablenames": false, "vsetrange": [0, 1]}, {"expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "scripts": {}, "marks": "0.25", "answer": "y", "checkingtype": "absdiff", "checkvariablenames": false, "vsetrange": [0, 1]}, {"numColumns": 1, "type": "matrix", "tolerance": 0, "allowFractions": false, "scripts": {}, "markPerCell": false, "numRows": "2", "showCorrectAnswer": true, "correctAnswer": "matrix([\n [c],\n [c1]\n])", "correctAnswerFractions": false, "marks": "0.5", "allowResize": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "Find the inverse of $A$. Input all numbers as fractions or integers and not as decimals.
\n$A^{-1} = $ [[0]]
", "marks": 0, "gaps": [{"numColumns": "2", "type": "matrix", "tolerance": 0, "allowFractions": true, "scripts": {}, "markPerCell": false, "numRows": "2", "showCorrectAnswer": true, "correctAnswer": "matrix([\n [b1,-b],\n [-a1,a1]\n])/dA", "correctAnswerFractions": true, "marks": "2", "allowResize": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "$A^{-1}b = $ [[0]]
", "marks": 0, "gaps": [{"numColumns": 1, "type": "matrix", "tolerance": 0, "allowFractions": true, "scripts": {}, "markPerCell": false, "numRows": "2", "showCorrectAnswer": true, "correctAnswer": "matrix([\n [(c*b1-c1*b)/(b1*a-a1*b)],\n [(-c*a1+c1*a)/(b1*a-a1*b)]\n])", "correctAnswerFractions": true, "marks": "2", "allowResize": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\n \n \nNow solve the equations, inputting all numbers as fractions or integers and not as decimals.
$x = \\;\\;$[[0]]
$y = \\;\\;$[[1]]
\n \n \n \n ", "marks": 0, "gaps": [{"notallowed": {"message": "Input as a fraction or an integer, not as a decimal
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "marks": "1", "answer": "{c*b1-c1*b}/{b1*a-a1*b}", "checkingtype": "absdiff", "checkvariablenames": false, "vsetrange": [0, 1]}, {"notallowed": {"message": "Input as a fraction or an integer, not as a decimal
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "marks": "1", "answer": "{-c*a1+c1*a}/{b1*a-a1*b}", "checkingtype": "absdiff", "checkvariablenames": false, "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "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*} \\]
20/06/2012:
\nAdded, edited tags.
\nEdited advice so that it gave the correct solution for $y$ (as in the answer).
\n\n
\n
4/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.
\n\n9/4/15 RLCS:
\nHave altered the 2 parts v and b to be 1x2 matrices rather than rowvectors. Now works as expected.
", "description": "Based on Chapter 8, quite loosley.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"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "rhaana starling", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/460/"}]}]}], "contributors": [{"name": "rhaana starling", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/460/"}]}