// Numbas version: finer_feedback_settings {"name": "Clodagh's copy of Ex 1 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": "Clodagh's copy of Ex 1 Linear combinations of 2 x 2 matrices", "extensions": ["stats"], "parts": [{"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "customName": "", "unitTests": [], "adaptiveMarkingPenalty": 0, "extendBaseMarkingAlgorithm": true, "useCustomName": false, "sortAnswers": false, "prompt": "
$\\mathrm{A}$+$\\mathrm{B}$ = [[0]]
", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "gaps": [{"correctAnswer": "a_plus_b", "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "allowFractions": false, "numColumns": "2", "showFeedbackIcon": true, "customName": "", "unitTests": [], "adaptiveMarkingPenalty": 0, "extendBaseMarkingAlgorithm": true, "useCustomName": false, "numRows": "2", "correctAnswerFractions": false, "type": "matrix", "scripts": {}, "marks": "0.2", "showCorrectAnswer": true, "allowResize": false, "markPerCell": false, "variableReplacements": [], "tolerance": 0}], "variableReplacements": []}, {"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "customName": "", "unitTests": [], "adaptiveMarkingPenalty": 0, "extendBaseMarkingAlgorithm": true, "useCustomName": false, "sortAnswers": false, "prompt": "$\\simplify{{p}A+{q}B} = $ [[0]]
", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "gaps": [{"correctAnswer": "linear_combination_a_and_b", "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "allowFractions": false, "numColumns": "2", "showFeedbackIcon": true, "customName": "", "unitTests": [], "adaptiveMarkingPenalty": 0, "extendBaseMarkingAlgorithm": true, "useCustomName": false, "numRows": "2", "correctAnswerFractions": false, "type": "matrix", "scripts": {}, "marks": "0.4", "showCorrectAnswer": true, "allowResize": false, "markPerCell": false, "variableReplacements": [], "tolerance": 0}], "variableReplacements": []}, {"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "customName": "", "unitTests": [], "adaptiveMarkingPenalty": 0, "extendBaseMarkingAlgorithm": true, "useCustomName": false, "sortAnswers": false, "prompt": "$\\simplify{{p1}A+{q1}B+{r1}C}=$ [[0]]
", "type": "gapfill", "scripts": {}, "marks": 0, "showCorrectAnswer": true, "gaps": [{"correctAnswer": "linear_combination_a_b_and_c", "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "allowFractions": false, "numColumns": "2", "showFeedbackIcon": true, "customName": "", "unitTests": [], "adaptiveMarkingPenalty": 0, "extendBaseMarkingAlgorithm": true, "useCustomName": false, "numRows": "2", "correctAnswerFractions": false, "type": "matrix", "scripts": {}, "marks": "0.6", "showCorrectAnswer": true, "allowResize": false, "markPerCell": false, "variableReplacements": [], "tolerance": 0}], "variableReplacements": []}], "statement": "Let
\\[A=\\simplify{{a}},\\;\\; B=\\simplify{{b}},\\;\\; C=\\simplify{{c}}\\]
Calculate the following $2 \\times 2$ matrices:
", "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noleadingminus"]}, "advice": "
\n
a)
\n\\[ \\begin{eqnarray*} A+B &=& \\var{a}+\\var{b}\\\\ &=& \\begin{pmatrix} \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{a[0][0]}+{b[0][0]}}& \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{a[0][1]}+{b[0][1]}}\\\\ \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{a[1][0]}+{b[1][0]}}&\\simplify[!basic,!collectNumbers,!noLeadingMinus]{{a[1][1]}+{b[1][1]}} \\end{pmatrix}\\\\ &=& \\var{a_plus_b}\\\\ \\end{eqnarray*} \\]
\n\n\\[ \\begin{eqnarray*} \\simplify{{p}A+{q}B} &=& \\var{p}\\var{a} \\simplify[!basic]{+{q}}\\var{b}\\\\ &=& \\begin{pmatrix} \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{p}*{a[0][0]}}& \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{p}*{a[0][1]}}\\\\ \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{p}*{a[1][0]}}&\\simplify[!basic,!collectNumbers,!noLeadingMinus]{{p}*{a[1][1]}} \\end{pmatrix} + \\begin{pmatrix} \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{q}*{b[0][0]}} & \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{q}*{b[0][1]}}\\\\ \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{q}*{b[1][0]}} & \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{q}*{b[1][1]}} \\end{pmatrix}\\\\ &=& \\var{{p}*{a}}+\\var{{q}*{b}}\\\\ &=& \\begin{pmatrix} \\simplify[!collectNumbers,!noLeadingMinus]{{p*a[0][0]}+{q*b[0][0]}} & \\simplify[!collectNumbers,!noLeadingMinus]{{p*a[0][1]}+{q*b[0][1]}}\\\\ \\simplify[!collectNumbers,!noLeadingMinus]{{p*a[1][0]}+{q*b[1][0]}} & \\simplify[!collectNumbers,!noLeadingMinus]{{p*a[1][1]}+{q*b[1][1]}} \\end{pmatrix} \\\\ &=&\\var{linear_combination_a_and_b}\\\\ \\end{eqnarray*} \\]
\nc)
\n\\[ \\begin{eqnarray*} \\simplify{{p1}A+{q1}B+{r1}C} &=&\\var{{p1}}\\var{a}\\simplify[!basic]{+{q1}}\\var{b}\\simplify[!basic]{+{r1}}\\var{c}\\\\ &=& \\begin{pmatrix} \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{p1}*{a[0][0]}}& \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{p1}*{a[0][1]}}\\\\ \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{p1}*{a[1][0]}}&\\simplify[!basic,!collectNumbers,!noLeadingMinus]{{p1}*{a[1][1]}} \\end{pmatrix} + \\begin{pmatrix} \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{q1}*{b[0][0]}} & \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{q1}*{b[0][1]}}\\\\ \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{q1}*{b[1][0]}} & \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{q1}*{b[1][1]}} \\end{pmatrix} + \\begin{pmatrix} \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{r1}*{c[0][0]}} & \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{r1}*{c[0][1]}}\\\\ \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{r1}*{c[1][0]}} & \\simplify[!basic,!collectNumbers,!noLeadingMinus]{{r1}*{c[1][1]}} \\end{pmatrix} \\\\ &=&\\var{{p1}*{a}}+\\var{{q1}*{b}}+\\var{{r1}*{c}}\\\\ &=& \\begin{pmatrix} \\simplify[!collectNumbers,!noLeadingMinus]{{p1*a[0][0]}+{q1*b[0][0]}+{r1*c[0][0]}} & \\simplify[!collectNumbers,!noLeadingMinus]{{p1*a[0][1]}+{q1*b[0][1]}+{r1*c[0][1]}}\\\\ \\simplify[!collectNumbers,!noLeadingMinus]{{p1*a[1][0]}+{q1*b[1][0]}+{r1*c[1][0]}} & \\simplify[!collectNumbers,!noLeadingMinus]{{p1*a[1][1]}+{q1*b[1][1]}+{r1*c[1][1]}} \\end{pmatrix} \\\\ &=&\\var{linear_combination_a_b_and_c}\\\\ \\end{eqnarray*} \\]
\n\n\n
", "variable_groups": [], "preamble": {"js": "", "css": ""}, "variables": {"linear_combination_a_and_b": {"name": "linear_combination_a_and_b", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "p*a+q*b"}, "c": {"name": "c", "group": "Ungrouped variables", "description": "
randomly generated 2x2 matrix, different to A and B
", "templateType": "anything", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0],b[0][0]]),2),2))"}, "linear_combination_a_b_and_c": {"name": "linear_combination_a_b_and_c", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "p1*a+q1*b+r1*c"}, "a_plus_b": {"name": "a_plus_b", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "a+b"}, "a": {"name": "a", "group": "Ungrouped variables", "description": "randomly generated 2x2 matrix
", "templateType": "anything", "definition": "matrix(repeat(repeat(random(-5..5 except 0),2),2))"}, "q": {"name": "q", "group": "Ungrouped variables", "description": "constant multiple of matrix B to combine with multiple of A
", "templateType": "anything", "definition": "random(-6..6 except [0,1,-1,p])"}, "q1": {"name": "q1", "group": "Ungrouped variables", "description": "constant multiple of matrix B (to combine with A and C)
", "templateType": "anything", "definition": "random(-6..6 except [0,1,-1,p1,q])"}, "p": {"name": "p", "group": "Ungrouped variables", "description": "constant multiple of matrix A
", "templateType": "anything", "definition": "random(2..6)"}, "p1": {"name": "p1", "group": "Ungrouped variables", "description": "constant multiple of matrix A (to combine with B and C)
", "templateType": "anything", "definition": "random(2..6 except p)"}, "b": {"name": "b", "group": "Ungrouped variables", "description": "randomly generated 2x2 matrix (different to A)
", "templateType": "anything", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0]]),2),2))"}, "r1": {"name": "r1", "group": "Ungrouped variables", "description": "constant multiple of matrix C (to combine with A and B)
", "templateType": "anything", "definition": "random(-6..6 except [0,1,-1,p1,q1])"}}, "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", "a_plus_b", "linear_combination_a_and_b", "linear_combination_a_b_and_c"], "type": "question", "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}]}]}], "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}]}