// Numbas version: exam_results_page_options {"name": "Can you multiply matrices of these sizes?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Can you multiply matrices of these sizes?", "tags": ["matrix multiplication", "size of matrices"], "metadata": {"description": "

checking by size whether two matrices can be multiplied. Student either gives size of resulting product, or NA if matrices can't be multiplied.

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

Let \\(A\\) be a \\(\\var{m}\\times\\var{n}\\) matrix, and \\(B\\) a \\(\\var{k}\\times\\var{l}\\) matrix.

", "advice": "

We can multiply an \\(m\\times k\\) matrix and a \\(k\\times n\\) matrix, i.e. the number of columns of the first matrix and the number of rows of the second matrix have to match. The resulting product has size \\(m\\times n\\).

\n

You can see the correct solution above.

", "rulesets": {}, "extensions": [], "variables": {"m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "l": {"name": "l", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "solution": {"name": "solution", "group": "Ungrouped variables", "definition": "if(n=k,'{m}x{l}','NA')", "description": "", "templateType": "anything"}, "solutionBA": {"name": "solutionBA", "group": "Ungrouped variables", "definition": "if(m=l,'{k}x{n}','NA')", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "n=k or m=l", "maxRuns": 100}, "ungrouped_variables": ["m", "n", "k", "l", "solution", "solutionBA"], "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": "

Determine whether the product exists. If the product exists, then enter the size of the result matrix as mxn, using the correct numbers instead of m and n. If the product does not exist, enter NA.

\n

\\(AB\\): [[0]]

\n

\\(BA\\): [[1]]

", "gaps": [{"type": "patternmatch", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{solution}", "displayAnswer": "", "matchMode": "exact"}, {"type": "patternmatch", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{solutionBA}", "displayAnswer": "", "matchMode": "exact"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "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/"}]}