// Numbas version: finer_feedback_settings {"name": "Linear combinations of 2 x 2 matrices", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a", "q1", "c", "b", "r1", "q", "p", "p1", "apb", "lcab", "lcabc"], "variables": {"lcabc": {"definition": "p1*a+q1*b+r1*c", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "lcabc"}, "q": {"definition": "random(-6..6 except [0,1,-1,p])", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "q"}, "apb": {"definition": "a+b", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "apb"}, "a": {"definition": "matrix(repeat(repeat(random(-5..5 except 0),2),2))", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "a"}, "c": {"definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0],b[0][0]]),2),2))", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "c"}, "r1": {"definition": "random(-6..6 except [0,1,-1,p1,q1])", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "r1"}, "lcab": {"definition": "p*a+q*b", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "lcab"}, "p": {"definition": "random(2..6)", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "p"}, "b": {"definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0]]),2),2))", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "b"}, "q1": {"definition": "random(-6..6 except [0,1,-1,p1,q])", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "q1"}, "p1": {"definition": "random(2..6 except p)", "description": "", "templateType": "anything", "group": "Ungrouped variables", "name": "p1"}}, "tags": [], "preamble": {"js": "", "css": ""}, "metadata": {"description": "

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

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noleadingminus"]}, "variable_groups": [], "advice": "

a)

\n

\\[ \\begin{eqnarray*} \\simplify[std]{A+B} &=&\\simplify[std]{{a}+{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*} \\simplify[std]{{p}A+{q}B} &=&\\simplify[std]{{p}{a}+{q}{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*} \\simplify[std]{{p1}A+{q1}B+{r1}C} &=&\\simplify[std]{{p1}{a}+{q1}{b}+{r1}{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

 

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

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

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

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

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

$\\simplify{{p1}A+{q1}B+{r1}C}=$ [[0]]

", "type": "gapfill", "variableReplacements": []}], "name": "Linear combinations of 2 x 2 matrices", "functions": {}, "extensions": ["stats"], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

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

\n

 

", "type": "question", "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}]}]}], "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}]}