// Numbas version: exam_results_page_options {"name": "Matrix addition if possible (same as WBQ 1.20)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Matrix addition if possible (same as WBQ 1.20)", "tags": [], "metadata": {"description": "

Matrix addition, with the added test of whether they understand that only matrices of the same size can be added.

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

If it is possible, add the following matrices.

\n

You will be able to decide if you can add them or not in the first part, and then add the possible ones in the second part. The first part will then be locked.

\n

This is the same question as WB Q 1.20: it is not randomised. There are separate randomised questions on deciding whether you can add two matrices, and practicing matrix addition.

", "advice": "

We can add matrices of the same size. That means they have to have the same number of rows and the same number of columns.

\n

\\(\\var{A}+\\var{B}\\): both have size \\(2\\times 2\\), so we can add them. The sum is \\(\\var{A+B}\\). 

\n

\\(\\var{C}+\\var{D}\\): the first has size \\(2\\times 2\\), the second has size \\(3\\times 3\\). So as they don't have the same size, we cannot add these two.

\n

\\(\\var{F}+\\var{G}\\): the first has size \\(1\\times 3\\), the second has size \\(2\\times 3\\). So as they don't have the same number of rows, we cannot add these two.

\n

\\(\\simplify[]{{lambda}{M}+{mu}{N}}\\): this is actually a linear combination, it includes scalar multiplication. Both matrices have size \\(3\\times 3\\), which does not change when we multiply them by the given scalar. So we can calculate this linear combination. The answer is \\(\\var{lambda*M+mu*N}\\).

", "rulesets": {}, "extensions": [], "variables": {"A": {"name": "A", "group": "Ungrouped variables", "definition": "matrix([3,1],[2,4])", "description": "", "templateType": "anything"}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "matrix([2,1],[9,3])", "description": "", "templateType": "anything"}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "matrix([1,2],[8,2])", "description": "", "templateType": "anything"}, "D": {"name": "D", "group": "Ungrouped variables", "definition": "matrix([9,1,0],[3,8,4],[9,2,2])", "description": "", "templateType": "anything"}, "F": {"name": "F", "group": "Ungrouped variables", "definition": "matrix([1,2,9])", "description": "", "templateType": "anything"}, "G": {"name": "G", "group": "Ungrouped variables", "definition": "matrix([2,3,2],[9,8,1])", "description": "", "templateType": "anything"}, "M": {"name": "M", "group": "Ungrouped variables", "definition": "matrix([9,1,8],[3,7,3],[8,1,7])", "description": "", "templateType": "anything"}, "N": {"name": "N", "group": "Ungrouped variables", "definition": "matrix([2,9,1],[8,2,7],[3,6,4])", "description": "", "templateType": "anything"}, "lambda": {"name": "lambda", "group": "Ungrouped variables", "definition": "4", "description": "", "templateType": "anything"}, "mu": {"name": "mu", "group": "Ungrouped variables", "definition": "2", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["A", "B", "C", "D", "F", "G", "M", "N", "lambda", "mu"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Can the matrices be added?", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Add the matrices which can be added", "rawLabel": "", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": true}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Can you add the following matrices?

\n

\\(\\var{A}+\\var{B}\\) [[0]]

\n

\\(\\var{C}+\\var{D}\\) [[1]]

\n

\\(\\var{F}+\\var{G}\\) [[2]]

\n

\\(\\simplify[]{{lambda}{M}+{mu}{N}}\\) [[3]]

", "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": "Determine whether matrices can be added", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["can add", "cannot add"], "matrix": ["1", 0], "distractors": ["", ""]}, {"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": "Determine whether matrices can be added", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["can add", "cannot add"], "matrix": ["0", "1"], "distractors": ["", ""]}, {"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": "Determine whether matrices can be added", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["can add", "cannot add"], "matrix": ["0", "1"], "distractors": ["", ""]}, {"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": "Determine whether matrices can be added", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["can add", "cannot add"], "matrix": ["1", 0], "distractors": ["", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Add the matrices which can be added", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Work out the matrix sum:

\n

\\(\\var{A}+\\var{B}= \\) [[0]]

\n

\\(\\simplify[]{{lambda}{M}+{mu}{N}} = \\) [[1]]

", "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": "Add matrices", "correctAnswer": "A+B", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"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": "Add matrices", "correctAnswer": "lambda*M+mu*N", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}], "partsMode": "explore", "maxMarks": "8", "objectives": [{"name": "Determine whether matrices can be added", "limit": "4", "mode": "sum"}, {"name": "Add matrices", "limit": "4", "mode": "sum"}], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}]}], "contributors": [{"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}