// Numbas version: exam_results_page_options {"name": "Joseph's copy of Linear combinations of 2 x 2 matrices", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"q1": {"templateType": "anything", "description": "", "name": "q1", "definition": "random(1..6 except [0,1,-1,p1,q])", "group": "Ungrouped variables"}, "p3": {"templateType": "anything", "description": "

p2

", "name": "p3", "definition": "random(2..6 except p)", "group": "Ungrouped variables"}, "q3": {"templateType": "anything", "description": "", "name": "q3", "definition": "random(2..6 except p)", "group": "Ungrouped variables"}, "lcab": {"templateType": "anything", "description": "", "name": "lcab", "definition": "p*a+q*b", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "description": "", "name": "a", "definition": "matrix(repeat(repeat(random(-5..5 except 0),2),2))", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "description": "", "name": "c", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0],b[0][0]]),2),2))", "group": "Ungrouped variables"}, "p1": {"templateType": "anything", "description": "", "name": "p1", "definition": "random(2..6 except p)", "group": "Ungrouped variables"}, "p": {"templateType": "anything", "description": "", "name": "p", "definition": "random(2..6)", "group": "Ungrouped variables"}, "r1": {"templateType": "anything", "description": "", "name": "r1", "definition": "random(1..6 except [0,1,-1,p1,q1])", "group": "Ungrouped variables"}, "lcabc2": {"templateType": "anything", "description": "

cabc

", "name": "lcabc2", "definition": "p1*a+q2*b+q1*c", "group": "Ungrouped variables"}, "q": {"templateType": "anything", "description": "", "name": "q", "definition": "random(1..6 except [0,1,-1,p])", "group": "Ungrouped variables"}, "apb2": {"templateType": "anything", "description": "

apb

", "name": "apb2", "definition": "p3*a + q3*b", "group": "Ungrouped variables"}, "lcabc": {"templateType": "anything", "description": "", "name": "lcabc", "definition": "p1*a+q1*b-r1*c", "group": "Ungrouped variables"}, "q2": {"templateType": "anything", "description": "

q

", "name": "q2", "definition": "random(-6..6 except [0,1,-1,p])", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "description": "", "name": "b", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0]]),2),2))", "group": "Ungrouped variables"}, "p2": {"templateType": "anything", "description": "", "name": "p2", "definition": "random(2..10 except p1)", "group": "Ungrouped variables"}, "apb": {"templateType": "anything", "description": "", "name": "apb", "definition": "a+b", "group": "Ungrouped variables"}, "apb1": {"templateType": "anything", "description": "

apb

", "name": "apb1", "definition": "p2*a + q2*b", "group": "Ungrouped variables"}}, "preamble": {"js": "", "css": ""}, "functions": {}, "statement": "

Let
\$A=\\simplify{{a}},\\;\\; B=\\simplify{{b}},\\;\\; C=\\simplify{{c}}\$
Calculate the following $2 \\times 2$ matrices:

\n

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noleadingminus"]}, "extensions": ["stats"], "tags": [], "metadata": {"description": "

Linear combinations of $2 \\times 2$ matrices. Three examples.

#### a)

\n

\$\\begin{eqnarray*} \\mathrm{A}+\\mathrm{B} &=& \\simplify{{a}} +\\simplify{{b}} \\\\ &=& \\begin{pmatrix} \\simplify[std]{{a[0][0]}+{b[0][0]}}& \\simplify[std]{{a[0][1]}+{b[0][1]}}\\\\ \\simplify[std]{{a[1][0]}+{b[1][0]}}&\\simplify[std]{{a[1][1]}+{b[1][1]}} \\end{pmatrix}\\\\ &=&\\simplify{{apb}}\\\\ \\end{eqnarray*} \$

\n

#### b)

\n

\$\\begin{eqnarray*} \\var{p}\\mathrm{A} + \\var{q} \\mathrm{B} &=& \\var{P}\\simplify{{a}} +\\var{q}\\simplify{{b}} \\\\ &=& \\begin{pmatrix} \\simplify[!std]{{p}*{a[0][0]}+{q}*{b[0][0]}}& \\simplify[!std]{{p}*{a[0][1]}+{q}*{b[0][1]}}\\\\ \\simplify[!std]{{p}*{a[1][0]}+{q}*{b[1][0]}}&\\simplify[!std]{{p}*{a[1][1]}+{q}*{b[1][1]}} \\end{pmatrix}\\\\ &=&\\simplify{{lcab}}\\\\ \\end{eqnarray*} \$

\n

#### c)

\n

\$\\begin{eqnarray*} \\var{p1}\\mathrm{A}+\\var{q1}\\mathrm{B} - \\var{r1}\\mathrm{C} &=& \\var{P}\\simplify{{a}} +\\var{q}\\simplify{{b}} -\\var{r1}\\simplify{{c}} \\\\ &=& \\begin{pmatrix} \\simplify[!std]{{p1}*{a[0][0]}+{q1}*{b[0][0]}-{r1}*{c[0][0]}}& \\simplify[!std]{{p1}*{a[0][1]}+{q1}*{b[0][1]}-{r1}*{c[0][1]}}\\\\ \\simplify[!std]{{p1}*{a[1][0]}+{q1}*{b[1][0]}-{r1}*{c[1][0]}}&\\simplify[!std]{{p1}*{a[1][1]}+{q1}*{b[1][1]}-{r1}*{c[1][1]}} \\end{pmatrix}\\\\ &=&\\simplify{{lcabc}}\\\\ \\end{eqnarray*} \$

\n

", "ungrouped_variables": ["a", "q1", "c", "b", "r1", "q", "p", "p1", "apb", "lcab", "lcabc", "p2", "q2", "apb1", "p3", "q3", "apb2", "lcabc2"], "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Joseph's copy of Linear combinations of 2 x 2 matrices", "parts": [{"variableReplacementStrategy": "originalfirst", "type": "gapfill", "sortAnswers": false, "showFeedbackIcon": true, "unitTests": [], "customMarkingAlgorithm": "", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "prompt": "

$\\mathrm{A}+\\mathrm{B} =$ [[0]]

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

$\\var{p}\\mathrm{A} + \\var{q} \\mathrm{B}$ = [[0]]

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

$\\var{p1}\\mathrm{A}+\\var{q1}\\mathrm{B} - \\var{r1}\\mathrm{C} =$ [[0]]

\n

", "scripts": {}, "marks": 0, "variableReplacements": [], "gaps": [{"type": "matrix", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "numColumns": "2", "correctAnswerFractions": false, "allowFractions": false, "allowResize": false, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "numRows": "2", "marks": 1, "markPerCell": false, "tolerance": 0, "customMarkingAlgorithm": "", "scripts": {}, "variableReplacements": [], "correctAnswer": "lcabc"}]}], "type": "question", "contributors": [{"name": "Joseph Clarke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2455/"}]}]}], "contributors": [{"name": "Joseph Clarke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2455/"}]}