// Numbas version: finer_feedback_settings {"name": "MATH6058 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": [{"name": "MATH6058 Linear combinations of 2 x 2 matrices", "tags": [], "metadata": {"description": "

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

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

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

\n

 

", "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

 

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noleadingminus"]}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything", "can_override": false}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "random(2..6 except p)", "description": "", "templateType": "anything", "can_override": false}, "q1": {"name": "q1", "group": "Ungrouped variables", "definition": "random(-6..6 except [0,1,-1,p1,q])", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "random(-6..6 except [0,1,-1,p1,q1])", "description": "", "templateType": "anything", "can_override": false}, "lcab": {"name": "lcab", "group": "Ungrouped variables", "definition": "p*a+q*b", "description": "", "templateType": "anything", "can_override": false}, "apb": {"name": "apb", "group": "Ungrouped variables", "definition": "a+b", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-5..5 except 0),2),2))", "description": "", "templateType": "anything", "can_override": false}, "lcabc": {"name": "lcabc", "group": "Ungrouped variables", "definition": "p1*a+q1*b+r1*c", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0],b[0][0]]),2),2))", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(-6..6 except [0,1,-1,p])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0]]),2),2))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "q1", "c", "b", "r1", "q", "p", "p1", "apb", "lcab", "lcabc"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

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

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "apb", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

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

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "lcab", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$\\var{p1}A+\\var{q1}B+\\var{r1}C = \\var{p1}\\var{a}+\\var{q1}\\var{b}+\\var{r1}\\var{c}=$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "lcabc", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Marco Vitturi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23541/"}]}]}], "contributors": [{"name": "Catherine Palmer", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/423/"}, {"name": "Marco Vitturi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/23541/"}]}