// Numbas version: exam_results_page_options {"name": "Morteza's copy of Solve simultaneous equations by Crammer's method", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "variableReplacements": [], "maxValue": "a00*a11-a01*a10", "correctAnswerFraction": false, "type": "numberentry", "prompt": "

Find the determinant of $\\left[\\begin{array}{cc}a & b\\\\c & d \\end{array}\\right]$: 

\n

", "marks": 1, "mustBeReduced": false, "unitTests": [], "minValue": "a00*a11-a01*a10", "extendBaseMarkingAlgorithm": true, "allowFractions": false, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "scripts": {}, "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill", "prompt": "

Finally, solve the equations.

\n

$x = $ [[0]]

\n

$y = $ [[1]]

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

Solve the following system of equations by using the Crammer's method:

\n

$ x =\\frac{{\\left|\\begin{array}{cc}v_1 & b\\\\v_2 & d \\end{array}\\right|}}{\\left|\\begin{array}{cc}a & b\\\\c & d \\end{array}\\right|}$

\n

and 

\n

$y =\\frac{{\\left|\\begin{array}{cc}a & v_1\\\\c & v_2 \\end{array}\\right|}}{\\left|\\begin{array}{cc}a & b\\\\c & d \\end{array}\\right|}$

\n

\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.

", "name": "Morteza's copy of Solve simultaneous equations by Crammer's method", "preamble": {"css": "", "js": ""}, "functions": {}, "extensions": [], "advice": "

a) 

\n

$\\left|\\begin{array}{cc}a & b\\\\c & d \\end{array}\\right| =a d-bc = simplify[]{ {ma[0][0]}*{ma[1][1]} - {ma[0][1]}*{ma[1][0]}}$ 

\n

\n

b)

\n

\\[ x =\\frac{{\\left|\\begin{array}{cc}v_1 & b\\\\v_2 & d \\end{array}\\right|}}{\\left|\\begin{array}{cc}a & b\\\\c & d \\end{array}\\right|}\\]

\n

and 

\n

\\[ y =\\frac{{\\left|\\begin{array}{cc}a & v_1\\\\c & v_2 \\end{array}\\right|}}{\\left|\\begin{array}{cc}a & b\\\\c & d \\end{array}\\right|}\\]

\n

 

\n

", "variables": {"mb": {"definition": "matrix([\n [random(-9..9 except 0)],\n [random(-9..9 except 0)]\n])", "description": "", "group": "Ungrouped variables", "name": "mb", "templateType": "anything"}, "a10": {"definition": "random(-9..9 except [0,a00,-a00,a00*a11/a01])", "description": "", "group": "Ungrouped variables", "name": "a10", "templateType": "anything"}, "ma_inverse": {"definition": "matrix([\n [ma[1][1], -ma[0][1]],\n [-ma[1][0], ma[0][0]]\n])/det(ma)", "description": "", "group": "Ungrouped variables", "name": "ma_inverse", "templateType": "anything"}, "a01": {"definition": "random(-9..9 except 0)", "description": "", "group": "Ungrouped variables", "name": "a01", "templateType": "anything"}, "x": {"definition": "(ma_inverse*mb)[0][0]", "description": "", "group": "Ungrouped variables", "name": "x", "templateType": "anything"}, "ma": {"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.

", "group": "Ungrouped variables", "name": "ma", "templateType": "anything"}, "a00": {"definition": "random(-9..9 except 0)", "description": "", "group": "Ungrouped variables", "name": "a00", "templateType": "anything"}, "a11": {"definition": "random(-9..9 except [0,a01,-a01])", "description": "", "group": "Ungrouped variables", "name": "a11", "templateType": "anything"}, "y": {"definition": "(ma_inverse*mb)[1][0]", "description": "", "group": "Ungrouped variables", "name": "y", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["ma", "a00", "a01", "a10", "a11", "mb", "ma_inverse", "x", "y"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "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/"}]}