// Numbas version: exam_results_page_options {"name": "Matrix Addition and Subtraction", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Matrix Addition and Subtraction", "tags": ["matrices"], "metadata": {"description": "

Exercises covering matrix addition and subtraction

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

Matrix Addition and Subtraction

\n

\n

Perform the following matrix additions and subtractions:

", "advice": "

To add or subtract matrices, the matrices need to be of the same order (same number of rows and columns). We then add or subtract each corresponding element.

\n

e.g.

\n

\\[ \\begin{pmatrix} a_{1,1} & a_{1,2} \\\\ a_{2,1} & a_{2,2} \\\\ \\end{pmatrix} + \\begin{pmatrix} b_{1,1} & b_{1,2} \\\\ b_{2,1} & b_{2,2} \\\\ \\end{pmatrix} = \\begin{pmatrix} a_{1,1} + b_{1,1} & a_{1,2} + b_{1,2} \\\\ a_{2,1} + b_{2,1} & a_{2,2} + b_{2,2} \\\\ \\end{pmatrix} \\]

\n

\n

The resulting matrix will also be of the same order.

\n

\n

e.g. Part a)

\n

\\[ \\simplify{{maP1a}} + \\simplify{{maP1b}} = \\begin{pmatrix} \\var{maP1a[0][0]} + \\var{maP1b[0][0]} & \\var{maP1a[0][1]} + \\var{maP1b[0][1]} \\\\ \\var{maP1a[1][0]} + \\var{maP1b[1][0]} & \\var{maP1a[1][1]} + \\var{maP1b[1][1]} \\\\ \\end{pmatrix} = \\simplify{{maP1a + maP1b}} \\]

", "rulesets": {}, "extensions": [], "variables": {"maP1a": {"name": "maP1a", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP1b": {"name": "maP1b", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP2a": {"name": "maP2a", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP2b": {"name": "maP2b", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP3a": {"name": "maP3a", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP3b": {"name": "maP3b", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP4a": {"name": "maP4a", "group": "Ungrouped variables", "definition": "matrixrandom(2,4)", "description": "", "templateType": "anything"}, "maP4b": {"name": "maP4b", "group": "Ungrouped variables", "definition": "matrixrandom(2,4)", "description": "", "templateType": "anything"}, "maP5a": {"name": "maP5a", "group": "Ungrouped variables", "definition": "matrixrandom(4,4)", "description": "", "templateType": "anything"}, "maP5b": {"name": "maP5b", "group": "Ungrouped variables", "definition": "matrixrandom(4,4)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["maP1a", "maP1b", "maP2a", "maP2b", "maP3a", "maP3b", "maP4a", "maP4b", "maP5a", "maP5b"], "variable_groups": [], "functions": {"matrixrandom": {"parameters": [["rows", "integer"], ["columns", "integer"]], "type": "matrix", "language": "jme", "definition": "matrix(repeat(repeat(random(0..9)*(random(1,1,1,-1)),columns),rows))"}}, "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": "

$\\simplify{{maP1a}}+\\simplify{{maP1b}} =$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "maP1a + maP1b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": "1", "maxColumns": "9", "minRows": 1, "maxRows": "9"}], "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": "

$\\simplify{{maP2a}}+\\simplify{{maP2b}} =$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "maP2a + maP2b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": "1", "maxColumns": "9", "minRows": 1, "maxRows": "9"}], "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": "

$\\simplify{{maP3a}}-\\simplify{{maP3b}} =$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "maP3a - maP3b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "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": "

$\\simplify{{maP4a}}+\\simplify{{maP4b}} =$ [[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": "maP4a + maP4b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": "9", "minRows": 1, "maxRows": "9"}], "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": "

$\\simplify{{maP5a}}-\\simplify{{maP5b}} =$ [[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": "maP5a - maP5b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": "9", "minRows": 1, "maxRows": "9"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Mark Patterson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5064/"}]}]}], "contributors": [{"name": "Mark Patterson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5064/"}]}