// Numbas version: exam_results_page_options {"name": "Musa's copy of L1 - Matrix multiplication (2x2)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Multiplication of $2 \\times 2$ matrices.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Musa's copy of L1 - Matrix multiplication (2x2)", "ungrouped_variables": ["a", "b", "c"], "extensions": [], "variable_groups": [], "preamble": {"js": "", "css": ""}, "variables": {"c": {"definition": "matrix([ [random(1,0,4), a[0][1]+b[0][1]], [random(2..5),random(0,1)] ])", "name": "c", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "a": {"definition": "matrix([ [random(-2,1,2),random(1..4)], [random(-2..2),random(1..3)] ])", "name": "a", "templateType": "anything", "description": "", "group": "Ungrouped variables"}, "b": {"definition": "matrix([ [random(-3,-1,0,3),random(-3..1)], [random(2,3),random(-3..-1)] ])", "name": "b", "templateType": "anything", "description": "", "group": "Ungrouped variables"}}, "tags": [], "advice": "

a)

\n

\\begin{align}
\\mathbf{AB} &= \\var{A}\\var{B} \\\\
&= \\begin{pmatrix} \\simplify[]{ {a[0][0]}*{b[0][0]}+{a[0][1]}*{b[1][0]} } & \\simplify[]{ {a[0][0]}*{b[0][1]} + {a[0][1]}*{b[1][1]} } \\\\ \\simplify[]{ {a[1][0]}*{b[0][0]} + {a[1][1]}*{b[1][0]} } & \\simplify[]{ {a[1][0]}*{b[0][1]} + {a[1][1]}*{b[1][1]} } \\end{pmatrix} \\\\
&= \\var{a*b}
\\end{align}

\n

b)

\n

\\begin{align}
\\mathbf{BA} &= \\var{B}\\var{A} \\\\
&= \\begin{pmatrix} \\simplify[]{ {b[0][0]}*{a[0][0]}+{b[0][1]}*{a[1][0]} } & \\simplify[]{ {b[0][0]}*{a[0][1]} + {b[0][1]}*{a[1][1]} } \\\\ \\simplify[]{ {b[1][0]}*{a[0][0]} + {b[1][1]}*{a[1][0]} } & \\simplify[]{ {b[1][0]}*{a[0][1]} + {b[1][1]}*{a[1][1]} } \\end{pmatrix} \\\\
&= \\var{b*a}
\\end{align}

\n

c)

\n

\\begin{align}
\\mathbf{CB} &= \\var{C}\\var{B} \\\\
&= \\begin{pmatrix} \\simplify[]{ {c[0][0]}*{b[0][0]}+{c[0][1]}*{b[1][0]} } & \\simplify[]{ {c[0][0]}*{b[0][1]} + {c[0][1]}*{b[1][1]} } \\\\ \\simplify[]{ {c[1][0]}*{b[0][0]} + {c[1][1]}*{b[1][0]} } & \\simplify[]{ {c[1][0]}*{b[0][1]} + {c[1][1]}*{b[1][1]} } \\end{pmatrix} \\\\
&= \\var{c*b}
\\end{align}

\n

d)

\n

\\begin{align}
\\mathbf{AC} &= \\var{A}\\var{C} \\\\
&= \\begin{pmatrix} \\simplify[]{ {a[0][0]}*{c[0][0]}+{a[0][1]}*{c[1][0]} } & \\simplify[]{ {a[0][0]}*{c[0][1]} + {a[0][1]}*{c[1][1]} } \\\\ \\simplify[]{ {a[1][0]}*{c[0][0]} + {a[1][1]}*{c[1][0]} } & \\simplify[]{ {a[1][0]}*{c[0][1]} + {a[1][1]}*{c[1][1]} } \\end{pmatrix} \\\\
&= \\var{a*c}
\\end{align}

", "parts": [{"adaptiveMarkingPenalty": 0, "marks": 0, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "unitTests": [], "gaps": [{"adaptiveMarkingPenalty": 0, "marks": 1, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "numRows": "2", "type": "matrix", "correctAnswerFractions": false, "extendBaseMarkingAlgorithm": true, "numColumns": "2", "unitTests": [], "showCorrectAnswer": true, "allowResize": false, "useCustomName": false, "customName": "", "correctAnswer": "a*b", "scripts": {}, "tolerance": 0, "allowFractions": false, "markPerCell": false, "variableReplacementStrategy": "originalfirst"}], "showCorrectAnswer": true, "customName": "", "sortAnswers": false, "useCustomName": false, "scripts": {}, "prompt": "

$\\mathbf{AB} = \\var{A}\\var{B} = $ [[0]]

", "variableReplacementStrategy": "originalfirst"}, {"adaptiveMarkingPenalty": 0, "marks": 0, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "unitTests": [], "gaps": [{"adaptiveMarkingPenalty": 0, "marks": 1, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "numRows": "2", "type": "matrix", "correctAnswerFractions": false, "extendBaseMarkingAlgorithm": true, "numColumns": "2", "unitTests": [], "showCorrectAnswer": true, "allowResize": false, "useCustomName": false, "customName": "", "correctAnswer": "b*a", "scripts": {}, "tolerance": 0, "allowFractions": false, "markPerCell": false, "variableReplacementStrategy": "originalfirst"}], "showCorrectAnswer": true, "customName": "", "sortAnswers": false, "useCustomName": false, "scripts": {}, "prompt": "

$\\mathbf{BA} = \\var{B}\\var{A} = $ [[0]]

", "variableReplacementStrategy": "originalfirst"}, {"adaptiveMarkingPenalty": 0, "marks": 0, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "unitTests": [], "gaps": [{"adaptiveMarkingPenalty": 0, "marks": 1, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "numRows": "2", "type": "matrix", "correctAnswerFractions": false, "extendBaseMarkingAlgorithm": true, "numColumns": "2", "unitTests": [], "showCorrectAnswer": true, "allowResize": false, "useCustomName": false, "customName": "", "correctAnswer": "c*b", "scripts": {}, "tolerance": 0, "allowFractions": false, "markPerCell": false, "variableReplacementStrategy": "originalfirst"}], "showCorrectAnswer": true, "customName": "", "sortAnswers": false, "useCustomName": false, "scripts": {}, "prompt": "

$\\mathbf{CB} = \\var{C}\\var{B} = $ [[0]]

", "variableReplacementStrategy": "originalfirst"}, {"adaptiveMarkingPenalty": 0, "marks": 0, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "unitTests": [], "gaps": [{"adaptiveMarkingPenalty": 0, "marks": 1, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "numRows": "2", "type": "matrix", "correctAnswerFractions": false, "extendBaseMarkingAlgorithm": true, "numColumns": "2", "unitTests": [], "showCorrectAnswer": true, "allowResize": false, "useCustomName": false, "customName": "", "correctAnswer": "a*c", "scripts": {}, "tolerance": 0, "allowFractions": false, "markPerCell": false, "variableReplacementStrategy": "originalfirst"}], "showCorrectAnswer": true, "customName": "", "sortAnswers": false, "useCustomName": false, "scripts": {}, "prompt": "

$\\mathbf{AC} = \\var{A}\\var{C} = $ [[0]]

", "variableReplacementStrategy": "originalfirst"}], "statement": "

Let

\n

\\begin{align} \\mathbf{A} &= \\var{a}, & \\mathbf{B} &= \\var{b}, & \\mathbf{C} &= \\var{c} \\end{align}

\n

Calculate the following products of these matrices:

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}, {"name": "Musa Mammadov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4417/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}, {"name": "Musa Mammadov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4417/"}]}