// Numbas version: finer_feedback_settings {"name": "Trace of a matrix (same as WBQ 1.21)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Trace of a matrix (same as WBQ 1.21)", "tags": [], "metadata": {"description": "
Calculate trace of a matrix. Fixed matrices as the same as in our workbook.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Calculate the trace of the following matrices. (These are the same as in WB Question 1.21: you will not get different ones when you select \"Try another question like this one\". There is another question where you can find the trace of a random matrix. See link in Workbook.)
", "advice": "The trace of a square matrix is the sum of the diagonal elements.
\na) \\(\\mathrm{tr}\\var{A}=\\var{A[0][0]}+\\var{A[1][1]}=\\var{trA}\\).
\nb) \\(\\mathrm{tr}\\var{B}=\\var{B[0][0]}+\\var{B[1][1]}=\\var{trB}\\).
\nc) \\(\\mathrm{tr}\\var{C}=\\var{C[0][0]}+\\var{C[1][1]}+\\var{C[2][2]}=\\var{trC}\\).
\nd) \\(\\mathrm{tr}\\var{D}=\\var{D[0][0]}+\\var{D[1][1]}+\\var{D[2][2]}+\\var{D[3][3]}=\\var{trD}\\).
", "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([9,1,0],[3,8,4],[9,2,2])", "description": "", "templateType": "anything"}, "D": {"name": "D", "group": "Ungrouped variables", "definition": "matrix([2,8,8,1],[7,2,2,1],[10,-4,2,-2],[9,-100,15,29])", "description": "", "templateType": "anything"}, "trA": {"name": "trA", "group": "Ungrouped variables", "definition": "sum(map(A[k][k],k,0..1))", "description": "trace
", "templateType": "anything"}, "trB": {"name": "trB", "group": "Ungrouped variables", "definition": "sum(map(B[k][k],k,0..1))", "description": "trace
", "templateType": "anything"}, "trC": {"name": "trC", "group": "Ungrouped variables", "definition": "sum(map(C[k][k],k,0..2))", "description": "trace
", "templateType": "anything"}, "trD": {"name": "trD", "group": "Ungrouped variables", "definition": "sum(map(D[k][k],k,0..3))", "description": "trace
", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["A", "B", "C", "D", "trA", "trB", "trC", "trD"], "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": "\\(\\mathrm{tr}\\var{A}=\\) [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "trA", "maxValue": "trA", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "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": "\\(\\mathrm{tr}\\var{B}=\\) [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "trB", "maxValue": "trB", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "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": "\\(\\mathrm{tr}\\var{C}=\\) [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "trC", "maxValue": "trC", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "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": "\\(\\mathrm{tr}\\var{D}=\\) [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "trD", "maxValue": "trD", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "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/"}]}