// Numbas version: finer_feedback_settings {"name": "Matrix Multiplication", "metadata": {"description": "

This exam gives tests for an overview of the skills students need to be able to perfom matrix multiplications.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", ""], "variable_overrides": [[], []], "questions": [{"name": "Conformable for Multiplication", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}], "tags": [], "metadata": {"description": "

This question tests if a students understands when matrices are conformable

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

Conformable Matrices for Multiplication

\n

For each of the following pairs of matrices, determine whether they are conformable for multiplication

", "advice": "

We are asked to determine whether two matrices are conformable for multiplication

\n

To do this, we must determine the dimensions of each matrix

\n

a)

\n

$\\boldsymbol{A}$ has $\\var{n1q1}$ columns and $\\boldsymbol{B}$ has $\\var{m2q1}$ rows

\n
\n

Since both of these values are $\\var{n1q1}$, the product $\\boldsymbol{AB}$ is defined and the matrices are conformable

\n
\n
\n

Since $\\var{n1q1}$ is not equal to $\\var{m2q1}$, the product $\\boldsymbol{AB}$ is not defined and the matrices are not conformable

\n
\n

\n

b)

\n

$\\boldsymbol{C}$ has $\\var{n1q2}$ columns and $\\boldsymbol{D}$ has $\\var{m2q2}$ rows

\n
\n

Since both of these values are $\\var{n1q2}$, the product $\\boldsymbol{CD}$ is defined and the matrices are conformable

\n
\n
\n

Since $\\var{n1q2}$ is not equal to $\\var{m2q2}$, the product $\\boldsymbol{CD}$ is not defined and the matrices are not conformable

\n
\n

\n

c)

\n

$\\boldsymbol{E}$ has $\\var{n1q3}$ columns and $\\boldsymbol{F}$ has $\\var{m2q3}$ rows

\n
\n

Since both of these values are $\\var{n1q3}$, the product $\\boldsymbol{EF}$ is defined and the matrices are conformable

\n
\n
\n

Since $\\var{n1q3}$ is not equal to $\\var{m2q3}$, the product $\\boldsymbol{AB}$ is not defined and the matrices are not conformable

\n
\n

\n
\n

\n
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"conf1": {"name": "conf1", "group": "q1", "definition": "random(true,false)", "description": "", "templateType": "anything", "can_override": false}, "m1q1": {"name": "m1q1", "group": "q1", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "n1q1": {"name": "n1q1", "group": "q1", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "m2q1": {"name": "m2q1", "group": "q1", "definition": "if(conf1,n1q1,random(1..5))", "description": "", "templateType": "anything", "can_override": false}, "n2q1": {"name": "n2q1", "group": "q1", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "conf2": {"name": "conf2", "group": "q2", "definition": "random(true,false)", "description": "", "templateType": "anything", "can_override": false}, "m1q2": {"name": "m1q2", "group": "q2", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "n1q2": {"name": "n1q2", "group": "q2", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "m2q2": {"name": "m2q2", "group": "q2", "definition": "if(conf2,n1q2,random(1..5))", "description": "", "templateType": "anything", "can_override": false}, "n2q2": {"name": "n2q2", "group": "q2", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "conf3": {"name": "conf3", "group": "q3", "definition": "random(true,false)", "description": "", "templateType": "anything", "can_override": false}, "m1q3": {"name": "m1q3", "group": "q3", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "n1q3": {"name": "n1q3", "group": "q3", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "m2q3": {"name": "m2q3", "group": "q3", "definition": "if(conf3,n1q3,random(1..5))", "description": "", "templateType": "anything", "can_override": false}, "n2q3": {"name": "n2q3", "group": "q3", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "q1", "definition": "transpose(matrix(repeat(repeat(random(0..9),m1q1),n1q1)))", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "q1", "definition": "transpose(matrix(repeat(repeat(random(0..9),m2q1),n2q1)))", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "q2", "definition": "transpose(matrix(repeat(repeat(random(0..9),m1q2),n1q2)))", "description": "", "templateType": "anything", "can_override": false}, "D": {"name": "D", "group": "q2", "definition": "transpose(matrix(repeat(repeat(random(0..9),m2q2),n2q2)))", "description": "", "templateType": "anything", "can_override": false}, "E": {"name": "E", "group": "q3", "definition": "transpose(matrix(repeat(repeat(random(0..9),m1q3),n1q3)))", "description": "", "templateType": "anything", "can_override": false}, "F": {"name": "F", "group": "q3", "definition": "transpose(matrix(repeat(repeat(random(0..9),m2q3),n2q3)))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "not(conf1 = false and n1q1 = m2q1) and \nnot(conf2 = false and n1q2 = m2q2) and \nnot(conf3 = false and n1q3 = m2q3)", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "q1", "variables": ["conf1", "m1q1", "n1q1", "m2q1", "n2q1", "A", "B"]}, {"name": "q2", "variables": ["conf2", "m1q2", "n1q2", "m2q2", "n2q2", "C", "D"]}, {"name": "q3", "variables": ["conf3", "m1q3", "n1q3", "m2q3", "n2q3", "E", "F"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Consider:

\n

$$
\\boldsymbol{A} = \\var{A}, \\boldsymbol{B} = \\var{B}
$$

\n

The product $\\boldsymbol{AB}$ [[0]], and therefore the matrices are [[1]].

", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": "['exists','does not exist']", "matrix": "[if(conf1,1,0),if(conf1,0,1)]"}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": "['conformable for multiplication','not conformable for multiplication']", "matrix": "[if(conf1,1,0),if(conf1,0,1)]"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Consider:

\n

$$
\\boldsymbol{C} = \\var{C}, \\boldsymbol{D} = \\var{D}
$$

\n

The product $\\boldsymbol{CD}$ [[0]], and therefore the matrices are [[1]].

", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": "['exists','does not exist']", "matrix": "[if(conf2,1,0),if(conf2,0,1)]"}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": "['conformable for multiplication','not conformable for multiplication']", "matrix": "[if(conf2,1,0),if(conf2,0,1)]"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Consider:

\n

$$
\\boldsymbol{E} = \\var{E}, \\boldsymbol{F} = \\var{F}
$$

\n

The product $\\boldsymbol{EF}$ [[0]], and therefore the matrices are [[1]].

", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": "['exists','does not exist']", "matrix": "[if(conf3,1,0),if(conf3,0,1)]"}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": "['conformable for multiplication','not conformable for multiplication']", "matrix": "[if(conf3,1,0),if(conf3,0,1)]"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Matrix Multiplication", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}], "tags": [], "metadata": {"description": "

Multiplication of two matrices.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

Matrix Multiplication

\n

Given two matrices:

\n

$$
\\boldsymbol{A}=\\begin{pmatrix} \\var{a11}&\\var{a12}&\\var{a13}\\\\ \\var{a21}&\\var{a22}&\\var{a23}\\\\ \\end{pmatrix} ,\\boldsymbol{B}=\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22}\\\\ \\var{b31}&\\var{b32}\\\\\\end{pmatrix}
$$

\n

Calculate the following matrix multiplications.

\n

", "advice": "

Remember multiplication of matrices is carried out by multiplying the rows of the first matrix by the columns of the second matrix

\n

a)

\n

$$
\\begin{aligned}
\\boldsymbol{A}\\boldsymbol{B} &= \\begin{pmatrix} \\var{a11}&\\var{a12}&\\var{a13}\\\\ \\var{a21}&\\var{a22}&\\var{a23} \\end{pmatrix}\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22} \\\\ \\var{b31}&\\var{b32}\\end{pmatrix} \\\\
&= \\begin{pmatrix}\\var{a11}\\times\\var{b11}+\\var{a12}\\times\\var{b21}+\\var{a13}\\times\\var{b31}&\\var{a11}\\times\\var{b12}+\\var{a12}\\times\\var{b22}+\\var{a13}\\times\\var{b32} \\\\ \\var{a21}\\times\\var{b11}+\\var{a22}\\times\\var{b21}+\\var{a23}\\times\\var{b31}&\\var{a21}\\times\\var{b12}+\\var{a22}\\times\\var{b22}+\\var{a23}\\times\\var{b32}\\end{pmatrix} \\\\
&=\\begin{pmatrix}\\simplify{{a11}*{b11}+{a12}*{b21}+{a13}*{b31}}&\\simplify{{a11}*{b12}+{a12}*{b22}+{a13}*{b32}}\\\\ \\simplify{{a21}*{b11}+{a22}*{b21}+{a23}*{b31}}&\\simplify{{a21}*{b12}+{a22}*{b22}+{a23}*{b32}}\\end{pmatrix}
\\end{aligned}
$$

\n

b)

\n

To evaluate \\(\\boldsymbol{B}\\boldsymbol{A}\\) we swap their positions and this time multiply the rows of \\(\\boldsymbol{B}\\) by the columns of \\(\\boldsymbol{A}\\)

\n

$$
\\begin{aligned}
\\boldsymbol{B}\\boldsymbol{A} &=
\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22} \\\\ \\var{b31}&\\var{b32}\\end{pmatrix}
\\begin{pmatrix} \\var{a11}&\\var{a12}&\\var{a13}\\\\ \\var{a21}&\\var{a22}&\\var{a23} \\end{pmatrix} \\\\
&=
\\begin{pmatrix}
\\var{b11} \\times \\var{a11} + \\var{b12} \\times \\var{a21} & \\var{b11} \\times \\var{a12} + \\var{b12} \\times \\var{a22} & \\var{b11} \\times \\var{a13} + \\var{b12} \\times \\var{a23} \\\\
\\var{b21} \\times \\var{a11} + \\var{b22} \\times \\var{a21} & \\var{b21} \\times \\var{a12} + \\var{b22} \\times \\var{a22} & \\var{b21} \\times \\var{a13} + \\var{b22} \\times \\var{a23} \\\\
\\var{b31} \\times \\var{a11} + \\var{b32} \\times \\var{a21} & \\var{b31} \\times \\var{a12} + \\var{b32} \\times \\var{a22} & \\var{b31} \\times \\var{a13} + \\var{b32} \\times \\var{a23} \\\\
\\end{pmatrix} \\\\
&=
\\begin{pmatrix}
\\simplify{{b11}*{a11}+{b12}*{a21}} & \\simplify{{b11} *{a12} + {b12} *{a22}} & \\simplify{{b11}*{a13} + {b12}*{a23}} \\\\
\\simplify{{b21}*{a11}+{b22}*{a21}} & \\simplify{{b21}*{a12} + {b22}*{a22}} & \\simplify{{b21}*{a13} + {b22}*{a23}} \\\\
\\simplify{{b31}*{a11}+{b32}*{a21}} & \\simplify{{b31}*{a12} + {b32}*{a22}} & \\simplify{{b31}*{a13} + {b32}*{a23}} \\\\
\\end{pmatrix} \\\\
\\end{aligned}
$$

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"ba23": {"name": "ba23", "group": "Ungrouped variables", "definition": "{b21}*{a13}+{b22}*{a23}", "description": "", "templateType": "anything", "can_override": false}, "ba33": {"name": "ba33", "group": "Ungrouped variables", "definition": "{b31}*{a13}+{b32}*{a23}", "description": "", "templateType": "anything", "can_override": false}, "a21": {"name": "a21", "group": "Ungrouped variables", "definition": "random(0 .. 10#1)", "description": "", "templateType": "randrange", "can_override": false}, "ba22": {"name": "ba22", "group": "Ungrouped variables", "definition": "{b21}*{a12}+{b22}*{a22}", "description": "", "templateType": "anything", "can_override": false}, "b21": {"name": "b21", "group": "Ungrouped variables", "definition": "random(2 .. 11#1)", "description": "", "templateType": "randrange", "can_override": false}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "{a11}-1", "description": "", "templateType": "anything", "can_override": false}, "b32": {"name": "b32", "group": "Ungrouped variables", "definition": "random(0 .. 14#1)", "description": "", "templateType": "randrange", "can_override": false}, "b12": {"name": "b12", "group": "Ungrouped variables", "definition": "random(1 .. 8#1)", "description": "", "templateType": "randrange", "can_override": false}, "ab21": {"name": "ab21", "group": "Ungrouped variables", "definition": "{a21}*{b11}+{a22}*{b21}+{a23}*{b31}", "description": "", "templateType": "anything", "can_override": false}, "b22": {"name": "b22", "group": "Ungrouped variables", "definition": "random(2 .. 11#1)", "description": "", "templateType": "randrange", "can_override": false}, "a13": {"name": "a13", "group": "Ungrouped variables", "definition": "random(4 .. 12#1)", "description": "", "templateType": "randrange", "can_override": false}, "b11": {"name": "b11", "group": "Ungrouped variables", "definition": "random(1 .. 9#1)", "description": "", "templateType": "randrange", "can_override": false}, "ab11": {"name": "ab11", "group": "Ungrouped variables", "definition": "{a11}*{b11}+{a12}*{b21}+{a13}*{b31}", "description": "", "templateType": "anything", "can_override": false}, "ba21": {"name": "ba21", "group": "Ungrouped variables", "definition": "{b21}*{a11}+{b22}*{a21}", "description": "", "templateType": "anything", "can_override": false}, "ba13": {"name": "ba13", "group": "Ungrouped variables", "definition": "{b11}*{a13}+{b12}*{a23}", "description": "", "templateType": "anything", "can_override": false}, "ba31": {"name": "ba31", "group": "Ungrouped variables", "definition": "{b31}*{a11}+{b32}*{a21}", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(1 .. 9#1)", "description": "", "templateType": "randrange", "can_override": false}, "ba32": {"name": "ba32", "group": "Ungrouped variables", "definition": "{b31}*{a12}+{b32}*{a22}", "description": "", "templateType": "anything", "can_override": false}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(1 .. 10#1)", "description": "", "templateType": "randrange", "can_override": false}, "a22": {"name": "a22", "group": "Ungrouped variables", "definition": "random(1 .. 9#1)", "description": "", "templateType": "randrange", "can_override": false}, "ab22": {"name": "ab22", "group": "Ungrouped variables", "definition": "{a21}*{b12}+{a22}*{b22}+{a23}*{b32}", "description": "", "templateType": "anything", "can_override": false}, "ba12": {"name": "ba12", "group": "Ungrouped variables", "definition": "{b11}*{a12}+{b12}*{a22}", "description": "", "templateType": "anything", "can_override": false}, "ba11": {"name": "ba11", "group": "Ungrouped variables", "definition": "{b11}*{a11}+{b12}*{a21}", "description": "", "templateType": "anything", "can_override": false}, "ab12": {"name": "ab12", "group": "Ungrouped variables", "definition": "{a11}*{b12}+{a12}*{b22}+{a13}*{b32}", "description": "", "templateType": "anything", "can_override": false}, "a23": {"name": "a23", "group": "Ungrouped variables", "definition": "random(10 .. 16#1)", "description": "", "templateType": "randrange", "can_override": false}, "b31": {"name": "b31", "group": "Ungrouped variables", "definition": "random(0 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a11", "a12", "a21", "a22", "k", "a13", "a23", "b11", "b12", "b21", "b22", "b31", "b32", "ab11", "ab12", "ab21", "ab22", "ba11", "ba12", "ba13", "ba21", "ba22", "ba23", "ba31", "ba32", "ba33"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the product $\\boldsymbol{AB}$

\n

First set up the size of the answer matrix (choose the correct number of rows and columns in the boxes) and then input the entries:

\n

$\\boldsymbol{AB} =$ [[0]]

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

Calculate the product $\\boldsymbol{BA}$

\n

First set up the size of the answer matrix (choose the correct number of rows and columns in the boxes) and then input the entries:

\n

$\\boldsymbol{BA} =$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([\n [ba11,ba12,ba13],\n [ba21,ba22,ba23],\n [ba31,ba32,ba33]\n])", "correctAnswerFractions": false, "numRows": "1", "numColumns": "1", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "typeendtoleave": false, "startpassword": "", "allowAttemptDownload": false, "downloadEncryptionKey": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "inreview"}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "type": "exam", "contributors": [{"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}], "extensions": [], "custom_part_types": [], "resources": []}