// Numbas version: exam_results_page_options {"name": "Matrices: Multiplication 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "name": "Matrices: Multiplication 1", "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "extensions": [], "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

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*} \\]

", "variables": {"ba11": {"group": "Ungrouped variables", "name": "ba11", "description": "", "templateType": "anything", "definition": "b11*a11+b12*a21"}, "a21": {"group": "Ungrouped variables", "name": "a21", "description": "", "templateType": "anything", "definition": "random(-2..2)"}, "ab21": {"group": "Ungrouped variables", "name": "ab21", "description": "", "templateType": "anything", "definition": "a21*b11+a22*b21"}, "b21": {"group": "Ungrouped variables", "name": "b21", "description": "", "templateType": "anything", "definition": "random(2,3)"}, "a12": {"group": "Ungrouped variables", "name": "a12", "description": "", "templateType": "anything", "definition": "random(1..4)"}, "ba12": {"group": "Ungrouped variables", "name": "ba12", "description": "", "templateType": "anything", "definition": "b11*a12+b12*a22"}, "ab11": {"group": "Ungrouped variables", "name": "ab11", "description": "", "templateType": "anything", "definition": "a11*b11+a12*b21"}, "ba22": {"group": "Ungrouped variables", "name": "ba22", "description": "", "templateType": "anything", "definition": "b21*a12+b22*a22"}, "ab22": {"group": "Ungrouped variables", "name": "ab22", "description": "", "templateType": "anything", "definition": "a21*b12+a22*b22"}, "a11": {"group": "Ungrouped variables", "name": "a11", "description": "", "templateType": "anything", "definition": "random(-2,1,2)"}, "b11": {"group": "Ungrouped variables", "name": "b11", "description": "", "templateType": "anything", "definition": "random(-3,-1,0,3)"}, "b12": {"group": "Ungrouped variables", "name": "b12", "description": "", "templateType": "anything", "definition": "random(-3..1)"}, "a22": {"group": "Ungrouped variables", "name": "a22", "description": "", "templateType": "anything", "definition": "random(1..3)"}, "ba21": {"group": "Ungrouped variables", "name": "ba21", "description": "", "templateType": "anything", "definition": "b21*a11+b22*a21"}, "ab12": {"group": "Ungrouped variables", "name": "ab12", "description": "", "templateType": "anything", "definition": "a11*b12+a12*b22"}, "b22": {"group": "Ungrouped variables", "name": "b22", "description": "", "templateType": "anything", "definition": "random(-3..-1)"}}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "statement": "

Given the square matrices:

\n


\\[\\mathbf{A}=\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22}\\\\ \\end{pmatrix},\\;\\; \\mathbf{B}=\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\end{pmatrix}\\]

\n


Evaluate the following products:

\n

\n

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

$\\mathbf{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]]

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

$\\mathbf{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}=$ [[0]]

", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "ungrouped_variables": ["ba21", "a21", "a22", "ba22", "b22", "b21", "ab22", "ab21", "b12", "b11", "a11", "a12", "ba11", "ba12", "ab12", "ab11"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Multiplication of $2 \\times 2$ matrices.

"}, "type": "question", "contributors": [{"name": "Clare Lundon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/492/"}]}]}], "contributors": [{"name": "Clare Lundon", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/492/"}]}