// Numbas version: exam_results_page_options {"name": "Matrix Multiplication", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Matrix Multiplication", "tags": [], "metadata": {"description": "

Multiplication of $2 \\times 2$ matrices.

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

Do the following matrix problems
Let
\$A=\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix},\\;\\;\n \n B=\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix},\\;\\;\n \n C=\\begin{pmatrix} \\var{c11}&\\var{c12}\\\\ \\var{c21}&\\var{c22}\\\\ \\end{pmatrix}\$
Calculate the following products of these matrices:

\n \n \n \n ", "advice": "

#### a)

\n

\$\\begin{eqnarray*} AB &=& \\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\simplify[]{{a11}{b11}+{a12}{b21}}&\\simplify[]{{a11}{b12}+{a12}{b22}}\\\\ \\simplify[]{{a21}{b11}+{a22}{b21}}&\\simplify[]{{a21}{b12}+{a22}{b22}}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\var{ab11}&\\var{ab12}\\\\ \\var{ab21}&\\var{ab22}\\\\ \\end{pmatrix} \\end{eqnarray*} \$

\n

#### b)

\n

\$\\begin{eqnarray*} BA &=& \\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\simplify[]{{b11}{a11}+{b12}{a21}}&\\simplify[]{{b11}{a12}+{b12}{a22}}\\\\ \\simplify[]{{b21}{a11}+{b22}{a21}}&\\simplify[]{{b21}{a12}+{b22}{a22}}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\var{ba11}&\\var{ba12}\\\\ \\var{ba21}&\\var{ba22}\\\\ \\end{pmatrix} \\end{eqnarray*} \$

\n

#### c)

\n

\$\\begin{eqnarray*} CB &=& \\begin{pmatrix} \\var{c11}&\\var{c12}\\\\ \\var{c21}&\\var{c22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\simplify[]{{c11}{b11}+{c12}{b21}}&\\simplify[]{{c11}{b12}+{c12}{b22}}\\\\ \\simplify[]{{c21}{b11}+{c22}{b21}}&\\simplify[]{{c21}{b12}+{a22}{b22}}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\var{cb11}&\\var{cb12}\\\\ \\var{cb21}&\\var{cb22}\\\\ \\end{pmatrix} \\end{eqnarray*} \$

\n

#### d)

\n

\$\\begin{eqnarray*} AC &=& \\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{c11}&\\var{c12}\\\\ \\var{c21}&\\var{c22}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\simplify[]{{a11}{c11}+{a12}{c21}}&\\simplify[]{{a11}{c12}+{a12}{c22}}\\\\ \\simplify[]{{a21}{c11}+{a22}{c21}}&\\simplify[]{{a21}{c12}+{a22}{c22}}\\\\ \\end{pmatrix}\\\\ &=& \\begin{pmatrix} \\var{ac11}&\\var{ac12}\\\\ \\var{ac21}&\\var{ac22}\\\\ \\end{pmatrix} \\end{eqnarray*} \$

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "extensions": [], "variables": {"ba21": {"name": "ba21", "group": "Ungrouped variables", "definition": "b21*a11+b22*a21", "description": "", "templateType": "anything"}, "a21": {"name": "a21", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}, "a22": {"name": "a22", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "ba22": {"name": "ba22", "group": "Ungrouped variables", "definition": "b21*a12+b22*a22", "description": "", "templateType": "anything"}, "cb21": {"name": "cb21", "group": "Ungrouped variables", "definition": "c21*b11+c22*b21", "description": "", "templateType": "anything"}, "b22": {"name": "b22", "group": "Ungrouped variables", "definition": "random(-3..-1)", "description": "", "templateType": "anything"}, "b21": {"name": "b21", "group": "Ungrouped variables", "definition": "random(2,3)", "description": "", "templateType": "anything"}, "cb22": {"name": "cb22", "group": "Ungrouped variables", "definition": "c21*b12+c22*b22", "description": "", "templateType": "anything"}, "ac22": {"name": "ac22", "group": "Ungrouped variables", "definition": "a21*c12+a22*c22", "description": "", "templateType": "anything"}, "ac21": {"name": "ac21", "group": "Ungrouped variables", "definition": "a21*c11+a22*c21", "description": "", "templateType": "anything"}, "ab22": {"name": "ab22", "group": "Ungrouped variables", "definition": "a21*b12+a22*b22", "description": "", "templateType": "anything"}, "ab21": {"name": "ab21", "group": "Ungrouped variables", "definition": "a21*b11+a22*b21", "description": "", "templateType": "anything"}, "b12": {"name": "b12", "group": "Ungrouped variables", "definition": "random(-3..1)", "description": "", "templateType": "anything"}, "b11": {"name": "b11", "group": "Ungrouped variables", "definition": "random(-3,-1,0,3)", "description": "", "templateType": "anything"}, "c12": {"name": "c12", "group": "Ungrouped variables", "definition": "a12+b12", "description": "", "templateType": "anything"}, "c11": {"name": "c11", "group": "Ungrouped variables", "definition": "random(1,0,4)", "description": "", "templateType": "anything"}, "ab12": {"name": "ab12", "group": "Ungrouped variables", "definition": "a11*b12+a12*b22", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(-2,1,2)", "description": "", "templateType": "anything"}, "cb11": {"name": "cb11", "group": "Ungrouped variables", "definition": "c11*b11+c12*b21", "description": "", "templateType": "anything"}, "cb12": {"name": "cb12", "group": "Ungrouped variables", "definition": "c11*b12+c12*b22", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "ab11": {"name": "ab11", "group": "Ungrouped variables", "definition": "a11*b11+a12*b21", "description": "", "templateType": "anything"}, "ba11": {"name": "ba11", "group": "Ungrouped variables", "definition": "b11*a11+b12*a21", "description": "", "templateType": "anything"}, "ba12": {"name": "ba12", "group": "Ungrouped variables", "definition": "b11*a12+b12*a22", "description": "", "templateType": "anything"}, "c22": {"name": "c22", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "c21": {"name": "c21", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "ac12": {"name": "ac12", "group": "Ungrouped variables", "definition": "a11*c12+a12*c22", "description": "", "templateType": "anything"}, "ac11": {"name": "ac11", "group": "Ungrouped variables", "definition": "a11*c11+a12*c21", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ba21", "a21", "a22", "ba22", "cb21", "b22", "b21", "cb22", "ac22", "ac21", "ab22", "ab21", "b12", "b11", "c12", "c11", "c22", "a11", "cb11", "cb12", "a12", "c21", "ba11", "ba12", "ab12", "ab11", "ac12", "ac11"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$AB = \\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix} =$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "matrix([\n [ab11,ab12],\n [ab21,ab22]\n])", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

$CB = \\begin{pmatrix} \\var{c11}&\\var{c12}\\\\ \\var{c21}&\\var{c22}\\\\ \\end{pmatrix} \\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}=$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "matrix([\n [cb11,cb12],\n [cb21,cb22]\n])", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false}], "sortAnswers": false}], "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": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}]}]}], "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": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}]}