// Numbas version: finer_feedback_settings {"name": "Find examples: matrix multiplication giving zero", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Find examples: matrix multiplication giving zero", "tags": ["finding examples", "matrix multiplication"], "metadata": {"description": "
Asking the student to create examples of two matrices which multiply to zero but are not themselves the zero matrix. Then getting the student to think about some features of these examples.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "This question asks you to construct examples. You should think carefully about the examples you construct and how they differ from each other.
\nThe marks are encouraging you to find \\(3\\) correct examples.
\nYou will learn much better if you work hard on this question and try lots of different things before looking at the answers. The main point is not to get a correct answer, but the process of looking for them.
", "advice": "Looking for these examples gives you an insight into how matrix multiplication works.
\nHere are some options:
\n\\(\\var{A}\\var{B}=\\var{A*B}\\)
\n\\(\\var{C}\\var{D}=\\var{C*D}\\)
\n\\(\\var{A1}\\var{B1}=\\var{A1*B1}\\)
\nExplain to yourself what is the same and what is different about the flavour of these examples. Compare them to your own examples.
\nYou can see from the above that it is possible to make both matrices without any zero entries.
\nThe largest number of zero entries you can get across both \\(A\\) and \\(B\\) is \\(6\\): If you have any more, then one of the matrices is the zero matrix. But you can achieve \\(6\\):
\n\\(\\var{J}\\var{J1}=\\var{J*J1}\\)
\nWhile \\(A\\) and \\(B\\) in all above examples are different, here is an example where they are the same:
\n\\(\\var{J}\\var{J}=\\var{J*J}\\)
", "rulesets": {}, "extensions": [], "variables": {"A": {"name": "A", "group": "Ungrouped variables", "definition": "matrix([0,0],[1,-1])", "description": "", "templateType": "anything"}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "matrix([1,0],[1,0])", "description": "", "templateType": "anything"}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "matrix([1,1],[1,1])", "description": "", "templateType": "anything"}, "D": {"name": "D", "group": "Ungrouped variables", "definition": "matrix([1,1],[-1,-1])", "description": "", "templateType": "anything"}, "A1": {"name": "A1", "group": "Ungrouped variables", "definition": "matrix([0,0],[2,-3])", "description": "", "templateType": "anything"}, "B1": {"name": "B1", "group": "Ungrouped variables", "definition": "matrix([6,0],[4,0])", "description": "", "templateType": "anything"}, "zeromatrix": {"name": "zeromatrix", "group": "Ungrouped variables", "definition": "matrix([0,0],[0,0])", "description": "", "templateType": "anything"}, "examplecounter": {"name": "examplecounter", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything"}, "J": {"name": "J", "group": "Ungrouped variables", "definition": "matrix([0,1],[0,0])", "description": "", "templateType": "anything"}, "J1": {"name": "J1", "group": "Ungrouped variables", "definition": "matrix([1,0],[0,0])", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["A", "B", "C", "D", "A1", "B1", "zeromatrix", "examplecounter", "J", "J1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Matrix product is zero", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "gap_nonzero:\n map(result[\"credit\"]=1,result,gap_feedback)\n\nall_nonzero:\n if(all(gap_nonzero),true,false)\n\nis_product_zero (Is the student's matrix product zero?):\n if(all_nonzero,\n if(answers[0]*answers[1]=zeromatrix,\n correct(),\n incorrect(\"Your matrix product is {answers[0]*answers[1]}, which is not zero.\")\n );\n true,\n incorrect(\"One of your matrices is zero.\");\n false\n )\n\n\n\nmark:\n assert(all_valid, fail(translate(\"question.can not submit\")));\n apply(answers); \n apply(is_product_zero)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Find another example", "rawLabel": "Find another example", "otherPart": 0, "variableReplacements": [{"variable": "examplecounter", "definition": "if(is_product_zero,examplecounter+1,examplecounter)"}], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}, {"label": "Find features of the examples", "rawLabel": "Find features of the examples", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Give correct examples", "prompt": "Construct two \\(2\\times 2\\) matrices \\(A\\) and \\(B\\) such that \\(AB=0\\) but neither \\(A\\) nor \\(B\\) is the zero matrix.
\n\\(A= \\) [[0]]
\n\\(B= \\) [[1]]
\nYou have found {examplecounter-1} correct examples so far.
", "gaps": [{"type": "matrix", "useCustomName": true, "customName": "A", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "is_zero (Is the student's matrix zero?):\n if(studentMatrix=zeromatrix,\n incorrect(\"Your matrix should not be zero, but it is.\");\n false,\n correct(\"Your matrix is non-zero. Provisionally:\");\n true\n )\n\nmark:\n apply(any_empty);\n apply(any_invalid);\n apply(is_zero)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "A", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "B", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "is_zero (Is the student's matrix zero?):\n if(studentMatrix=zeromatrix,\n incorrect(\"Your matrix should not be zero, but it is.\"),\n correct(\"Your matrix is non-zero. Provisionally:\")\n )\n\nmark:\n apply(any_empty);\n apply(any_invalid);\n apply(is_zero)", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "B", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Features of the examples", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Find another example", "rawLabel": "Find another example", "otherPart": 0, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Can you make both matrices have no zero entries? [[0]]
\nWhat is the largest number of zeros you can include without either matrix being the zero matrix? [[1]]
\nDo the two matrices have to be different or can they be the same? [[2]]
\nYou can go back to the previous part if you want to test a new example.
", "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": "Understand features of the examples", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["yes", "no"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Understand features of the examples", "minValue": "6", "maxValue": "6", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "Understand features of the examples", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["They have to be different.", "They can be the same."], "matrix": [0, "1"], "distractors": ["", ""]}], "sortAnswers": false}], "partsMode": "explore", "maxMarks": "10", "objectives": [{"name": "Give correct examples", "limit": "6", "mode": "sum"}, {"name": "Understand features of the examples", "limit": "4", "mode": "sum"}], "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/"}]}