// Numbas version: exam_results_page_options {"name": "Simon's copy of 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": [{"extensions": ["stats"], "tags": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "ungrouped_variables": ["a", "q1", "c", "b", "r1", "q", "p", "p1", "apb", "lcab", "lcabc"], "statement": "

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

\n

 

", "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "parts": [{"showCorrectAnswer": true, "prompt": "

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

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

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

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

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

", "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "sortAnswers": false, "type": "gapfill", "scripts": {}, "marks": 0, "unitTests": [], "gaps": [{"showCorrectAnswer": true, "numRows": "2", "allowResize": false, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "type": "matrix", "tolerance": 0, "correctAnswer": "lcabc", "scripts": {}, "marks": 1, "markPerCell": false, "unitTests": [], "correctAnswerFractions": false, "allowFractions": false, "numColumns": "2", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showFeedbackIcon": true}], "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "showFeedbackIcon": true}], "name": "Simon's copy of Linear combinations of 2 x 2 matrices", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noleadingminus"]}, "functions": {}, "preamble": {"js": "", "css": ""}, "variables": {"q1": {"definition": "random(-6..6 except [0,1,-1,p1,q])", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "q1"}, "c": {"definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0],b[0][0]]),2),2))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "c"}, "a": {"definition": "matrix(repeat(repeat(random(-5..5 except 0),2),2))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "a"}, "q": {"definition": "random(-6..6 except [0,1,-1,p])", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "q"}, "lcab": {"definition": "p*a+q*b", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "lcab"}, "lcabc": {"definition": "p1*a+q1*b+r1*c", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "lcabc"}, "p": {"definition": "random(2..6)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "p"}, "r1": {"definition": "random(-6..6 except [0,1,-1,p1,q1])", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "r1"}, "apb": {"definition": "a+b", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "apb"}, "b": {"definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0]]),2),2))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "b"}, "p1": {"definition": "random(2..6 except p)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "p1"}}, "advice": "

\n

To add two matrices, we simply add the corresponding elements in each matrix.

\n

To multiply a matrix by a scalar, we simply multiply every element of the matrix by that scalar.

\n

(a)

\n

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

\n

(b) 

\n

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

\n

 

", "type": "question", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}