// Numbas version: exam_results_page_options {"name": "Ex 1 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": [{"statement": "

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

\n

", "name": "Ex 1 Linear combinations of 2 x 2 matrices", "variables": {"lcabc": {"name": "lcabc", "description": "", "definition": "p1*a+q1*b+r1*c", "group": "Ungrouped variables", "templateType": "anything"}, "p": {"name": "p", "description": "", "definition": "random(2..6)", "group": "Ungrouped variables", "templateType": "anything"}, "a": {"name": "a", "description": "", "definition": "matrix(repeat(repeat(random(-5..5 except 0),2),2))", "group": "Ungrouped variables", "templateType": "anything"}, "p1": {"name": "p1", "description": "", "definition": "random(2..6 except p)", "group": "Ungrouped variables", "templateType": "anything"}, "apb": {"name": "apb", "description": "", "definition": "a+b", "group": "Ungrouped variables", "templateType": "anything"}, "b": {"name": "b", "description": "", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0]]),2),2))", "group": "Ungrouped variables", "templateType": "anything"}, "q1": {"name": "q1", "description": "", "definition": "random(-6..6 except [0,1,-1,p1,q])", "group": "Ungrouped variables", "templateType": "anything"}, "c": {"name": "c", "description": "", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0],b[0][0]]),2),2))", "group": "Ungrouped variables", "templateType": "anything"}, "q": {"name": "q", "description": "", "definition": "random(-6..6 except [0,1,-1,p])", "group": "Ungrouped variables", "templateType": "anything"}, "lcab": {"name": "lcab", "description": "", "definition": "p*a+q*b", "group": "Ungrouped variables", "templateType": "anything"}, "r1": {"name": "r1", "description": "", "definition": "random(-6..6 except [0,1,-1,p1,q1])", "group": "Ungrouped variables", "templateType": "anything"}}, "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["a", "q1", "c", "b", "r1", "q", "p", "p1", "apb", "lcab", "lcabc"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

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

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

", "variableReplacements": []}, {"showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"showFeedbackIcon": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "numRows": "2", "type": "matrix", "tolerance": 0, "numColumns": "2", "scripts": {}, "allowFractions": false, "variableReplacements": [], "correctAnswerFractions": false, "marks": 1, "correctAnswer": "lcab", "markPerCell": false, "allowResize": false}], "type": "gapfill", "scripts": {}, "prompt": "$\\simplify{{p}A+{q}B = {p}{a}+{q}{b}}=$ [[0]]", "variableReplacements": []}, {"showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"showFeedbackIcon": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "numRows": "2", "type": "matrix", "tolerance": 0, "numColumns": "2", "scripts": {}, "allowFractions": false, "variableReplacements": [], "correctAnswerFractions": false, "marks": 1, "correctAnswer": "lcabc", "markPerCell": false, "allowResize": false}], "type": "gapfill", "scripts": {}, "prompt": "

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

", "variableReplacements": []}], "functions": {}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noleadingminus"]}, "preamble": {"css": "", "js": ""}, "extensions": ["stats"], "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

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