// Numbas version: finer_feedback_settings {"name": "3x3 matrix: Cofactors, Determinant, Inverse, Equation solving", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"prompt": "
Calculate the nine cofactors of A=$\\var{matrixA}$
\n(where $cof _{ij}$ represents the element in position $i,j$ of the cofactor matrix)
\n$cof _{11}=$ [[0]]
\n$cof_{12}=$ [[1]]
\n$cof_{13}=$ [[2]]
\n$cof_{21}=$ [[3]]
\n$cof_{22}=$ [[4]]
\n$cof_{23}=$ [[5]]
\n$cof_{31}=$ [[6]]
\n$cof_{32}=$ [[7]]
\n$cof_{33}=$ [[8]]
", "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "gaps": [{"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{cof11}", "correctAnswerStyle": "plain", "maxValue": "{cof11}", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": true, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "1", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}, {"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{cof12}", "correctAnswerStyle": "plain", "maxValue": "{cof12}", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "1", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}, {"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{cof13}", "correctAnswerStyle": "plain", "maxValue": "{cof13}", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "1", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}, {"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{cof21}", "correctAnswerStyle": "plain", "maxValue": "{cof21}", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "1", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}, {"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{cof22}", "correctAnswerStyle": "plain", "maxValue": "{cof22}", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "1", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}, {"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{cof23}", "correctAnswerStyle": "plain", "maxValue": "{cof23}", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "1", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}, {"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{cof31}", "correctAnswerStyle": "plain", "maxValue": "{cof31}", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "1", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}, {"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{cof32}", "correctAnswerStyle": "plain", "maxValue": "{cof32}", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "1", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}, {"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{cof33}", "correctAnswerStyle": "plain", "maxValue": "{cof33}", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "1", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}], "customMarkingAlgorithm": "", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": []}, {"prompt": "What is the determinant of A=$\\var{matrixA}$?
\n[[0]]
", "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "gaps": [{"extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(matrixA)", "correctAnswerStyle": "plain", "maxValue": "det(matrixA)", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "mustBeReducedPC": 0, "mustBeReduced": false, "customMarkingAlgorithm": "", "marks": "4", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": []}], "customMarkingAlgorithm": "", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": []}, {"prompt": "\nWhat is the inverse of A=$\\var{matrixA}$? Elements will be accepted as fractions or correct to 2 decimal places.
\n[[0]]
", "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "gaps": [{"numRows": "3", "allowResize": true, "correctAnswer": "precround(inverseA,3)", "correctAnswerFractions": false, "unitTests": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "scripts": {}, "numColumns": "3", "allowFractions": true, "variableReplacementStrategy": "originalfirst", "type": "matrix", "markPerCell": false, "customMarkingAlgorithm": "", "tolerance": "0.005", "marks": "4", "extendBaseMarkingAlgorithm": true, "variableReplacements": []}], "customMarkingAlgorithm": "", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": []}, {"numRows": "3", "allowResize": false, "prompt": "Hence solve the equation
\n$ \\var{matrixA} \\left(\\matrix{x\\\\y\\\\z}\\right) = \\var{vectorb}$
\n\n$ \\left(\\matrix{x\\\\y\\\\z}\\right) = $
", "correctAnswer": "precround(inverseA*vectorb,3)", "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "numColumns": 1, "allowFractions": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFractions": false, "tolerance": "0.01", "markPerCell": false, "customMarkingAlgorithm": "", "type": "matrix", "marks": "3", "extendBaseMarkingAlgorithm": true, "variableReplacements": []}], "variablesTest": {"maxRuns": "5", "condition": "det(matrixA)<>0"}, "variable_groups": [{"variables": ["cof11", "cof12", "cof13", "cof21", "cof22", "cof23", "cof31", "cof32", "cof33"], "name": "cofactors"}, {"variables": [], "name": "Unnamed group"}, {"variables": ["b1", "b2", "b3", "vectorb"], "name": "Vector b"}], "extensions": [], "functions": {}, "advice": "If \\[ A=\\left( \\begin{array}{ccc}
a & b & c \\\\d & e&f\\\\ g&h&j \\end{array} \\right),\\]
Cofactors are given by
\nCof11 =\\[ +\\left| \\begin{array}{ccc}
e&f\\\\ h&j \\end{array} \\right|,\\]
Cof12 =\\[ -\\left| \\begin{array}{ccc}
d & f\\\\ g&j \\end{array} \\right|,\\]
Cof13 =\\[ +\\left| \\begin{array}{ccc}
d & e\\\\ g&h\\end{array} \\right|,\\]
Cof21 =\\[ -\\left| \\begin{array}{ccc}
b & c \\\\h&j \\end{array} \\right|,\\]
Cof22 =\\[ +\\left| \\begin{array}{ccc}
a & c \\\\ g&j \\end{array} \\right|,\\]
Cof23 =\\[ -\\left| \\begin{array}{ccc}
a & b \\\\g&h\\end{array} \\right|,\\]
Cof31 =\\[ +\\left| \\begin{array}{ccc}
b & c \\\\e&f\\end{array} \\right|,\\]
Cof32 =\\[ -\\left| \\begin{array}{ccc}
a & c \\\\d & f\\end{array} \\right|,\\]
Cof33 =\\[ +\\left| \\begin{array}{ccc}
a & b\\\\d & e \\end{array} \\right|,\\]
(b) Then, the determinant, det(A) is given by the sum of the product of any row ( or column) elements by their cofactors
\ne.g using row 1, we obtain the determinant = $a \\times cof_{11}+b \\times cof_{12}+c \\times cof_{13}$
\n$= \\var{a11} \\times \\var{cof11} +\\var{a12} \\times \\var{cof12}+\\var{a13} \\times \\var{cof13} = \\var{det(matrixA)}$
\n(c) The inverse of A, $\\ A^{-1}$ is given by dividing adj(A) by det(A)
\nwhere the adjoint, adj(A) is given by taking the transpose of the cofactor matrix, i.e.
\nadj(A) =\\[ \\left( \\begin{array}{ccc}
cof11 & cof21 & cof31 \\\\cof12 & cof22&cof32\\\\ cof13&cof23&cof33 \\end{array} \\right),\\]
Then $\\ A^{-1}$=\\[ \\frac{1}{det(A)} \\times \\left( \\begin{array}{ccc}
cof11 & cof21 & cof31 \\\\cof12 & cof22&cof32\\\\ cof13&cof23&cof33 \\end{array} \\right),\\]
$\\ A^{-1}$=\\[ \\frac{1}{\\var{det(matrixA)}} \\times \\left( \\begin{array}{ccc}
\\var{cof11} & \\var{cof21} & \\var{cof31} \\\\\\var{cof12} & \\var{cof22}&\\var{cof32}\\\\ \\var{cof13}&\\var{cof23}&\\var{cof33} \\end{array} \\right),\\]
$\\ A^{-1}=\\var{precround(inverseA,3)}$
\n(d) The equation $ A \\mathbf{x}=\\mathbf{b} $ can be solved by premultiplying each side by $A^{-1}$ giving $\\mathbf{x} = A^{-1}\\mathbf{b}$
\ni.e. $ \\left(\\matrix{x\\\\y\\\\z}\\right) = \\var{matrixA}^{-1} \\var{vectorb}$
\n$ \\left(\\matrix{x\\\\y\\\\z}\\right) = \\var{precround(inverseA,3)} \\var{vectorb} = \\var{precround(inverseA*vectorb,3)}$
", "rulesets": {}, "metadata": {"description": "Cofactors Determinant and inverse of a 3x3 matrix.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "variables": {"a23": {"templateType": "anything", "description": "", "definition": "random(-4..4)", "group": "Ungrouped variables", "name": "a23"}, "b2": {"templateType": "anything", "description": "", "definition": "random(-3..6 except 0)", "group": "Vector b", "name": "b2"}, "cof13": {"templateType": "anything", "description": "", "definition": "a21*a32-a31*a22", "group": "cofactors", "name": "cof13"}, "cof31": {"templateType": "anything", "description": "", "definition": "a12*a23-a22*a13", "group": "cofactors", "name": "cof31"}, "matrixA": {"templateType": "anything", "description": "", "definition": "matrix([a11,a12,a13],[a21,a22,a23],[a31,a32,a33])", "group": "Ungrouped variables", "name": "matrixA"}, "b1": {"templateType": "anything", "description": "", "definition": "random(-5..5)", "group": "Vector b", "name": "b1"}, "cof12": {"templateType": "anything", "description": "", "definition": "a23*a31-a21*a33", "group": "cofactors", "name": "cof12"}, "a12": {"templateType": "anything", "description": "", "definition": "random(-2..4)", "group": "Ungrouped variables", "name": "a12"}, "cof21": {"templateType": "anything", "description": "", "definition": "a32*a13-a12*a33", "group": "cofactors", "name": "cof21"}, "cof11": {"templateType": "anything", "description": "", "definition": "a22*a33-a32*a23", "group": "cofactors", "name": "cof11"}, "a11": {"templateType": "anything", "description": "", "definition": "random(-3..3)", "group": "Ungrouped variables", "name": "a11"}, "inverseA": {"templateType": "anything", "description": "", "definition": "matrix([cof11,cof21,cof31],[cof12,cof22,cof32],[cof13,cof23,cof33])/det(matrixA)", "group": "Ungrouped variables", "name": "inverseA"}, "a31": {"templateType": "anything", "description": "", "definition": "random(0..4)", "group": "Ungrouped variables", "name": "a31"}, "a33": {"templateType": "anything", "description": "", "definition": "random(-4..4)", "group": "Ungrouped variables", "name": "a33"}, "cof23": {"templateType": "anything", "description": "cof23
", "definition": "a12*a31-a11*a32", "group": "cofactors", "name": "cof23"}, "vectorb": {"templateType": "anything", "description": "", "definition": "matrix([b1],[b2],[b3])", "group": "Vector b", "name": "vectorb"}, "a13": {"templateType": "anything", "description": "", "definition": "random(-5..5)", "group": "Ungrouped variables", "name": "a13"}, "a21": {"templateType": "anything", "description": "", "definition": "random(3..8)", "group": "Ungrouped variables", "name": "a21"}, "cof32": {"templateType": "anything", "description": "", "definition": "a13*a21-a11*a23", "group": "cofactors", "name": "cof32"}, "b3": {"templateType": "anything", "description": "", "definition": "random(0..9)", "group": "Vector b", "name": "b3"}, "cof22": {"templateType": "anything", "description": "", "definition": "a11*a33-a31*a13", "group": "cofactors", "name": "cof22"}, "a32": {"templateType": "anything", "description": "", "definition": "random(-4..2)", "group": "Ungrouped variables", "name": "a32"}, "a22": {"templateType": "anything", "description": "", "definition": "random(0..5 except(a21*a12/a11))", "group": "Ungrouped variables", "name": "a22"}, "cof33": {"templateType": "anything", "description": "", "definition": "a11*a22-a12*a21", "group": "cofactors", "name": "cof33"}}, "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["matrixA", "a11", "a12", "a21", "a22", "a13", "a23", "a31", "a32", "a33", "inverseA"], "tags": [], "name": "3x3 matrix: Cofactors, Determinant, Inverse, Equation solving", "type": "question", "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}