// Numbas version: finer_feedback_settings {"name": "Multiply 2x2 matrices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([ [random(-3,-1,0,3),random(-3..1)], [random(2,3),random(-3..-1)] ])", "description": "", "name": "b"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([ [random(-2,1,2),random(1..4)], [random(-2..2),random(1..3)] ])", "description": "", "name": "a"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([ [random(1,0,4), a[0][1]+b[0][1]], [random(2..5),random(0,1)] ])", "description": "", "name": "c"}}, "ungrouped_variables": ["a", "b", "c"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Multiply 2x2 matrices", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "a*b", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "
$\\mathbf{AB} = \\var{A}\\var{B} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "b*a", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "$\\mathbf{BA} = \\var{B}\\var{A} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "c*b", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "$\\mathbf{CB} = \\var{C}\\var{B} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "a*c", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "$\\mathbf{AC} = \\var{A}\\var{C} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}], "statement": "Let
\n\\begin{align} \\mathbf{A} &= \\var{a}, & \\mathbf{B} &= \\var{b}, & \\mathbf{C} &= \\var{c} \\end{align}
\nCalculate the following products of these matrices:
", "tags": ["checked2015", "MAS1602", "matrices", "matrix", "matrix multiplication", "matrix product", "multiplication of matrices", "multiplying matrices", "product of matrices", "tested1"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "10/07/2012:
\nAdded tags.
\nDisplay of matrices looks untidy when individual components include negative numbers.
\nIs it worthwhile restricting all components of matrices to be non zero?
\nQuestion appears to be working correctly.
\n24/12/2012:
\nChecked calculations, OK. Added tested1 tag.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Multiplication of $2 \\times 2$ matrices.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\\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}
\\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}
\\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}
\\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}