// Numbas version: finer_feedback_settings {"name": "LM08 Determinant of a 3x3 matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "LM08 Determinant of a 3x3 matrix", "tags": [], "metadata": {"description": "
Cofactors Determinant and inverse of a 3x3 matrix.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "The Determinant of a 3x3 matrix
", "advice": "Determinant of a 3X3 matrix
\nMinors
\nIn order to understand the process of finding a determinant for a 3x3 (or larger square) matrix we introduce the idea of a minor.
\nFor example we will look at the matrix, $M$, defined as
\n$$
M = \\var{Example}.
$$
Each element of $M$ has an associated minor. The minor is formed from finding the detrminant of the remaining matrix after you have removed the row and column containg that element. For example, consider the minor for element $m_{12} = 2$. We remove the row and column containg $m_{12}$ (the top row and the second column) leaving:
\n$$
\\begin{vmatrix}
4 & 6\\\\
7 & 9
\\end{vmatrix} = 4*9-6*7 = -6
$$
Cofactors
\nThe next important concept is a cofactor (you don't need to calculate ALL of the cofactors for finding a determinant but you will need them to go on and find the inverse of a 3x3 matrix). A cofactor is the a minor with a sign attached. The appropriate sign comes from the pattern of alternating signs:
\n\n$$
\\begin{array}{ccc}
+ & - & +\\\\
- & + & - \\\\
+ & - & +\\\\
\\end{array}
$$
So to continue the example above we would say the cofactor for entry $m_{12} = -(-6) = 6$.
\nThe determinant is then calculated by choosing a row or column and taking the sum of the entries multiplied by their cofactors.
\nPutting it all together
\nFor simplicity we will choose the top row for this example.
\n$$
\\begin{aligned}
\\det{M} &= 1*\\begin{vmatrix}
5 & 6 \\\\
8 & 9 \\\\
\\end{vmatrix} - 2* \\begin{vmatrix}
4 & 6 \\\\
7 & 9 \\\\
\\end{vmatrix} + 3* \\begin{vmatrix}
4 & 5 \\\\
7 & 8 \\\\
\\end{vmatrix} \\\\
&= 1 \\times -3 - \\left(2 \\times -6 \\right) + 3 \\times -3 \\\\
&= 0
\\end{aligned}
$$
Worked solution
\nFor the question given the same calculation can be carried out as follows:
\n$$
\\begin{aligned}
\\det{A}
&= \\var{matrixA[0][0]}
\\begin{vmatrix}
\\var{matrixA[1][1]} & \\var{matrixA[1][2]} \\\\
\\var{matrixA[2][1]} & \\var{matrixA[2][2]} \\\\
\\end{vmatrix} - \\var{matrixA[0][1]} \\begin{vmatrix}
\\var{matrixA[1][0]} & \\var{matrixA[1][2]} \\\\
\\var{matrixA[2][0]} & \\var{matrixA[2][2]} \\\\
\\end{vmatrix} + \\var{matrixA[0][2]} \\begin{vmatrix}
\\var{matrixA[1][0]} & \\var{matrixA[1][1]} \\\\
\\var{matrixA[2][0]} & \\var{matrixA[2][1]} \\\\
\\end{vmatrix} \\\\
&= \\var{matrixA[0][0]} \\times \\var{min11} - \\left(\\var{matrixA[0][1]} \\times \\var{min12}\\right) + \\var{matrixA[0][2]} \\times \\var{min13} \\\\
&= \\var{answer}
\\end{aligned}
$$
Use this link to find some resources which will help you revise this topic.
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"min11": {"name": "min11", "group": "Ungrouped variables", "definition": "matrixa[1][1]*matrixa[2][2]- matrixA[2][1]*matrixa[1][2]", "description": "", "templateType": "anything", "can_override": false}, "min12": {"name": "min12", "group": "Ungrouped variables", "definition": "matrixa[1][0]*matrixa[2][2]- matrixA[2][0]*matrixa[1][2]", "description": "", "templateType": "anything", "can_override": false}, "min13": {"name": "min13", "group": "Ungrouped variables", "definition": "matrixa[1][0]*matrixa[2][1]- matrixA[2][0]*matrixa[1][1]", "description": "", "templateType": "anything", "can_override": false}, "matrixa": {"name": "matrixa", "group": "Unnamed group", "definition": "matrix(repeat(repeat(random(-10..10),3),3))", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "Unnamed group", "definition": "det(matrixa)", "description": "", "templateType": "anything", "can_override": false}, "deta": {"name": "deta", "group": "Ungrouped variables", "definition": "matrixa[0][0]*min11-matrixa[0][1]*min12+matrixa[0][2]*min13", "description": "", "templateType": "anything", "can_override": false}, "Example": {"name": "Example", "group": "Unnamed group", "definition": "matrix([1,2,3],[4,5,6],[7,8,9])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["min11", "min12", "min13", "deta"], "variable_groups": [{"name": "cofactors", "variables": []}, {"name": "Unnamed group", "variables": ["matrixa", "answer", "Example"]}], "functions": {"Latezcodebits": {"parameters": [["m", "number"], ["n", "number"]], "type": "list", "language": "jme", "definition": "repeat(repeat('&',n-1)+['\\\\\\\\'],m-1)+[repeat('&',n-1)+['']]"}, "stringify": {"parameters": [["input", "list"]], "type": "string", "language": "javascript", "definition": "var output = '';\nvar i;\nfor (i = 0; i < input.length; i++) {\n output += input[i];\n} \nreturn output;"}}, "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": "Let:
\n$$
A=\\var{matrixA}
$$
Find the determinant of $A$
\n$\\det A =$ [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "det a", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": true, "customName": "decimal", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "answer", "maxValue": "answer", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "answer", "maxValue": "answer", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}, {"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Lauren Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21504/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}], "resources": []}]}], "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}, {"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Lauren Desoysa", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21504/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}]}