// Numbas version: exam_results_page_options {"name": "Simon's copy of Lois's copy of Matrix Multiplication 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "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"], "name": "Simon's copy of Lois's copy of Matrix Multiplication 1", "tags": ["matrices", "matrix", "matrix multiplication", "matrix product", "multiplication of matrices", "multiplying matrices", "product of matrices"], "preamble": {"css": "", "js": ""}, "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

\n

b)

\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

More information on multiplying matrices can be found in this Mathcentre leaflet.

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "parts": [{"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]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"numRows": "2", "numColumns": "2", "type": "matrix", "allowFractions": false, "variableReplacements": [], "markPerCell": false, "variableReplacementStrategy": "originalfirst", "correctAnswerFractions": false, "showCorrectAnswer": true, "correctAnswer": "matrix([\n [ab11,ab12],\n [ab21,ab22]\n])", "scripts": {}, "marks": 1, "tolerance": 0, "allowResize": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"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]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"numRows": "2", "numColumns": "2", "type": "matrix", "allowFractions": false, "variableReplacements": [], "markPerCell": false, "variableReplacementStrategy": "originalfirst", "correctAnswerFractions": false, "showCorrectAnswer": true, "correctAnswer": "matrix([\n [cb11,cb12],\n [cb21,cb22]\n])", "scripts": {}, "marks": 1, "tolerance": 0, "allowResize": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "


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

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question", "variables": {"ba21": {"definition": "b21*a11+b22*a21", "templateType": "anything", "group": "Ungrouped variables", "name": "ba21", "description": ""}, "a21": {"definition": "random(-2..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "a21", "description": ""}, "a22": {"definition": "random(1..3)", "templateType": "anything", "group": "Ungrouped variables", "name": "a22", "description": ""}, "ba22": {"definition": "b21*a12+b22*a22", "templateType": "anything", "group": "Ungrouped variables", "name": "ba22", "description": ""}, "cb21": {"definition": "c21*b11+c22*b21", "templateType": "anything", "group": "Ungrouped variables", "name": "cb21", "description": ""}, "b22": {"definition": "random(-3..-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "b22", "description": ""}, "b21": {"definition": "random(2,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "b21", "description": ""}, "cb22": {"definition": "c21*b12+c22*b22", "templateType": "anything", "group": "Ungrouped variables", "name": "cb22", "description": ""}, "ac22": {"definition": "a21*c12+a22*c22", "templateType": "anything", "group": "Ungrouped variables", "name": "ac22", "description": ""}, "ac21": {"definition": "a21*c11+a22*c21", "templateType": "anything", "group": "Ungrouped variables", "name": "ac21", "description": ""}, "ab22": {"definition": "a21*b12+a22*b22", "templateType": "anything", "group": "Ungrouped variables", "name": "ab22", "description": ""}, "ab21": {"definition": "a21*b11+a22*b21", "templateType": "anything", "group": "Ungrouped variables", "name": "ab21", "description": ""}, "b12": {"definition": "random(-3..1)", "templateType": "anything", "group": "Ungrouped variables", "name": "b12", "description": ""}, "b11": {"definition": "random(-3,-1,0,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "b11", "description": ""}, "c12": {"definition": "a12+b12", "templateType": "anything", "group": "Ungrouped variables", "name": "c12", "description": ""}, "c11": {"definition": "random(1,0,4)", "templateType": "anything", "group": "Ungrouped variables", "name": "c11", "description": ""}, "c22": {"definition": "random(0,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "c22", "description": ""}, "a11": {"definition": "random(-2,1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "a11", "description": ""}, "cb11": {"definition": "c11*b11+c12*b21", "templateType": "anything", "group": "Ungrouped variables", "name": "cb11", "description": ""}, "cb12": {"definition": "c11*b12+c12*b22", "templateType": "anything", "group": "Ungrouped variables", "name": "cb12", "description": ""}, "a12": {"definition": "random(1..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "a12", "description": ""}, "c21": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "c21", "description": ""}, "ba11": {"definition": "b11*a11+b12*a21", "templateType": "anything", "group": "Ungrouped variables", "name": "ba11", "description": ""}, "ba12": {"definition": "b11*a12+b12*a22", "templateType": "anything", "group": "Ungrouped variables", "name": "ba12", "description": ""}, "ab12": {"definition": "a11*b12+a12*b22", "templateType": "anything", "group": "Ungrouped variables", "name": "ab12", "description": ""}, "ab11": {"definition": "a11*b11+a12*b21", "templateType": "anything", "group": "Ungrouped variables", "name": "ab11", "description": ""}, "ac12": {"definition": "a11*c12+a12*c22", "templateType": "anything", "group": "Ungrouped variables", "name": "ac12", "description": ""}, "ac11": {"definition": "a11*c11+a12*c21", "templateType": "anything", "group": "Ungrouped variables", "name": "ac11", "description": ""}}, "metadata": {"notes": "\n \t\t \t\t

10/07/2012:

\n \t\t \t\t

Added tags.

\n \t\t \t\t

Display of matrices looks untidy when individual components include negative numbers.

\n \t\t \t\t

Is it worthwhile restricting all components of matrices to be non zero?

\n \t\t \t\t

Question appears to be working correctly.

\n \t\t \n \t\t", "description": "

Multiplication of $2 \\times 2$ matrices.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Simon Vaughan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1135/"}]}]}], "contributors": [{"name": "Simon Vaughan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1135/"}]}