// Numbas version: exam_results_page_options {"name": "Matrices Recap Exercises", "metadata": {"description": "", "licence": "None specified"}, "duration": 0, "percentPass": "40", "showQuestionGroupNames": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", ""], "questions": [{"name": "Matrix Addition and Subtraction", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Mark Patterson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5064/"}], "tags": ["matrices"], "metadata": {"description": "

Exercises covering matrix addition and subtraction

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

Matrix Addition and Subtraction

\n

\n

Perform the following matrix additions and subtractions:

", "advice": "

To add or subtract matrices, the matrices need to be of the same order (same number of rows and columns). We then add or subtract each corresponding element.

\n

e.g.

\n

\\[ \\begin{pmatrix} a_{1,1} & a_{1,2} \\\\ a_{2,1} & a_{2,2} \\\\ \\end{pmatrix} + \\begin{pmatrix} b_{1,1} & b_{1,2} \\\\ b_{2,1} & b_{2,2} \\\\ \\end{pmatrix} = \\begin{pmatrix} a_{1,1} + b_{1,1} & a_{1,2} + b_{1,2} \\\\ a_{2,1} + b_{2,1} & a_{2,2} + b_{2,2} \\\\ \\end{pmatrix} \\]

\n

\n

The resulting matrix will also be of the same order.

\n

\n

e.g. Part a)

\n

\\[ \\simplify{{maP1a}} + \\simplify{{maP1b}} = \\begin{pmatrix} \\var{maP1a[0][0]} + \\var{maP1b[0][0]} & \\var{maP1a[0][1]} + \\var{maP1b[0][1]} \\\\ \\var{maP1a[1][0]} + \\var{maP1b[1][0]} & \\var{maP1a[1][1]} + \\var{maP1b[1][1]} \\\\ \\end{pmatrix} = \\simplify{{maP1a + maP1b}} \\]

", "rulesets": {}, "variables": {"maP1a": {"name": "maP1a", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP1b": {"name": "maP1b", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP2a": {"name": "maP2a", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP2b": {"name": "maP2b", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP3a": {"name": "maP3a", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP3b": {"name": "maP3b", "group": "Ungrouped variables", "definition": "matrixrandom(2,2)", "description": "", "templateType": "anything"}, "maP4a": {"name": "maP4a", "group": "Ungrouped variables", "definition": "matrixrandom(2,4)", "description": "", "templateType": "anything"}, "maP4b": {"name": "maP4b", "group": "Ungrouped variables", "definition": "matrixrandom(2,4)", "description": "", "templateType": "anything"}, "maP5a": {"name": "maP5a", "group": "Ungrouped variables", "definition": "matrixrandom(4,4)", "description": "", "templateType": "anything"}, "maP5b": {"name": "maP5b", "group": "Ungrouped variables", "definition": "matrixrandom(4,4)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["maP1a", "maP1b", "maP2a", "maP2b", "maP3a", "maP3b", "maP4a", "maP4b", "maP5a", "maP5b"], "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))"}}, "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": "

$\\simplify{{maP1a}}+\\simplify{{maP1b}} =$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "maP1a + maP1b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": "1", "maxColumns": "9", "minRows": 1, "maxRows": "9"}], "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": "

$\\simplify{{maP2a}}+\\simplify{{maP2b}} =$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "maP2a + maP2b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": "1", "maxColumns": "9", "minRows": 1, "maxRows": "9"}], "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": "

$\\simplify{{maP3a}}-\\simplify{{maP3b}} =$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "maP3a - maP3b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "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": "

$\\simplify{{maP4a}}+\\simplify{{maP4b}} =$ [[0]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "maP4a + maP4b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": "9", "minRows": 1, "maxRows": "9"}], "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": "

$\\simplify{{maP5a}}-\\simplify{{maP5b}} =$ [[0]]

", "gaps": [{"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, "correctAnswer": "maP5a - maP5b", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": true, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": "9", "minRows": 1, "maxRows": "9"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Determinant and inverse of 2x2 matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Martin Jones", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/145/"}], "preamble": {"js": "", "css": ""}, "variable_groups": [], "variablesTest": {"condition": "det<>0", "maxRuns": 100}, "functions": {}, "tags": [], "advice": "", "variables": {"a": {"description": "", "definition": "random(-5..5)", "name": "a", "group": "Ungrouped variables", "templateType": "anything"}, "det": {"description": "", "definition": "a*d-b*c", "name": "det", "group": "Ungrouped variables", "templateType": "anything"}, "c": {"description": "", "definition": "random(-5..5)", "name": "c", "group": "Ungrouped variables", "templateType": "anything"}, "M": {"description": "", "definition": "matrix([a,b],[c,d])", "name": "M", "group": "Ungrouped variables", "templateType": "anything"}, "b": {"description": "", "definition": "random(-5..5)", "name": "b", "group": "Ungrouped variables", "templateType": "anything"}, "d": {"description": "", "definition": "random(-5..5)", "name": "d", "group": "Ungrouped variables", "templateType": "anything"}}, "parts": [{"vsetrange": [0, 1], "scripts": {}, "showCorrectAnswer": true, "checkingaccuracy": 0.001, "variableReplacements": [], "marks": 1, "checkvariablenames": false, "answer": "{det}", "type": "jme", "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "showpreview": false, "prompt": "

What is determinant of $A$?

", "showFeedbackIcon": true, "expectedvariablenames": [], "checkingtype": "absdiff"}, {"scripts": {}, "showCorrectAnswer": true, "tolerance": 0, "allowFractions": false, "correctAnswer": "matrix([d,-b],[-c,a])", "variableReplacements": [], "marks": "4", "numColumns": "2", "allowResize": false, "type": "matrix", "variableReplacementStrategy": "originalfirst", "numRows": "2", "markPerCell": true, "correctAnswerFractions": false, "prompt": "

Write down the adjoint of $A$. (Swap top-left and bottom-right entries; change signs of top-right and bottom-left entries.)

", "showFeedbackIcon": true}, {"scripts": {}, "showCorrectAnswer": true, "tolerance": 0, "allowFractions": true, "correctAnswer": "matrix([d/det,-b/det],[-c/det,a/det])", "variableReplacements": [], "marks": "4", "numColumns": "2", "allowResize": false, "type": "matrix", "variableReplacementStrategy": "originalfirst", "numRows": "2", "markPerCell": true, "correctAnswerFractions": true, "prompt": "

Hence write down the inverse of $A$. Write the entries as fractions or decimals.

", "showFeedbackIcon": true}], "ungrouped_variables": ["M", "a", "b", "c", "d", "det"], "metadata": {"description": "", "licence": "None specified"}, "statement": "

The matrix $A$ is:

\n

\\[A=\\var{M}\\]

", "rulesets": {}, "type": "question"}, {"name": "Determinant and inverse of 3x3 matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Martin Jones", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/145/"}], "variables": {"m11": {"group": "Matrix entries", "templateType": "anything", "definition": "random(-5..5)", "name": "m11", "description": ""}, "a22": {"group": "Minors", "templateType": "anything", "definition": "m11*m33-m13*m31", "name": "a22", "description": ""}, "a23": {"group": "Minors", "templateType": "anything", "definition": "m11*m32-m12*m31", "name": "a23", "description": ""}, "m12": {"group": "Matrix entries", "templateType": "anything", "definition": "random(-5..5)", "name": "m12", "description": ""}, "m13": {"group": "Matrix entries", "templateType": "anything", "definition": "random(-5..5)", "name": "m13", "description": ""}, "m32": {"group": "Matrix entries", "templateType": "anything", "definition": "random(-5..5)", "name": "m32", "description": ""}, "M": {"group": "Ungrouped variables", "templateType": "anything", "definition": "matrix([m11,m12,m13],[m21,m22,m23],[m31,m32,m33])", "name": "M", "description": ""}, "a32": {"group": "Minors", "templateType": "anything", "definition": "m11*m23-m13*m21", "name": "a32", "description": ""}, "m23": {"group": "Matrix entries", "templateType": "anything", "definition": "random(-5..5)", "name": "m23", "description": ""}, "a21": {"group": "Minors", "templateType": "anything", "definition": "m12*m33-m13*m32", "name": "a21", "description": ""}, "a13": {"group": "Minors", "templateType": "anything", "definition": "m21*m32-m22*m31", "name": "a13", "description": ""}, "m22": {"group": "Matrix entries", "templateType": "anything", "definition": "random(-5..5)", "name": "m22", "description": ""}, "a31": {"group": "Minors", "templateType": "anything", "definition": "m12*m23-m13*m22", "name": "a31", "description": ""}, "a12": {"group": "Minors", "templateType": "anything", "definition": "m21*m33-m23*m31", "name": "a12", "description": ""}, "det": {"group": "Ungrouped variables", "templateType": "anything", "definition": "det(M)", "name": "det", "description": ""}, "m33": {"group": "Matrix entries", "templateType": "anything", "definition": "random(-5..5)", "name": "m33", "description": ""}, "a33": {"group": "Minors", "templateType": "anything", "definition": "m11*m22-m12*m21", "name": "a33", "description": ""}, "m31": {"group": "Matrix entries", "templateType": "anything", "definition": "random(-5..5)", "name": "m31", "description": ""}, "m21": {"group": "Matrix entries", "templateType": "anything", "definition": "random(-5..5)", "name": "m21", "description": ""}, "a11": {"group": "Minors", "templateType": "anything", "definition": "m22*m33-m23*m32", "name": "a11", "description": ""}}, "functions": {}, "tags": [], "parts": [{"showFeedbackIcon": true, "vsetrange": [0, 1], "scripts": {}, "vsetrangepoints": 5, "expectedvariablenames": [], "prompt": "

What is the determinant of $A$?

", "type": "jme", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "variableReplacements": [], "marks": "4", "checkvariablenames": false, "checkingtype": "absdiff", "showpreview": false, "answer": "{det}"}, {"showFeedbackIcon": true, "scripts": {}, "numRows": "3", "correctAnswerFractions": false, "prompt": "

Write down the minor matrix of $A$.

", "type": "matrix", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "allowResize": false, "numColumns": "3", "marks": "9", "correctAnswer": "matrix([a11,a12,a13],[a21,a22,a23],[a31,a32,a33])", "tolerance": 0, "markPerCell": true, "variableReplacements": [], "allowFractions": false}, {"showFeedbackIcon": true, "scripts": {}, "numRows": "3", "correctAnswerFractions": false, "prompt": "

Write down the cofactor matrix of $A$. (Certain entries change signs according to pattern below.)

\n

\\[\\begin{array}[ccc]++&-&+\\\\-&+&-\\\\+&-&+\\end{array}\\]

\n

", "type": "matrix", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "allowResize": false, "numColumns": "3", "marks": "9", "correctAnswer": "matrix([a11,-a12,a13],[-a21,a22,-a23],[a31,-a32,a33])", "tolerance": 0, "markPerCell": true, "variableReplacements": [], "allowFractions": false}, {"showFeedbackIcon": true, "scripts": {}, "numRows": "3", "correctAnswerFractions": false, "prompt": "

Write down the adjoint of $A$. (Transpose of the cofactor matrix.)

", "type": "matrix", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "allowResize": false, "numColumns": "3", "marks": "9", "correctAnswer": "matrix([a11,-a21,a31],[-a12,a22,-a32],[a13,-a23,a33])", "tolerance": 0, "markPerCell": true, "variableReplacements": [], "allowFractions": false}, {"marks": 0, "showFeedbackIcon": true, "scripts": {}, "gaps": [{"showFeedbackIcon": true, "scripts": {}, "correctAnswerStyle": "plain", "minValue": "{det}", "marks": "1", "type": "numberentry", "showCorrectAnswer": true, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "maxValue": "{det}", "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "allowFractions": false}, {"showFeedbackIcon": true, "scripts": {}, "numRows": "3", "correctAnswerFractions": true, "type": "matrix", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "allowResize": false, "numColumns": "3", "marks": "9", "correctAnswer": "matrix([a11,-a21,a31],[-a12,a22,-a32],[a13,-a23,a33])", "tolerance": 0, "markPerCell": true, "variableReplacements": [], "allowFractions": false}], "prompt": "

Hence write down the inverse of $A$.

\n\n\n\n\n\n\n\n\n\n\n
1[[1]]
[[0]]
", "variableReplacementStrategy": "originalfirst", "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true}], "variable_groups": [{"variables": ["m11", "m12", "m13", "m21", "m22", "m23", "m31", "m32", "m33"], "name": "Matrix entries"}, {"variables": ["a11", "a12", "a13", "a21", "a22", "a23", "a31", "a32", "a33"], "name": "Minors"}], "rulesets": {}, "preamble": {"js": "", "css": ""}, "statement": "

The matrix $A$ is:

\n

\\[A=\\var{M}\\]

", "advice": "", "ungrouped_variables": ["M", "det"], "metadata": {"licence": "None specified", "description": "

Determinant, minors, cofactors, adjoint and inverse.

"}, "variablesTest": {"maxRuns": 100, "condition": "det(M)<>0"}, "type": "question"}]}], "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "contributors": [{"name": "Mark Patterson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5064/"}], "extensions": [], "custom_part_types": [], "resources": []}