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

Exercises on inverting 2x2 and 3x3 matrices.

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

Matrix Inversion

\n

\n

Invert the following matrices. (Input your answers as fractions.)

", "advice": "", "rulesets": {}, "extensions": [], "variables": {"maA": {"name": "maA", "group": "Ungrouped variables", "definition": "matrixRandomInvertable(matrixrandom(2,2))", "description": "", "templateType": "anything"}, "detA": {"name": "detA", "group": "Ungrouped variables", "definition": "det(maA)", "description": "", "templateType": "anything"}, "detTest": {"name": "detTest", "group": "Ungrouped variables", "definition": "det(matrixrandom(2,2))", "description": "", "templateType": "anything"}, "maB": {"name": "maB", "group": "Ungrouped variables", "definition": "matrixRandomInvertable(matrixrandom(2,2))", "description": "", "templateType": "anything"}, "maC": {"name": "maC", "group": "Ungrouped variables", "definition": "matrixRandomInvertable(matrixrandom(3,3))", "description": "", "templateType": "anything"}, "maD": {"name": "maD", "group": "Ungrouped variables", "definition": "matrixRandomInvertable(matrixrandom(3,3))", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "detA<>0", "maxRuns": 100}, "ungrouped_variables": ["maA", "detA", "detTest", "maB", "maC", "maD"], "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))"}, "matrixRandomInvertable": {"parameters": [["ma", "matrix"]], "type": "matrix", "language": "jme", "definition": "if(det(ma)<>0,ma,\n matrixRandomInvertable(\n matrix(repeat(repeat(random(0..9)*(random(1,1,1,-1)),numcolumns(ma)),numrows(ma)))\n )\n)"}, "inv2by2": {"parameters": [["m", "matrix"]], "type": "matrix", "language": "jme", "definition": "transpose(matrix([\n [m[1][1], -m[1][0]],\n [-m[0][1], m[0][0]]\n]))/det(m)"}, "inv3by3": {"parameters": [["m", "matrix"]], "type": "matrix", "language": "jme", "definition": "transpose(matrix([\n [m[1][1]*m[2][2]-m[2][1]*m[1][2], -(m[1][0]*m[2][2]-m[2][0]*m[1][2]), m[1][0]*m[2][1]-m[2][0]*m[1][1]],\n [-(m[0][1]*m[2][2]-m[2][1]*m[0][2]), m[0][0]*m[2][2]-m[2][0]*m[0][2], -(m[0][0]*m[2][1]-m[2][0]*m[0][1])],\n [m[0][1]*m[1][2]-m[1][1]*m[0][2], -(m[0][0]*m[1][2]-m[1][0]*m[0][2]), m[0][0]*m[1][1]-m[1][0]*m[0][1]]\n]))/det(m)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"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, "prompt": "

$A = \\simplify{{maA}}$

", "correctAnswer": "inv2by2(maA)", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": "0.003", "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"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, "prompt": "

$B = \\simplify{{maB}}$

", "correctAnswer": "inv2by2(maB)", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": "0.003", "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": "9", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$C = \\simplify{{maC}}$

", "correctAnswer": "inv3by3(maC)", "correctAnswerFractions": true, "numRows": "3", "numColumns": "3", "allowResize": false, "tolerance": "0.003", "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": "9", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$D = \\simplify{{maD}}$

", "correctAnswer": "inv3by3(maD)", "correctAnswerFractions": true, "numRows": "3", "numColumns": "3", "allowResize": false, "tolerance": "0.003", "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "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/"}]}