// Numbas version: finer_feedback_settings {"name": "Inverse of a 3x3 matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

Given the matrix:

\n

\\(\\mathbf{A}=\\begin{pmatrix} {a11}&{a12}&{a13}\\\\ {a21}&{a22}&{a23}\\\\{a31}&{a32}&{a33} \\end{pmatrix}\\)

\n

The determinant of a 3x3 matrix is determined by the formula:

\n

\\(|\\mathbf{A}|={a11}*\\begin{vmatrix}{a22}&{a23}\\\\{a32}&{a33}\\end{vmatrix}-{a12}*\\begin{vmatrix}{a21}&{a23}\\\\{a31}&{a33}\\end{vmatrix}+{a13}*\\begin{vmatrix}{a21}&{a22}\\\\{a31}&{a32}\\end{vmatrix}\\)

\n

So in this example:

\n

\\(\\mathbf{A}=\\begin{pmatrix} \\var{a11}&\\var{a12}&\\var{a13}\\\\ \\var{a21}&\\var{a22}&\\var{a23}\\\\\\var{a31}&\\var{a32}&\\var{a33} \\end{pmatrix}\\)

\n

\\(|\\mathbf{A}|=\\var{a11}*\\begin{vmatrix}\\var{a22}&\\var{a23}\\\\\\var{a32}&\\var{a33}\\end{vmatrix}-\\var{a12}*\\begin{vmatrix}\\var{a21}&\\var{a23}\\\\\\var{a31}&\\var{a33}\\end{vmatrix}+\\var{a13}*\\begin{vmatrix}\\var{a21}&\\var{a22}\\\\\\var{a31}&\\var{a32}\\end{vmatrix}\\)

\n

\\(|\\mathbf{A}|=\\var{a11}*(\\var{a22}*\\var{a33}-\\var{a32}*\\var{a23})-\\var{a12}*(\\var{a21}*\\var{a33}-\\var{a31}*\\var{a23})+\\var{a13}*(\\var{a21}*\\var{a32}-\\var{a31}*\\var{a22})\\)

\n

\\(|\\mathbf{A}|=(\\simplify{{a11}*({a22}*{a33}-{a32}*{a23})})-(\\simplify{{a12}*({a21}*{a33}-{a31}*{a23})})+(\\simplify{{a13}*({a21}*{a32}-{a31}*{a22})})\\)

\n

\\(|\\mathbf{A}|=\\var{a11}\\)

\n

The adjoint of the matrix is given by:

\n

\\(\\mathbf{A}^*=\\begin{pmatrix}\\begin{vmatrix}\\var{a22}&\\var{a23}\\\\\\var{a32}&\\var{a33}\\end{vmatrix}&-\\begin{vmatrix}\\var{a21}&\\var{a23}\\\\\\var{a31}&\\var{a33}\\end{vmatrix}&\\begin{vmatrix}\\var{a21}&\\var{a22}\\\\\\var{a31}&\\var{a32}\\end{vmatrix}\\\\-\\begin{vmatrix}\\var{a12}&\\var{a13}\\\\\\var{a32}&\\var{a33}\\end{vmatrix}&\\begin{vmatrix}\\var{a11}&\\var{a13}\\\\\\var{a31}&\\var{a33}\\end{vmatrix}&-\\begin{vmatrix}\\var{a11}&\\var{a12}\\\\\\var{a31}&\\var{a32}\\end{vmatrix}\\\\\\begin{vmatrix}\\var{a12}&\\var{a13}\\\\\\var{a22}&\\var{a23}\\end{vmatrix}&-\\begin{vmatrix}\\var{a11}&\\var{a13}\\\\\\var{a21}&\\var{a23}\\end{vmatrix}&\\begin{vmatrix}\\var{a11}&\\var{a12}\\\\\\var{a21}&\\var{a11}\\end{vmatrix}\\end{pmatrix}^t\\)

\n

\\(\\mathbf{A}^*=\\begin{pmatrix}\\simplify{({a22}*{a33}-{a32}*{a23})}&\\simplify{({a23}*{a31}-{a21}*{a33})}&\\simplify{({a21}*{a32}-{a22}*{a31})}\\\\\\simplify{(-{a12}*{a33}+{a32}*{a13})}&\\simplify{({a11}*{a33}-{a13}*{a31})}&\\simplify{({a12}*{a31}-{a32}*{a11})}\\\\\\simplify{({a12}*{a23}-{a22}*{a13})}&\\simplify{({a21}*{a13}-{a11}*{a23})}&\\simplify{({a22}*{a11}-{a12}*{a21})}\\end{pmatrix}^t\\)

\n

\\(\\mathbf{A}^*=\\begin{pmatrix}\\simplify{({a22}*{a33}-{a32}*{a23})}&\\simplify{(-{a12}*{a33}+{a32}*{a13})}&\\simplify{({a12}*{a23}-{a22}*{a13})}\\\\\\simplify{({a23}*{a31}-{a21}*{a33})}&\\simplify{({a11}*{a33}-{a13}*{a31})}&\\simplify{({a21}*{a13}-{a11}*{a23})}\\\\\\simplify{({a21}*{a32}-{a22}*{a31})}&\\simplify{({a12}*{a31}-{a32}*{a11})}&\\simplify{({a22}*{a11}-{a12}*{a21})}\\end{pmatrix}\\)

\n

The inverse matrix is defined by \\(A^{-1}=\\frac{1}{|A|}A^*\\)

\n

\\(A^{-1}=\\frac{1}{\\var{a11}}\\begin{pmatrix}\\simplify{({a22}*{a33}-{a32}*{a23})}&\\simplify{(-{a12}*{a33}+{a32}*{a13})}&\\simplify{({a12}*{a23}-{a22}*{a13})}\\\\\\simplify{({a23}*{a31}-{a21}*{a33})}&\\simplify{({a11}*{a33}-{a13}*{a31})}&\\simplify{({a21}*{a13}-{a11}*{a23})}\\\\\\simplify{({a21}*{a32}-{a22}*{a31})}&\\simplify{({a12}*{a31}-{a32}*{a11})}&\\simplify{({a22}*{a11}-{a12}*{a21})}\\end{pmatrix}\\)

\n

Using the inverse matrix method gives:

\n

\\(\\begin{pmatrix} x\\\\y\\\\z\\end{pmatrix}=\\frac{1}{\\var{a11}}\\begin{pmatrix}\\simplify{({a22}*{a33}-{a32}*{a23})}&\\simplify{(-{a12}*{a33}+{a32}*{a13})}&\\simplify{({a12}*{a23}-{a22}*{a13})}\\\\\\simplify{({a23}*{a31}-{a21}*{a33})}&\\simplify{({a11}*{a33}-{a13}*{a31})}&\\simplify{({a21}*{a13}-{a11}*{a23})}\\\\\\simplify{({a21}*{a32}-{a22}*{a31})}&\\simplify{({a12}*{a31}-{a32}*{a11})}&\\simplify{({a22}*{a11}-{a12}*{a21})}\\end{pmatrix}\\begin{pmatrix} \\var{r}\\\\\\var{s}\\\\\\var{t}\\end{pmatrix}\\)

\n

\\(\\begin{pmatrix} x\\\\y\\\\z\\end{pmatrix}=\\begin{pmatrix}\\var{b11}&\\var{b12}&\\var{b13}\\\\\\var{b21}&\\var{b22}&\\var{b23}\\\\\\var{b31}&\\var{b32}&\\var{b33}\\end{pmatrix}\\begin{pmatrix} \\var{r}\\\\\\var{s}\\\\\\var{t}\\end{pmatrix}\\)

\n

\\(\\begin{pmatrix} x\\\\y\\\\z\\end{pmatrix}=\\begin{pmatrix}(\\var{b11})*\\var{r}+(\\var{b12})*\\var{s}+(\\var{b13})*\\var{t}\\\\(\\var{b21})*\\var{r}+(\\var{b22})*\\var{s}+(\\var{b23})*\\var{t}\\\\(\\var{b31})*\\var{r}+(\\var{b32})*\\var{s}+(\\var{b33})*\\var{t}\\end{pmatrix}\\)

\n

\\(\\begin{pmatrix} x\\\\y\\\\z\\end{pmatrix}=\\begin{pmatrix} \\var{r1}\\\\\\var{s1}\\\\\\var{t1}\\end{pmatrix}\\)

", "rulesets": {}, "name": "Inverse of a 3x3 matrix", "extensions": [], "statement": "

Given the matrix:

\n

\\(\\mathbf{A}=\\begin{pmatrix} \\var{a11}&\\var{a12}&\\var{a13}\\\\ \\var{a21}&\\var{a22}&\\var{a23}\\\\\\var{a31}&\\var{a32}&\\var{a33} \\end{pmatrix}\\)

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "tags": [], "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["a11", "a12", "a13", "k", "a21", "a22", "a23", "k1", "a31", "a32", "a33", "b12", "b13", "b21", "b22", "b23", "b31", "b32", "b33", "b11", "r1", "s1", "t1", "r", "s", "t"], "variables": {"s1": {"templateType": "randrange", "name": "s1", "description": "", "group": "Ungrouped variables", "definition": "random(0..5#1)"}, "a32": {"templateType": "anything", "name": "a32", "description": "", "group": "Ungrouped variables", "definition": "k1*(a12+1)"}, "t1": {"templateType": "randrange", "name": "t1", "description": "", "group": "Ungrouped variables", "definition": "random(5..12#1)"}, "s": {"templateType": "anything", "name": "s", "description": "", "group": "Ungrouped variables", "definition": "a21*r1+a22*s1+a23*t1"}, "b11": {"templateType": "anything", "name": "b11", "description": "", "group": "Ungrouped variables", "definition": "(a22*a33-a32*a23)/a11"}, "t": {"templateType": "anything", "name": "t", "description": "", "group": "Ungrouped variables", "definition": "a31*r1+a32*s1+a33*t1"}, "a31": {"templateType": "anything", "name": "a31", "description": "", "group": "Ungrouped variables", "definition": "k1*a11"}, "b12": {"templateType": "anything", "name": "b12", "description": "", "group": "Ungrouped variables", "definition": "(a32*a13-a12*a33)/a11"}, "k": {"templateType": "randrange", "name": "k", "description": "", "group": "Ungrouped variables", "definition": "random(2..5#1)"}, "b13": {"templateType": "anything", "name": "b13", "description": "", "group": "Ungrouped variables", "definition": "(a12*a23-a22*a13)/a11"}, "b33": {"templateType": "anything", "name": "b33", "description": "", "group": "Ungrouped variables", "definition": "(a11*a22-a12*a21)/a11"}, "k1": {"templateType": "randrange", "name": "k1", "description": "", "group": "Ungrouped variables", "definition": "random(2..6#1)"}, "a21": {"templateType": "anything", "name": "a21", "description": "", "group": "Ungrouped variables", "definition": "k*a11"}, "b31": {"templateType": "anything", "name": "b31", "description": "", "group": "Ungrouped variables", "definition": "(a21*a32-a22*a31)/a11"}, "a13": {"templateType": "randrange", "name": "a13", "description": "", "group": "Ungrouped variables", "definition": "random(0..10#1)"}, "a12": {"templateType": "randrange", "name": "a12", "description": "", "group": "Ungrouped variables", "definition": "random(2..6#1)"}, "a22": {"templateType": "anything", "name": "a22", "description": "", "group": "Ungrouped variables", "definition": "k*a12+1"}, "b32": {"templateType": "anything", "name": "b32", "description": "", "group": "Ungrouped variables", "definition": "(a12*a31-a11*a32)/a11"}, "a11": {"templateType": "anything", "name": "a11", "description": "", "group": "Ungrouped variables", "definition": "random(1,2,4,5,10)"}, "a23": {"templateType": "randrange", "name": "a23", "description": "", "group": "Ungrouped variables", "definition": "random(1..8#1)"}, "r1": {"templateType": "randrange", "name": "r1", "description": "", "group": "Ungrouped variables", "definition": "random(1..6#1)"}, "a33": {"templateType": "anything", "name": "a33", "description": "

3x33 matrix with determinant = a11

", "group": "Ungrouped variables", "definition": "{k1}*({a23}+{a13}-{k}*{a13})+1"}, "b22": {"templateType": "anything", "name": "b22", "description": "", "group": "Ungrouped variables", "definition": "(a11*a33-a31*a13)/a11"}, "b21": {"templateType": "anything", "name": "b21", "description": "", "group": "Ungrouped variables", "definition": "(a31*a23-a21*a33)/a11"}, "b23": {"templateType": "anything", "name": "b23", "description": "", "group": "Ungrouped variables", "definition": "(a21*a13-a11*a23)/a11"}, "r": {"templateType": "anything", "name": "r", "description": "", "group": "Ungrouped variables", "definition": "a11*r1+a12*s1+a13*t1"}}, "parts": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "gaps": [{"scripts": {}, "mustBeReducedPC": 0, "mustBeReduced": false, "type": "numberentry", "allowFractions": false, "minValue": "{a11}", "correctAnswerStyle": "plain", "precision": 0, "notationStyles": ["plain", "en", "si-en"], "strictPrecision": false, "showFeedbackIcon": true, "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "precisionType": "dp", "maxValue": "{a11}", "correctAnswerFraction": false, "marks": 1, "precisionPartialCredit": 0, "variableReplacements": [], "showCorrectAnswer": true, "showPrecisionHint": false}, {"scripts": {}, "precisionPartialCredit": 0, "type": "matrix", "correctAnswer": "matrix([\n [b11,b12,b13],\n [b21,b22,b23],\n [b31,b32,b33]\n ]) ", "precisionMessage": "You have not given your answer to the correct precision.", "precision": "2", "strictPrecision": false, "numColumns": "3", "tolerance": 0, "showFeedbackIcon": true, "markPerCell": false, "numRows": "3", "variableReplacementStrategy": "originalfirst", "allowFractions": false, "precisionType": "dp", "marks": "4.5", "variableReplacements": [], "showCorrectAnswer": true, "correctAnswerFractions": false, "allowResize": true}, {"scripts": {}, "mustBeReducedPC": 0, "mustBeReduced": false, "type": "numberentry", "allowFractions": false, "minValue": "r1", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "maxValue": "r1", "correctAnswerFraction": false, "marks": 1, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "showCorrectAnswer": true}, {"scripts": {}, "mustBeReducedPC": 0, "mustBeReduced": false, "type": "numberentry", "allowFractions": false, "minValue": "s1", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "maxValue": "s1", "correctAnswerFraction": false, "marks": 1, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "showCorrectAnswer": true}, {"scripts": {}, "mustBeReducedPC": 0, "mustBeReduced": false, "type": "numberentry", "allowFractions": false, "minValue": "t1", "correctAnswerStyle": "plain", "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "maxValue": "t1", "correctAnswerFraction": false, "marks": 1, "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "showCorrectAnswer": true}], "type": "gapfill", "marks": 0, "variableReplacements": [], "showCorrectAnswer": true, "prompt": "

Calculate the determinant of the matrix.

\n

\\(|A|=\\) [[0]]

\n

Calculate the inverse matrix and input the entries correct to two decimal places.

\n

\\(A^{-1}=\\) [[1]]

\n

Hence solve the following system of equations.

\n

\\(\\begin{pmatrix} \\var{a11}&\\var{a12}&\\var{a13}\\\\ \\var{a21}&\\var{a22}&\\var{23}\\\\ \\var{a31}&\\var{a32}&\\var{a33}\\end{pmatrix}\\begin{pmatrix} x\\\\y\\\\z\\end{pmatrix}=\\begin{pmatrix} \\var{r}\\\\\\var{s}\\\\\\var{t}\\end{pmatrix}\\)

\n

\\(x=\\) [[2]]

\n

\\(y=\\) [[3]]

\n

\\(z=\\) [[4]]

\n

", "showFeedbackIcon": true}], "metadata": {"description": "

This question tests learner's knowledge of the inverse matrix method for a 3x3 matrix.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "functions": {}, "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}