// Numbas version: finer_feedback_settings {"name": "Can you add these matrices?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Can you add these matrices?", "tags": [], "metadata": {"description": "
Decide if matrix sizes match so they can be added.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Decide if the following matrices can be added or not.
", "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.
\nBoth matrices have size \\(\\var{m1}\\times \\var{n1}\\), so we can add them. The matrices have the same number of columns, but not the same number of rows. So we cannot add them. The matrices have the same number or rows, but not the same number of columns. So we cannot add them. The matrices have different sizes, so we cannot add them.
", "rulesets": {}, "extensions": [], "variables": {"m1": {"name": "m1", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "number of rows of first matrix
", "templateType": "anything"}, "m2": {"name": "m2", "group": "Ungrouped variables", "definition": "switch(d=1,m1,d=2,random(1..5 except m1),d=3,m1,d=4,random(1..5 except m1),m1)", "description": "number of rows of second matrix, sometimes the same sometimes different to the first matrix, depending on d
", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "determines the case
", "templateType": "anything"}, "n1": {"name": "n1", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "number of columns of first matrix
", "templateType": "anything"}, "n2": {"name": "n2", "group": "Ungrouped variables", "definition": "switch(d=1,n1,d=2,n1,d=3,random(1..5 except n1),d=4,random(1..5 except n1),n1)", "description": "number of rows of second matrix, sometimes the same sometimes different to the first matrix, depending on d
", "templateType": "anything"}, "A": {"name": "A", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-10..10),n1),m1))", "description": "", "templateType": "anything"}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-10..10),n2),m2))", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["m1", "m2", "n1", "n2", "d", "A", "B"], "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": "\\(\\var{A}+\\var{B}\\)
\n[[0]]
", "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": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["can add", "cannot add"], "matrix": "switch(d=1,[1,0],d<>1,[0,1],[1,0])"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "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/"}]}