// Numbas version: exam_results_page_options {"questions": [], "duration": 0, "name": "Matrices", "showQuestionGroupNames": false, "allQuestions": true, "percentPass": 0, "feedback": {"showanswerstate": true, "advicethreshold": 0, "showactualmark": true, "allowrevealanswer": true, "showtotalmark": true}, "shuffleQuestions": false, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Find determinant of a 3x3 matrix by row reduction", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variablesTest": {"condition": "d1[1][1]<>0", "maxRuns": 100}, "variables": {"c20": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c20"}, "c11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)*100", "description": "", "name": "c11"}, "m2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([m1[0],c11*m1[0]+m1[1],c12*m1[0]+m1[2]])", "description": "", "name": "m2"}, "c12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)*100", "description": "", "name": "c12"}, "upper_triangular": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([\n d1[0],\n d1[1],\n d1[2]-(d1[2][1]/d1[1][1])*d1[1]\n])", "description": "", "name": "upper_triangular"}, "determinant": {"templateType": "anything", "group": "Ungrouped variables", "definition": "det(m1)", "description": "", "name": "determinant"}, "d1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([\n m1[0],\n m1[1]-(m1[1][0]/m1[0][0])*m1[0],\n m1[2]-(m1[2][0]/m1[0][0])*m1[0]\n])", "description": "", "name": "d1"}, "m1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(1..4),3),3))", "description": "", "name": "m1"}, "m3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix(\n [m2[0]+c20*m2[1],m2[1],m2[2]]\n)", "description": "", "name": "m3"}}, "ungrouped_variables": ["m1", "c11", "c12", "m2", "c20", "m3", "determinant", "d1", "upper_triangular"], "functions": {}, "variable_groups": [], "preamble": {"css": "", "js": ""}, "parts": [{"prompt": "
Write another matrix of single-digit values (each element of the matrix should be an integer in the range $[-9,9]$) whose determinant is the same as $\\mathrm{M}$.
", "markPerCell": false, "allowFractions": false, "correctAnswer": "m1", "showCorrectAnswer": true, "useCustomName": false, "customName": "", "customMarkingAlgorithm": "all_single_digits:\n if(all(map(isint(studentnumbers[x][y]) and abs(studentnumbers[x][y])<10,[x,y],cell_indexes)),\n true\n ,\n incorrect(\"Your answer is not a matrix of single-digit integer values.\");\n end();\n false\n )\n\ncorrectMatrix: matrix(settings[\"correctAnswer\"])\n\ndifferent:\n if(studentMatrix<>m3,\n true\n ,\n incorrect(\"You must enter a different matrix to the one given.\");\n end();\n false\n )\n\nright_determinant:\n correctif(det(studentMatrix)=det(correctMatrix))\n\nmark:\n apply(any_empty);\n apply(any_invalid);\n apply(all_single_digits);\n apply(different);\n apply(right_determinant)", "unitTests": [], "correctAnswerFractions": false, "allowResize": false, "numRows": "3", "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "matrix", "numColumns": "3", "tolerance": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "showFeedbackIcon": true}, {"prompt": "Write an upper triangular matrix whose determinant is the same as $\\mathrm{M}$. Enter your answers as integers or fractions, not decimals.
", "markPerCell": false, "allowFractions": true, "correctAnswer": "upper_triangular", "showCorrectAnswer": true, "useCustomName": false, "customName": "", "customMarkingAlgorithm": "is_upper_triangular:\n if(all(map(x<=y or studentmatrix[x][y]=0, [x,y], cell_indexes)),\n true\n ,\n incorrect(\"Your matrix is not upper triangular\");\n end();\n false\n )\n\ncorrectMatrix: matrix(settings[\"correctAnswer\"])\n\nright_determinant:\n correctif(det(studentMatrix)=det(correctMatrix))\n\nmark:\n apply(any_empty);\n apply(any_invalid);\n apply(is_upper_triangular);\n apply(right_determinant)", "unitTests": [], "correctAnswerFractions": true, "allowResize": false, "numRows": "3", "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "matrix", "numColumns": "3", "tolerance": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "showFeedbackIcon": true}, {"mustBeReduced": false, "maxValue": "det(m1)", "useCustomName": false, "prompt": "What is the determinant of $\\mathrm{M}$?
", "showFractionHint": true, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "mustBeReducedPC": 0, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "variableReplacements": [], "allowFractions": false, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "minValue": "det(m1)", "customName": "", "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "marks": 1, "showFeedbackIcon": true}], "statement": "You are given the matrix $\\mathrm{M} = \\var{m3}$.
", "tags": [], "rulesets": {}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Given a 3x3 matrix with very big elements, perform row operations to find a matrix with single-digit elements. Then reduce that to an upper triangular matrix, and hence find the determinant.
"}, "advice": "Note that subtracting one row from another does not affect the determinant. In fact, adding or subtracting any multiple of one row from another does not affect the determinant. That is, the row operation $r_i \\to r_i + ar_j$, $i \\neq j$, does not affect the determinant.
\nSubtract $\\simplify{{c20}r_2}$ from $r_1$ to get $\\mathrm{M}_1 = \\var{m2}$.
\nSubtract $\\simplify{{c11}r_1}$ from $r_2$ and $\\simplify{{c12}r_1}$ from $r_3$ of $\\mathrm{M}_1$ to get $\\mathrm{M}_2 = \\var{m1}$.
\nConsidering each column in turn, we use row operations to ensure that there are zeros in each entry below the main diagonal, $\\mathrm{M}_{ij}$, $i \\gt j$.
\nSubtract $\\simplify[fractionnumbers,unitfactor]{{m1[1][0]/m1[0][0]}r_1}$ from $r_2$ and $\\simplify[fractionnumbers,unitfactor]{{m1[2][0]/m1[0][0]}r_1}$ from $r_3$ of $\\mathrm{M}_2$ to obtain $\\mathrm{M}_3 = \\simplify[fractionnumbers]{{d1}}$. The first entry of each row, apart from the first row, is zero.
\nSubtract $\\simplify[fractionnumbers,unitfactor]{{m1[2][1]/m1[1][1]}r_2}$ from $r_3$ of $\\mathrm{M}_3$ to obtain $\\mathrm{M}_4 = \\simplify[fractionnumbers]{{upper_triangular}}$. The second entry of each row, apart from the second row, is zero.
\nUsing the upper triangular matrix found in part b), the determinant of $\\mathrm{M}$ is $\\simplify[!basic,fractionnumbers]{{upper_triangular[0][0]}*{upper_triangular[1][1]}*{upper_triangular[2][2]}} = \\var{determinant}$.
"}, {"name": "Find determinant of a 3x3 matrix with a free variable by row reduction", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variablesTest": {"condition": "d1[1][1]<>0\nand d1[1][1]*d1[2][1]<0", "maxRuns": 100}, "variables": {"q": {"templateType": "anything", "group": "Constants", "definition": "free_det(upper_triangular, upper_triangular_a)", "description": "", "name": "q"}, "aa": {"templateType": "anything", "group": "Short names for upper triangular matrices", "definition": "upper_triangular_a", "description": "", "name": "aa"}, "ac": {"templateType": "anything", "group": "Short names for upper triangular matrices", "definition": "upper_triangular", "description": "", "name": "ac"}, "c12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)*100", "description": "", "name": "c12"}, "a1": {"templateType": "anything", "group": "A term", "definition": "matrix([\n [0,0,random(1..4)],\n [0,0,random(1..4)],\n [0,0,0]\n])", "description": "", "name": "a1"}, "d1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([\n m1[0],\n m1[1]-(m1[1][0]/m1[0][0])*m1[0],\n m1[2]-(m1[2][0]/m1[0][0])*m1[0]\n])", "description": "", "name": "d1"}, "upper_triangular_a": {"templateType": "anything", "group": "A term", "definition": "matrix([\n ad1[0],\n ad1[1],\n ad1[2]-(d1[2][1]/d1[1][1])*ad1[1]\n])", "description": "", "name": "upper_triangular_a"}, "m1": {"templateType": "anything", "group": "Constants", "definition": "matrix(repeat(repeat(random(1..4),3),3))", "description": "", "name": "m1"}, "c20": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c20"}, "c11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)*100", "description": "", "name": "c11"}, "m2": {"templateType": "anything", "group": "Constants", "definition": "matrix([m1[0],c11*m1[0]+m1[1],c12*m1[0]+m1[2]])", "description": "", "name": "m2"}, "a3": {"templateType": "anything", "group": "A term", "definition": "matrix(\n [a2[0]+c20*a2[1],a2[1],a2[2]]\n)", "description": "", "name": "a3"}, "upper_triangular": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([\n d1[0],\n d1[1],\n d1[2]-(d1[2][1]/d1[1][1])*d1[1]\n])", "description": "", "name": "upper_triangular"}, "determinant": {"templateType": "anything", "group": "Ungrouped variables", "definition": "det(m1)", "description": "", "name": "determinant"}, "a2": {"templateType": "anything", "group": "A term", "definition": "matrix([a1[0],c11*a1[0]+a1[1],c12*a1[0]+a1[2]])", "description": "", "name": "a2"}, "ad1": {"templateType": "anything", "group": "A term", "definition": "matrix([\n a1[0],\n a1[1]-(m1[1][0]/m1[0][0])*a1[0],\n a1[2]-(m1[2][0]/m1[0][0])*a1[0]\n])", "description": "", "name": "ad1"}, "m3": {"templateType": "anything", "group": "Constants", "definition": "matrix(\n [m2[0]+c20*m2[1],m2[1],m2[2]]\n)", "description": "", "name": "m3"}}, "ungrouped_variables": ["c12", "c11", "c20", "determinant", "d1", "upper_triangular"], "functions": {"show_matrix": {"type": "string", "language": "javascript", "definition": "var rows = [];\nfor(var i=0;i$\\mathrm{M}' = $ [[0]] $a + \\phantom{}$ [[1]]
", "showCorrectAnswer": true, "customMarkingAlgorithm": "correctDeterminant: \n free_det(upper_triangular, upper_triangular_a)\n\nstudentDeterminant:\n free_det(interpreted_answers[1], interpreted_answers[0])\n\nright_determinant:\n correctif(all(map(isclose(a,b),[a,b],zip(studentDeterminant,correctDeterminant))))\n\ngap_feedback (Feedback on each of the gaps):\n map(\n let(\n result,submit_part(gaps[gap_number][\"path\"],answer),\n name,gaps[gap_number][\"name\"],\n assert(name=\"\",feedback(translate('part.gapfill.feedback header',[\"name\": name])));\n concat_feedback(filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]), if(marks>0,result[\"marks\"]/marks,1));\n result\n ),\n [gap_number,answer,index],\n zip(gap_order,studentAnswer,list(1..len(gaps)))\n )\n\nboth_valid:\n map(assert(x[\"valid\"], concat_feedback(x[\"feedback\"],0.5)), x, marked_original_order)\n \n\nboth_upper_triangular:\n if(all(map(x[\"credit\"]=1, x, marked_original_order)),\n true\n ,\n incorrect(\"One or both of your matrices are not upper triangular - every value below the main diagonal should be zero.\");\n end();\n false\n )\n\nmark:\n apply(both_valid);\n apply(both_upper_triangular);\n apply(right_determinant)", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "customName": "", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": true, "correctAnswer": "upper_triangular_a", "markPerCell": false, "useCustomName": false, "customName": "", "customMarkingAlgorithm": "is_upper_triangular:\n if(all(map(x<=y or studentmatrix[x][y]=0, [x,y], cell_indexes)),\n correct();\n true\n ,\n incorrect(\"Your matrix is not upper triangular\");\n end();\n false\n )\n\nmark:\n apply(any_empty);\n apply(any_invalid);\n apply(is_upper_triangular)", "unitTests": [], "correctAnswerFractions": true, "allowResize": false, "numRows": "3", "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "matrix", "numColumns": "3", "tolerance": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": "1", "showFeedbackIcon": false}, {"showCorrectAnswer": true, "allowFractions": true, "correctAnswer": "upper_triangular", "markPerCell": false, "useCustomName": false, "customName": "", "customMarkingAlgorithm": "is_upper_triangular:\n if(all(map(x<=y or studentmatrix[x][y]=0, [x,y], cell_indexes)),\n correct();\n true\n ,\n incorrect(\"Your matrix is not upper triangular\");\n end();\n false\n )\n\nmark:\n apply(any_empty);\n apply(any_invalid);\n apply(is_upper_triangular)", "unitTests": [], "correctAnswerFractions": true, "allowResize": false, "numRows": "3", "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "matrix", "numColumns": "3", "tolerance": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": "1", "showFeedbackIcon": false}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}, {"answer": "{aa[0][0]*aa[1][1]*aa[2][2]}*a^3 + {aa[0][0]*aa[1][1]*ac[2][2] + aa[0][0]*ac[1][1]*aa[2][2] + ac[0][0]*aa[1][1]*aa[2][2]}*a^2 + {ac[0][0]*ac[1][1]*aa[2][2] + ac[0][0]*aa[1][1]*ac[2][2] + aa[0][0]*ac[1][1]*ac[2][2]}*a + {ac[0][0]*ac[1][1]*ac[2][2]}", "vsetRangePoints": 5, "useCustomName": false, "prompt": "What is the determinant of $\\mathrm{M}$, in terms of $a$?
", "checkingType": "absdiff", "valuegenerators": [{"value": "", "name": "a"}], "vsetRange": [0, 1], "showFeedbackIcon": true, "type": "jme", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "variableReplacements": [], "failureRate": 1, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showPreview": true, "customName": "", "checkVariableNames": false, "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "marks": 1}], "statement": "You are given the matrix $\\mathrm{M} =
\\begin{pmatrix}
\\simplify{{m3[0][0]} + {a3[0][0]}a} & \\simplify{{m3[0][1]} + {a3[0][1]}a} & \\simplify{{m3[0][2]} + {a3[0][2]}a} \\\\
\\simplify{{m3[1][0]} + {a3[1][0]}a} & \\simplify{{m3[1][1]} + {a3[1][1]}a} & \\simplify{{m3[1][2]} + {a3[1][2]}a} \\\\
\\simplify{{m3[2][0]} + {a3[2][0]}a} & \\simplify{{m3[2][1]} + {a3[2][1]}a} & \\simplify{{m3[2][2]} + {a3[2][2]}a} \\\\
\\end{pmatrix}$ for some $a \\in \\mathbb{R}$.
Given a 3x3 matrix with very big elements, perform row operations to find a matrix with single-digit elements. Then reduce that to an upper triangular matrix, and hence find the determinant.
"}, "advice": "Note that subtracting one row from another does not affect the determinant. In fact, adding or subtracting any multiple of one row from another does not affect the determinant. That is, the row operation $r_i \\to r_i + ar_j$, $i \\neq j$, does not affect the determinant.
\nFirst, we can perform a couple of row operations to make the numbers in each entry smaller.
\nSubtract $\\simplify{{c20}r_2}$ from $r_1$ to obtain $\\mathrm{M}_1 = \\var{show_matrix(m2,a2)}$.
\nSubtract $\\simplify{{c11}r_1}$ from $r_2$ and $\\simplify{{c12}r_1}$ from $r_3$ of $\\mathrm{M}_1$ to obtain $\\mathrm{M}_2 = \\var{show_matrix(m1,a1)}$.
\nConsidering each column in turn, we use row operations to ensure that there are zeros in each entry below the main diagonal, $\\mathrm{M}_{ij}$, $i \\gt j$.
\nSubtract $\\simplify[fractionnumbers,unitfactor]{{m1[1][0]/m1[0][0]}r_1}$ from $r_2$ and $\\simplify[fractionnumbers,unitfactor]{{m1[2][0]/m1[0][0]}r_1}$ from $r_3$ of $\\mathrm{M}_2$ to obtain $\\mathrm{M}_3 = \\var{show_matrix(d1,ad1)}$.
\nAdd $\\simplify[fractionnumbers,unitfactor]{{-d1[2][1]/d1[1][1]}r_2}$ to Subtract $\\simplify[fractionnumbers,unitfactor]{{d1[2][1]/d1[1][1]}r_2}$ from $r_3$ of $\\mathrm{M}_3$ to obtain $\\mathrm{M}_4 = \\var{show_matrix(upper_triangular,upper_triangular_a)}$.
\nSo, $\\mathrm{M}_4$ can be written in the required form as $\\var[fractionnumbers]{upper_triangular_a}a + \\var[fractionnumbers]{upper_triangular}$.
\nUsing the upper triangular matrix $\\mathrm{M}_4$ found in part a), the determinant of $\\mathrm{M}$ is
\n\n\\[ \\det(\\mathrm{M}) = \\det(\\mathrm{M}_4) = \\left(\\simplify[all,!noleadingminus,fractionnumbers]{({aa[0][0]}a+{ac[0][0]})}\\right) \\times \\left(\\simplify[all,fractionnumbers]{({aa[1][1]}a+{ac[1][1]})}\\right) \\times \\left(\\simplify[all,fractionnumbers]{({aa[2][2]}a+{ac[2][2]})}\\right) = \\simplify[all,fractionnumbers]{{aa[0][0]*aa[1][1]*aa[2][2]}*a^3 + {aa[0][0]*aa[1][1]*ac[2][2] + aa[0][0]*ac[1][1]*aa[2][2] + ac[0][0]*aa[1][1]*aa[2][2]}*a^2 + {ac[0][0]*ac[1][1]*aa[2][2] + ac[0][0]*aa[1][1]*ac[2][2] + aa[0][0]*ac[1][1]*ac[2][2]}*a + {ac[0][0]*ac[1][1]*ac[2][2]}} \\]
"}, {"name": "Find determinants and inverses of 2x2 matrices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [{"variables": ["a", "b", "c"], "name": "Unnamed group"}], "variables": {"b22": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(tr3*b11=b21*b12,tr3+1,tr3)", "description": "", "name": "b22"}, "b21": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-6..6 except 0)", "description": "", "name": "b21"}, "tr2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "description": "", "name": "tr2"}, "b": {"group": "Unnamed group", "templateType": "anything", "definition": "matrix([ [b11,b12], [b21,b22] ])", "description": "", "name": "b"}, "c": {"group": "Unnamed group", "templateType": "anything", "definition": "matrix([ [c11,c12], [c21,c22] ])", "description": "", "name": "c"}, "a22": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(tr1*a11=a21*a12,tr1+1,tr1)", "description": "", "name": "a22"}, "c21": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..5)", "description": "", "name": "c21"}, "tr3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except 0)", "description": "", "name": "tr3"}, "c22": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(tr4*c11=c21*c12,tr4+1,tr4)", "description": "", "name": "c22"}, "c11": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,2,4)", "description": "", "name": "c11"}, "tr4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "description": "", "name": "tr4"}, "b11": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(a11=tr2,tr2+1,tr2)", "description": "", "name": "b11"}, "tr1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "description": "", "name": "tr1"}, "a": {"group": "Unnamed group", "templateType": "anything", "definition": "matrix([ [a11,a12],[a21,a22] ])", "description": "", "name": "a"}, "a12": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-5..5)", "description": "", "name": "a12"}, "b12": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-5..5)", "description": "", "name": "b12"}, "c12": {"group": "Ungrouped variables", "templateType": "anything", "definition": "a12+b12", "description": "", "name": "c12"}, "a21": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-6..6 except 0)", "description": "", "name": "a21"}, "a11": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except 0)", "description": "", "name": "a11"}}, "ungrouped_variables": ["a11", "a12", "a21", "a22", "b11", "b12", "b21", "b22", "c11", "c12", "c21", "c22", "tr1", "tr2", "tr3", "tr4"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "functions": {"inverse": {"type": "matrix", "language": "jme", "definition": "matrix([\n [m[1][1], -m[0][1]],\n [-m[1][0], m[0][0]]\n])/det(m)", "parameters": [["m", "matrix"]]}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "det(a)", "maxValue": "det(a)", "marks": 0.5}, {"showCorrectAnswer": true, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "det(b)", "maxValue": "det(b)", "marks": 0.5}, {"showCorrectAnswer": true, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "det(c)", "maxValue": "det(c)", "marks": 0.5}, {"showCorrectAnswer": true, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "correctAnswerFraction": false, "minValue": "det(a*b*c)", "maxValue": "det(a*b*c)", "marks": 0.5}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "Calculate the determinants of these matrices.
\n$\\mathrm{det}\\left(A\\right) = $ [[0]]
\n$\\mathrm{det}\\left(B\\right) = $ [[1]]
\n$\\mathrm{det}\\left(C\\right) = $ [[2]]
\n$\\mathrm{det}\\left(ABC\\right) = $ [[3]]
", "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": true, "correctAnswer": "inverse(a)", "markPerCell": false, "allowResize": false, "correctAnswerFractions": true, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": "2"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "Find the inverses of the following matrices. Input all matrix entries as fractions or integers and not as decimals.
\n$\\mathbf{A}^{-1} = $ [[0]]
", "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": true, "correctAnswer": "inverse(b)", "markPerCell": false, "allowResize": false, "correctAnswerFractions": true, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": "2"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "$\\mathbf{B}^{-1} = $ [[0]]
", "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": true, "correctAnswer": "inverse(c)", "markPerCell": false, "allowResize": false, "correctAnswerFractions": true, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": "2"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "$\\mathbf{C}^{-1} = $ [[0]]
", "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "Let
\n\\begin{align} \\mathbf{A} &= \\var{a}, & \\mathbf{B} &= \\var{b}, & \\mathbf{C} &= \\var{c} \\end{align}
", "tags": ["checked2015", "determinant of a matrix", "inverse", "inverse matrix", "MAS1602", "matrices", "matrix", "matrix inverse", "matrix multiplication", "multiplication of matrices", "tested1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "10/07/2012:
\nAdded tags.
Question appears to be working correctly.
\nCorrected a typo in the Advice section.
24/12/2012:
\nChecked calculations, OK. Added tested1 tag.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Find the determinant and inverse of three $2 \\times 2$ invertible matrices.
"}, "advice": "The determinant of a matrix $\\mathrm{M} = \\begin{pmatrix} a&b \\\\ c&d \\end{pmatrix}$ is given by
\n\\[ \\det\\left(\\mathrm{M}\\right) = ad-bc \\]
\nIf we have two $n \\times n$ matrices $M$ and $N$, then
\n\\[ \\det\\left(\\mathrm{MN}\\right) = \\det\\left(\\mathrm{M}\\right)\\det\\left(\\mathrm{N}\\right) \\]
\nAnd it follows that if we have a third matrix $P$,
\n\\[ \\det\\left(\\mathrm{MNP}\\right) = \\det\\left(\\mathrm{M}\\right)\\det\\left(\\mathrm{N}\\right)\\det\\left(\\mathrm{P}\\right) \\]
\nThus for our example we have:
\n\\begin{align}
\\det\\left(\\mathrm{A}\\right) &= \\simplify[]{{a11}*{a22}-{a12}*{a21} = {det(a)}} \\\\
\\det\\left(\\mathrm{B}\\right) &= \\simplify[]{{b11}*{b22}-{b12}*{b21} = {det(b)}} \\\\
\\det\\left(\\mathrm{C}\\right) &= \\simplify[]{{c11}*{c22}-{c12}*{c21} = {det(c)}}
\\end{align}
\\begin{align}
\\det\\left( \\mathrm{ABC} \\right) &= \\det(\\mathrm{A}) \\det(\\mathrm{B}) \\det(\\mathrm{C}) \\\\
&= \\simplify[]{{det(a)}*{det(b)}*{det(c)}} \\\\
&= \\var{det(a*b*c)}
\\end{align}
Suppose $\\mathrm{M} = \\begin{pmatrix} a&b \\\\ c&d \\end{pmatrix}$ is a $2 \\times 2$ matrix and $\\det\\left(\\mathrm{M}\\right) = \\Delta \\neq 0$.
\nThen $\\mathrm{M}$ is invertible and
\n\\[ \\mathrm{M}^{-1} = \\frac{1}{\\Delta} \\begin{pmatrix} d & -b\\\\ -c& a \\end{pmatrix}=\\begin{pmatrix} \\frac{d}{\\Delta} & -\\frac{b}{\\Delta}\\\\ -\\frac{c}{\\Delta}& \\frac{a}{\\Delta} \\end{pmatrix}\\]
\nApplying this to these examples we obtain:
\n\\[ \\simplify[fractionnumbers]{matrix:A^(-1)={inverse(a)}} \\]
\n\\[ \\simplify[fractionnumbers]{matrix:B^(-1)={inverse(b)}} \\]
\n\\[ \\simplify[fractionnumbers]{matrix:C^(-1)={inverse(c)}} \\]
"}, {"name": "Find eigenvalues and eigenvectors of matrices, and power of one matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s1"}, "mxb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "max(a1,b1)", "description": "", "name": "mxb"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "a"}, "x1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s*(b22-mnB)", "description": "", "name": "x1"}, "a22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a+b-a11", "description": "", "name": "a22"}, "x2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s*(b22-mxB)", "description": "", "name": "x2"}, "cn22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mxB^n*x1-mnB^n*x2", "description": "", "name": "cn22"}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s2"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "a1"}, "cn11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mnB^n*x1-mxB^n*x2", "description": "", "name": "cn11"}, "da": {"templateType": "anything", "group": "Ungrouped variables", "definition": "{a11*a22-a12*a21}", "description": "", "name": "da"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "c2"}, "this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mxA<0,mxA+random(1..6),mxA-random(1..6))", "description": "", "name": "this"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(4,5,6)", "description": "", "name": "n"}, "trb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "{b11+b22}", "description": "", "name": "trb"}, "b11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(test1=a1,that,test1=b1,that,test1)", "description": "", "name": "b11"}, "tra": {"templateType": "anything", "group": "Ungrouped variables", "definition": "{a11+a22}", "description": "", "name": "tra"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c1=a,a+random(1..3),c1)", "description": "", "name": "b"}, "cn12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "x1*x2*(mxB^n-mnB^n)", "description": "", "name": "cn12"}, "bn21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(s*cn21/f)", "description": "", "name": "bn21"}, "bn11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(s*cn11/f)", "description": "", "name": "bn11"}, "cn21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mnB^n-mxB^n", "description": "", "name": "cn21"}, "b21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-s", "description": "", "name": "b21"}, "mxa": {"templateType": "anything", "group": "Ungrouped variables", "definition": "max(a,b)", "description": "", "name": "mxa"}, "b22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a1+b1-b11", "description": "", "name": "b22"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(x1-x2)", "description": "", "name": "f"}, "that": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mxB<0,mxB+random(1..6),mxB-random(1..6))", "description": "", "name": "that"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c2=a1,a1+random(1..3),c2)", "description": "", "name": "b1"}, "b12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s*(a1*b1-b11*a1-b11*b1+b11^2)", "description": "", "name": "b12"}, "mnb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "min(a1,b1)", "description": "", "name": "mnb"}, "test": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "test"}, "db": {"templateType": "anything", "group": "Ungrouped variables", "definition": "{b11*b22-b12*b21}", "description": "", "name": "db"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "c1"}, "bn12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(s*cn12/f)", "description": "", "name": "bn12"}, "test1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "test1"}, "mna": {"templateType": "anything", "group": "Ungrouped variables", "definition": "min(a,b)", "description": "", "name": "mna"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s"}, "a12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s", "description": "", "name": "a12"}, "a11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(test=a,this,test=b,this,test)", "description": "", "name": "a11"}, "a21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-s*(a*b-a11*a-a11*b+a11^2)", "description": "", "name": "a21"}, "bn22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(s*cn22/f)", "description": "", "name": "bn22"}}, "ungrouped_variables": ["test1", "a21", "a22", "bn22", "bn21", "b22", "b21", "b1", "cn11", "mna", "mnb", "cn12", "s2", "s1", "a12", "b12", "b11", "test", "cn21", "cn22", "a11", "that", "db", "bn12", "bn11", "da", "a1", "x2", "c2", "c1", "x1", "mxb", "mxa", "a", "b", "f", "tra", "trb", "n", "this", "s"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{mnA}", "minValue": "{mnA}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{mxA}", "minValue": "{mxA}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "Find the eigenvalues of $A$.
\nLet $a_1$ be the least eigenvalue of $A,\\;\\;\\; a_1=\\;\\;$[[0]]
\nLet $a_2$ be the greatest eigenvalue of $A,\\;\\; a_2=\\;\\;$[[1]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{s*(mnA-a11)}", "minValue": "{s*(mnA-a11)}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{s*(mxA-a11)}", "minValue": "{s*(mxA-a11)}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "Find eigenvectors for $A$.
\nLet $(1,y_1)^T$ be an eigenvector corresponding to $a_1,\\;\\;\\;\\;y_1=\\;\\;$[[0]]
\nLet $(1,y_2)^T$ be an eigenvector corresponding to $a_2,\\;\\;\\;\\;y_2=\\;\\;$[[1]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{mnB}", "minValue": "{mnB}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{mxB}", "minValue": "{mxB}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n \n \nFind the eigenvalues of $B$.
\n \n \n \nLet $b_1$ be the least eigenvalue of $B,\\;\\;\\; b_1=\\;\\;$[[0]]
\n \n \n \nLet $b_2$ be the greatest eigenvalue of $B,\\;\\; b_2=\\;\\;$[[1]]
\n \n \n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{x1}", "minValue": "{x1}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{x2}", "minValue": "{x2}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "Find eigenvectors for $B$.
\nLet $(x_1,1)^T$ be an eigenvector corresponding to $b_1,\\;\\;\\;\\;x_1=\\;\\;$[[0]]
\nLet $(x_2,1)^T$ be an eigenvector corresponding to $b_2,\\;\\;\\;\\;x_2=\\;\\;$[[1]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{bn11}", "minValue": "{bn11}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{bn12}", "minValue": "{bn12}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{bn21}", "minValue": "{bn21}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{bn22}", "minValue": "{bn22}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\nFind $B^{\\var{n}}$ using the last two parts of this question:
\n$B^{\\var{n}} = \\Bigg($ | \n[[0]] | \n[[1]] | \n$\\Bigg)$ | \n
[[2]] | \n[[3]] | \n
Input your answers as integers.
\n ", "showCorrectAnswer": true, "marks": 0}], "statement": "\n \n \nFind the eigenvalues and eigenvectors for the matrices $A$ and $B$ where:
\\[ A=\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22} \\end{pmatrix},\\;\\;\\;\\;\\;\n \n B=\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22} \\end{pmatrix}\n \n \\]
10/07/2012:
\nAdded tags.
\nIn the Advice section it is not explained how to find the trace and the determinant of the matrix - Should this be included?
\nQuestion appears to be working correctly.
\n24/12/2012:
\nChecked calculations, OK. Added tested1 tag.
", "licence": "Creative Commons Attribution 4.0 International", "description": "$A,\\;B$ $2 \\times 2$ matrices. Find eigenvalues and eigenvectors of both. Hence or otherwise, find $B^n$ for largish $n$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "a)
\n\\[A - \\lambda I_2 = \\begin{pmatrix} \\var{a11}-\\lambda & \\var{a12}\\\\ \\var{a21} & \\var{a22}-\\lambda \\end{pmatrix}\\]
Hence the characteristic polynomial $p(\\lambda)$ is: \\[\\begin{eqnarray*} \\mathrm{det}\\left(A-\\lambda I_2 \\right)&=&\\simplify[zeroTerm]{({a11}-lambda)({a22}-lambda)-{a12}*{a21}}\\\\ &=& \\simplify[std]{lambda^2-{trA}*lambda+{dA}}\\\\ &=&\\simplify[std]{(lambda-{a})(lambda-{b})} \\end{eqnarray*} \\]
We see that on solving $p(\\lambda)=0$ we get the eigenvalues:
\\[\\lambda_1=\\var{mnA},\\;\\;\\;\\lambda_2=\\var{mxA}\\]
Note: We could have found the characteristic polynomial by noting that for a 2 × 2 matrix $A$ then the characteristic polynomial is
\\[\\lambda^2-\\mathrm{trace}(A)+\\mathrm{det}(A)\\]
where $\\mathrm{trace}(A) = \\var{trA},\\;\\;\\;\\mathrm{det}(A)=\\var{dA}$
b)
\n1. $\\lambda=\\var{mnA}$
\nWe have the eigenspace is given by all $v=(x,y)^T$ such that $(\\simplify{A-{mnA}}I_2)v=(0,0)^T$ i.e.
\n\\[\\begin{pmatrix} \\var{a11-mnA}&\\var{a12}\\\\ \\var{a21}&\\var{a22-mnA} \\end{pmatrix}\\begin{pmatrix} x \\\\ y \\end{pmatrix} =\\begin{pmatrix} 0 \\\\ 0 \\end{pmatrix}\\]
\nThis gives the two equations:
\n\\[ \\begin{eqnarray*} \\simplify[std]{{a11-mnA}x + {a12}y}&=&0\\\\ \\simplify[std]{{a21}x + {a22-mnA}y}&=&0 \\end{eqnarray*} \\]
There is only one equation here as we see that the equations are the same (one is a multiple of the other).
So putting $x=1$ in the first equation we get $y_1=\\var{-s*(a11-mnA)}$
\nHence the eigenvector we want is \\[\\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mnA)} \\end{pmatrix}\\]
\n2. $\\lambda=\\var{mxA}$
\nIn this case we have the equations:
\n\\[ \\begin{eqnarray*} \\simplify[std]{{a11-mxA}x + {a12}y}&=&0\\\\ \\simplify[std]{{a21}x + {a22-mxA}y}&=&0 \\end{eqnarray*} \\]
\nOnce again there is only one equation, so putting $x=1$ in the first equation we get $y_2=\\var{-s*(a11-mxA)}$
\nHence the eigenvector we want is \\[\\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mxA)} \\end{pmatrix}\\]
\nc)
\nThe characteristic polynomial is given by:
\n\\[p(\\lambda)=\\simplify[std]{lambda^2-{b11+b22}*lambda + {dB}}\\]
\nSolving $p(\\lambda)=0$, we find the eigenvalues for $B$ are:
\\[\\lambda_1=\\var{mnB},\\;\\;\\;\\lambda_2=\\var{mxB}\\]
d)
\n1. $\\lambda=\\var{mnB}$
\nThe equations are:
\\[ \\begin{eqnarray*} \\simplify[std]{{b11-mnB}x + {b12}y}&=&0\\\\ \\simplify[std]{{b21}x + {b22-mnB}y}&=&0 \\end{eqnarray*} \\]
Putting $y=1$ in the second equation we get $x_1=\\var{s*(b22-mnB)}$
\nHence the eigenvector we want is \\[\\begin{pmatrix} \\var{s*(b22-mnB)}\\\\1 \\end{pmatrix}\\]
\n2. $\\lambda=\\var{mxB}$
\nThe equations are:
\\[ \\begin{eqnarray*} \\simplify[std]{{b11-mxB}x + {b12}y}&=&0\\\\ \\simplify[std]{{b21}x + {b22-mxB}y}&=&0 \\end{eqnarray*} \\]
Putting $y=1$ in the second equation we get $x_2=\\var{s*(b22-mxB)}$
Hence the eigenvector we want is \\[\\begin{pmatrix} \\var{s*(b22-mxB)}\\\\1 \\end{pmatrix}\\]
\ne)
\nFor the last part we use the diagonalisation of $B$ given by the last two parts.
\nThus if $x_1,\\;\\;x_2,\\;\\;\\lambda_1,\\;\\;\\lambda_2$ are as above for $B$ then we have $B=PDP^{-1} \\Rightarrow B^{\\var{n}}=PD^{\\var{n}}P^{-1}$ where:
\n\\[\\begin{eqnarray*} P &=& \\begin{pmatrix} x_1 & x_2\\\\1&1 \\end{pmatrix} = \\begin{pmatrix} \\var{s*(b22-mnB)} & \\var{s*(b22-mxB)} \\\\1&1 \\end{pmatrix}\\Rightarrow P^{-1}= \\simplify[std]{1/{x1-x2}}\\begin{pmatrix} 1 & \\var{-s*(b22-mxB)} \\\\-1&\\var{s*(b22-mnB)} \\end{pmatrix}\\\\ \\\\ D&=& \\begin{pmatrix} \\lambda_1 & 0\\\\0&\\lambda_2 \\end{pmatrix} = \\begin{pmatrix} \\var{mnB} & 0\\\\0&\\var{mxB} \\end{pmatrix} \\Rightarrow D^{\\var{n}}=\\begin{pmatrix} \\var{mnB^n} & 0\\\\0&\\var{mxB^n} \\end{pmatrix} \\end{eqnarray*} \\]
\nHence \\[\\begin{eqnarray*}B^{\\var{n}}&=&PD^{\\var{n}}P^{-1}\\\\ \\\\ &=&\\simplify[std]{1/{x1-x2}}\\begin{pmatrix} \\var{s*(b22-mnB)} & \\var{s*(b22-mxB)} \\\\1&1 \\end{pmatrix}\\begin{pmatrix} \\var{mnB^n} & 0\\\\0&\\var{mxB^n} \\end{pmatrix}\\begin{pmatrix} 1 & \\var{-s*(b22-mxB)} \\\\-1&\\var{s*(b22-mnB)} \\end{pmatrix}\\\\ \\\\ &=&\\begin{pmatrix} \\var{bn11} & \\var{bn12}\\\\\\var{bn21}&\\var{bn22} \\end{pmatrix} \\end{eqnarray*} \\]
"}, {"name": "Find eigenvalues, characteristic polynomial and a normalised eigenvector of a 3x3 matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"eigen3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except[0,eigen1,eigen2])", "description": "", "name": "eigen3"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "1-g*a", "description": "", "name": "b"}, "invp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([0,1,g],[a,0,1],[b,1,0])", "description": "", "name": "invp"}, "det": {"templateType": "anything", "group": "Ungrouped variables", "definition": "eigen1*eigen2*eigen3", "description": "", "name": "det"}, "coefflam": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-(eigen1*eigen2+eigen1*eigen3+eigen2*eigen3)", "description": "", "name": "coefflam"}, "M": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p*D*invp", "description": "", "name": "M"}, "eigen2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except [0,eigen1])", "description": "", "name": "eigen2"}, "coefflamsq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "eigen1+eigen2+eigen3", "description": "", "name": "coefflamsq"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2..2 except 0)", "description": "", "name": "a"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "g"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([-1,g,1],[b,-g*b,1-b],[a,b,-a])", "description": "", "name": "p"}, "eigen1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "eigen1"}, "D": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([eigen1,0,0],[0,eigen2,0],[0,0,eigen3])", "description": "", "name": "D"}}, "ungrouped_variables": ["a", "b", "D", "g", "det", "M", "coefflamsq", "invp", "p", "coefflam", "eigen2", "eigen3", "eigen1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "eigen1", "minValue": "eigen1", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "eigen3", "minValue": "eigen3", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "You are given that $\\var{vector(1,-b,-a)}$ is an eigenvector of $M$.
\nFind the corresponding eigenvalue: [[0]]
\nAlso $\\var{vector(1,1-b,-a)}$ is an eigenvector of $M$.
\nFind the corresponding eigenvalue: [[1]]
\n", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "-lambda^3+{coefflamsq}*lambda^2+{coefflam}*lambda+{det}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all", "marks": 1, "vsetrangepoints": 5}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "eigen2", "minValue": "eigen2", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"answer": "{-b}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"answer": "{b}/{g}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "Enter numbers as fractions or integers and not as decimals.
", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "Find the characteristic polynomial of $M$ and hence another eigenvalue for $M$.
\nEnter the characteristic polynomial in the form $P_M(\\lambda) = -\\lambda^3+a\\lambda^2+b\\lambda+c$.
\nWrite the letter $\\lambda$ as lambda
.
Characteristic polynomial: $P_M(\\lambda) = \\;$[[0]]
\nHence find another eigenvalue of $M$: [[1]]
\nFind a corresponding eigenvector for this eigenvalue. Scale your vector such that the first component is $1$. You have to find the other two components:
\nEigenvector = $\\Bigg($ $1$[[2]][[3]] $\\Bigg)$
\nInput both components as fractions or integers and not as decimals.
", "showCorrectAnswer": true, "marks": 0}], "statement": "Let $M=\\var{M}$. Answer the following questions.
", "tags": ["characteristic equation", "characteristic polynomial", "checked2015", "determinant", "eigenvalues", "eigenvectors", "linear algebra", "linear equations", "MAS1602", "matrices", "matrix algebra"], "rulesets": {}, "preamble": {"css": ".vector-input {\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n}\n.vector-input .component {\n float: center;\n clear: both;\n display: block !important;\n text-align: center;\n}\n.vector-input .part {\n margin-top: 0;\n margin-bottom: 0;\n}", "js": ""}, "type": "question", "metadata": {"notes": "Created 19/09/2014
", "licence": "Creative Commons Attribution 4.0 International", "description": "Given a 3 x 3 matrix, and two eigenvectors find their corresponding eigenvalues. Also fnd the characteristic polynomial and using this find the third eigenvalue and a normalised eigenvector $(x=1)$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "For the eigenvector $\\var{vector(1,-b,-a)}$ we have:
\n$\\var{M}\\var{vector(1,-b,-a)}=\\var{vector(eigen1,-eigen1*b,-eigen1*a)}=\\var{eigen1}\\var{vector(1,-b,-a)}$.
\nHence the corresponding eigenvalue is $\\var{eigen1}$.
\nSimilarly, for the eigenvector $\\var{vector(1,1-b,-a)}$ we have:
\n$\\var{M}\\var{vector(1,1-b,-a)}=\\var{vector(eigen3,eigen3*(1-b),-eigen3*a)}=\\var{eigen3}\\var{vector(1,1-b,-a)}$.
\nHence the corresponding eigenvalue for this eigenvector is $\\var{eigen3}$.
\nThe characteristic polynomial is given by $P_M(\\lambda)=\\operatorname{det}(M-\\lambda I_3)$. The roots of this are the eigenvalues.
\nWe find that in this case:
\n\\[\\begin{align}\\operatorname{det}(M-\\lambda I_3)&=\\operatorname{det}\\begin{pmatrix}\\var{m[0][0]}-\\lambda &\\var{m[0][1] }&\\var{m[0][2]}\\\\ \\var{m[1][0]}&\\var{m[1][1] }-\\lambda &\\var{m[1][2]}\\\\ \\var{m[2][0]}&\\var{m[2][1] } &\\var{m[2][2]}-\\lambda \\end{pmatrix}\\\\&=\\simplify{-lambda^3+{coefflamsq}*lambda^2+{coefflam}*lambda+{det}}\\end{align}\\]
\nNow we know that $\\simplify{lambda-{eigen1}}$ and $\\simplify{lambda-{eigen3}}$ are both factors of the characteristic polynomial.
\nHence we have:
\n$\\simplify{-lambda^3+{coefflamsq}*lambda^2+{coefflam}*lambda+{det}=-(lambda-{eigen1})(lambda-{eigen3})(lambda-r)}$ for some number $r$.
\nSince the constant term in the characteristic polynomial is the product of the three eigenvalues, $r=\\simplify[!basic]{{det}/({eigen1}*{eigen3})={eigen2}}$ and this is the third eigenvalue.
\nTo find an eigenvector corresponding to this eigenvalue we solve the equation:
\n$\\simplify{M*vector(x,y,z)={M}*vector(x,y,z)={eigen2}*vector(x,y,z)}$
\nThis gives the equations:
\n\\[\\begin{align} \\simplify{{m[0][0]}*x+{m[0][1]}*y+{m[0][2]}*z}&=\\simplify{{eigen2}*x}\\\\ \\simplify{{m[1][0]}*x+{m[1][1]}*y+{m[1][2]}*z}&=\\simplify{{eigen2}*y}\\\\ \\simplify{{m[2][0]}*x+{m[2][1]}*y+{m[2][2]}*z}&=\\simplify{{eigen2}*z}\\end{align}\\]
\nThe question asked you to find an eigenvector with $x=1$ and if we substitute this into the equations we find (only need to use two of the equations) that $y=\\var{-b}$ and $z=\\simplify[all,fractionNumbers]{{b}/{g}}$.
\nHence the eigenvector we want is $\\simplify[all,fractionNumbers]{vector(1,{-b},{b}/{g})}$.
"}, {"name": "Find the Determinant of a 3 x 3 Matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [{"variables": ["a"], "name": "Unnamed group"}], "variables": {"a": {"templateType": "anything", "group": "Unnamed group", "definition": "matrix([ [a11,a12,a13],[a21,a22,a23],[a31,a32,a33] ])", "description": "", "name": "a"}, "a13": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "Matrix element
", "name": "a13"}, "a22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "Matrix element
", "name": "a22"}, "a31": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "Matrix element
", "name": "a31"}, "a23": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "Matrix element
", "name": "a23"}, "m3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(a21*a32)-(a22*a31)", "description": "Submatrix
", "name": "m3"}, "m1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(a22*a33)-(a23*a32)", "description": "Submatrix
", "name": "m1"}, "m2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(a21*a33)-(a23*a31)", "description": "Submatrix
", "name": "m2"}, "a32": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "Matrix element
", "name": "a32"}, "a12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "Matrix element
", "name": "a12"}, "a11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "Matrix element
", "name": "a11"}, "a33": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "Matrix element
", "name": "a33"}, "a21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "Matrix element
", "name": "a21"}}, "ungrouped_variables": ["a11", "a12", "a13", "a21", "a22", "a23", "a31", "a32", "a33", "m1", "m2", "m3"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"prompt": "Calculate the determinant of the matrix.
\n$\\operatorname{det}\\left( \\mathrm{A}\\right) = $ [[0]]
\n", "scripts": {}, "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "allowFractions": false, "type": "numberentry", "maxValue": "det(a)", "minValue": "det(a)", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "statement": "Consider the $3 \\times 3$ matrix,
\n\\begin{align} \\mathrm{A} &= \\var{a} \\end{align}
", "tags": ["determinant of a matrix", "MAS1602", "mas1602", "matrices", "matrix"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "Find the determinant of a $3 \\times 3$ matrix.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "The determinant of a matrix $\\mathrm{M} = \\begin{pmatrix} a&b&c \\\\ d&e&f \\\\ g&h&i \\end{pmatrix}$ can be calculated by using cofactor expansion. Expanding along the first row,
\n\\[ \\det\\left(\\mathrm{M}\\right) = a \\cdot \\det \\begin{pmatrix} e&f \\\\ h&i \\end{pmatrix}- b \\cdot \\det \\begin{pmatrix} d&f \\\\ g&i \\end{pmatrix} + c \\cdot \\det \\begin{pmatrix} d&e \\\\ g&h \\end{pmatrix}\\]
\nThus for our example we have:
\n\\[\\begin{align} \\det \\begin{pmatrix} e&f \\\\ h&i \\end{pmatrix} &= \\simplify[]{({a22}*{a33})-({a23}*{a32}) = {m1}} \\\\ \\det \\begin{pmatrix} d&f \\\\ g&i \\end{pmatrix} &= \\simplify[]{({a21}*{a33})-({a23}*{a31}) = {m2}} \\\\ \\det \\begin{pmatrix} d&e \\\\ g&h \\end{pmatrix} &=\\simplify[]{ ({a21}*{a32})-({a22}*{a31}) ={m3}} \\end{align}\\]
\nand so
\n\\[\\begin{align} \\det\\left(\\mathrm{A}\\right) = (\\simplify[]{{a11}*{m1}})-(\\simplify[]{{a12}*{m2}})+(\\simplify[]{{a13}*{m3}}) = \\simplify[]{{det(a)}} \\end{align}\\]
"}, {"name": "Find the Determinant of a 4 x 4 Matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "tags": ["determinant of a matrix", "matrices", "matrix"], "metadata": {"description": "Find the determinant of a $4 \\times 4$ matrix.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Consider the $4 \\times 4$ matrix,
\n\\begin{align} \\mathrm{A} &= \\var{a} \\end{align}
", "advice": "The determinant of an $n \\times n$ matrix an be calculated in terms of the determinant of minor matrices of size $[n-1] \\times [n-1]$.
\nFor our example we multiply each value in a chosen row of the matrix by its cofactor,
\n\\[ (-1)^{i+j} M_{ij} \\]
\nfor a value at row $i$ and column $j$, where $M_{ij}$ is its minor $3 \\times 3$ matrix. Adding these values together gives the determinant of our $4 \\times 4$ matrix.
\nIn our example, choosing the first row we have,
\n\\[ \\det\\left(\\mathrm{A}\\right) = \\var{a11} \\cdot \\det \\var{m1}-\\var{a12} \\cdot \\det \\var{m2}+\\var{a13} \\cdot \\det \\var{m3} - \\var{a14} \\cdot \\det \\var{m4} \\]
\nNotice that we do not need to compute all of the 3 x 3 matrices, particularly if the starting row is chosen carefully.
\nThen,
\n\\[ \\det\\left(\\mathrm{A}\\right) = (\\simplify[]{{a11}*{det(m1)}})+(\\simplify[]{{a14}*{det(m4)}}) = \\var{determinant} \\]
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a41": {"name": "a41", "group": "Matrix Elements", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "m4": {"name": "m4", "group": "Minor Matrices", "definition": "matrix([ [a21,a22,a23],[a31,a32,a33],[a41,a42,a43] ])", "description": "submatrix
", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Given Matrix", "definition": "matrix([ [a11,a12,a13,a14],[a21,a22,a23,a24],[a31,a32,a33,a34],[a41,a42,a43,a44] ])", "description": "4 x 4 matrix provided to student
", "templateType": "anything", "can_override": false}, "a22": {"name": "a22", "group": "Matrix Elements", "definition": "random(-6..6 except 0)", "description": "Matrix element
", "templateType": "anything", "can_override": false}, "a44": {"name": "a44", "group": "Matrix Elements", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "m3": {"name": "m3", "group": "Minor Matrices", "definition": "matrix([ [a21,a22,a24],[a31,a32,a34],[a41,a42,a44] ])", "description": "Submatrix
", "templateType": "anything", "can_override": false}, "a42": {"name": "a42", "group": "Matrix Elements", "definition": "random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "a14": {"name": "a14", "group": "Matrix Elements", "definition": "random(-6..6 except 0) ", "description": "", "templateType": "anything", "can_override": false}, "aa": {"name": "aa", "group": "Ungrouped variables", "definition": "0", "description": "Matrix element
", "templateType": "anything", "can_override": false}, "a43": {"name": "a43", "group": "Matrix Elements", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "determinant": {"name": "determinant", "group": "Ungrouped variables", "definition": "a11*det(m1)+a14*det(m4)", "description": "Determinant of the given matrix
", "templateType": "anything", "can_override": false}, "a33": {"name": "a33", "group": "Matrix Elements", "definition": "random(-6..6 except 0)", "description": "Matrix element
", "templateType": "anything", "can_override": false}, "m1": {"name": "m1", "group": "Minor Matrices", "definition": "matrix([ [a22,a23,a24],[a32,a33,a34],[a42,a43,a44] ])", "description": "Submatrix
", "templateType": "anything", "can_override": false}, "a31": {"name": "a31", "group": "Matrix Elements", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "a23": {"name": "a23", "group": "Matrix Elements", "definition": "random(-5..5)", "description": "Matrix element
", "templateType": "anything", "can_override": false}, "a13": {"name": "a13", "group": "Matrix Elements", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "a34": {"name": "a34", "group": "Matrix Elements", "definition": "random(-5..5)", "description": "Matrix element
", "templateType": "anything", "can_override": false}, "a24": {"name": "a24", "group": "Matrix Elements", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "m2": {"name": "m2", "group": "Minor Matrices", "definition": "matrix([ [a21,a23,a24],[a31,a33,a34],[a41,a43,a44] ])", "description": "Submatrix
", "templateType": "anything", "can_override": false}, "a32": {"name": "a32", "group": "Matrix Elements", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "a12": {"name": "a12", "group": "Matrix Elements", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "a11": {"name": "a11", "group": "Matrix Elements", "definition": "random(-6..6 except 0)", "description": "Matrix element
", "templateType": "anything", "can_override": false}, "a21": {"name": "a21", "group": "Matrix Elements", "definition": "0", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["aa", "determinant"], "variable_groups": [{"name": "Given Matrix", "variables": ["a"]}, {"name": "Minor Matrices", "variables": ["m1", "m2", "m3", "m4"]}, {"name": "Matrix Elements", "variables": ["a11", "a12", "a13", "a14", "a21", "a22", "a23", "a24", "a31", "a32", "a33", "a34", "a41", "a42", "a43", "a44"]}], "functions": {}, "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": "Calculate the determinant of the matrix through expansion by the first row.
\n$\\det \\left(\\mathrm{A} \\right) = $ [[0]]
\n", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "determinant", "maxValue": "determinant", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Invert a 3x3 matrix using row operations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "name": "a"}, "f1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "f1"}, "a22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*(a*b-1)*g2", "description": "", "name": "a22"}, "g3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "g3"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c2"}, "f2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "f2"}, "c3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c3"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "name": "b"}, "f3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "f3"}, "a33": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*g3", "description": "", "name": "a33"}, "b24": {"templateType": "anything", "group": "Ungrouped variables", "definition": "g2*a*f1*(1-(a*b-b-1)*a*c)", "description": "", "name": "b24"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "", "name": "c"}, "g1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1", "description": "", "name": "g1"}, "g2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "g2"}, "b25": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*g2*(a*(a*b*c-b*c)-1)", "description": "", "name": "b25"}, "a31": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*a*c*g1", "description": "", "name": "a31"}, "a23": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*(a^2*b-a-a*b)*g3", "description": "", "name": "a23"}, "a13": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1*(b*a-b)*g3", "description": "", "name": "a13"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "name": "c1"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*g2", "description": "", "name": "s"}, "a32": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*c*b*g2", "description": "", "name": "a32"}, "a12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1*b*g2", "description": "", "name": "a12"}, "a11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1*g1", "description": "", "name": "a11"}, "a21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*a*g1", "description": "", "name": "a21"}}, "ungrouped_variables": ["a", "a11", "a12", "a13", "a21", "a22", "a23", "a31", "a32", "a33", "b", "b24", "b25", "c", "c1", "c2", "c3", "f1", "f2", "f3", "g1", "g2", "g3", "s"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f2*g2}", "minValue": "{-f2*g2}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-a*f2*g3}", "minValue": "{-a*f2*g3}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{ -f2*f1*a}", "minValue": "{ -f2*f1*a}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{f3*g2*c*b*(1-a)}", "minValue": "{f3*g2*c*b*(1-a)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{f3*g3*(1-a^2*b*c+a*b*c)}", "minValue": "{f3*g3*(1-a^2*b*c+a*b*c)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f3*f1*a*c}", "minValue": "{-f3*f1*a*c}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\nIntroduce zeros in the first column below the first entry by adding suitable multiples of the first row to rows 2 and 3.
\nInput all numbers as fractions or integers and not as decimals.
\n\n
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$\\var{a11}$ | \n$\\var{a12}$ | \n$\\var{a13}$ | \n$1$ | \n$0$ | \n$0$ | \n\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$0$ | \n[[0]] | \n[[1]] | \n[[2]] | \n$1$ | \n$0$ | \n||
$0$ | \n[[3]] | \n[[4]] | \n[[5]] | \n$0$ | \n$1$ | \n
Now, if necessary, multiply the second row by a suitable number so that the second entry in the second row is 1.
\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{s*(-b*c+a*b*c)}", "minValue": "{s*(-b*c+a*b*c)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{a*g2*g3}", "minValue": "{a*g2*g3}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{ g2*a*f1}", "minValue": "{ g2*a*f1}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f2*g2}", "minValue": "{-f2*g2}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{f3*g3}", "minValue": "{f3*g3}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{(a*b-b-1)*f3*a*c*f1}", "minValue": "{(a*b-b-1)*f3*a*c*f1}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f2*f3*(a*b*c-b*c)}", "minValue": "{-f2*f3*(a*b*c-b*c)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\nNow using this matrix, introduce a zero in the second column below the second entry of the second column by:
\nAdding [[0]] times the second row to the third row to get the matrix:
\n\n
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$\\var{a11}$ | \n$\\var{a12}$ | \n$\\var{a13}$ | \n$1$ | \n$0$ | \n$0$ | \n\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$0$ | \n$1$ | \n[[1]] | \n[[2]] | \n[[3]] | \n$0$ | \n||
$0$ | \n$0$ | \n[[4]] | \n[[5]] | \n[[6]] | \n$1$ | \n
Now, if necessary, multiply the third row by a suitable constant so that the third entry in the third column is 1.
\nWith this matrix, use the third row to introduce zeros into the second and first entries in the third column by adding suitable multiples of the third row to the second and first rows.
\nMultiply third row by [[0]]and add to the second row.
\nMultiply third row by [[1]]and add to the first row.
\nUsing this new matrix there is one more operation needed.
\nMultiplying the second row by $\\var{-a12}$ and adding to the first row to obtain the inverse matrix appearing on the right hand side.
\n\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$1$ | \n$0$ | \n$0$ | \n[[2]] | \n[[3]] | \n[[4]] | \n\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$0$ | \n$1$ | \n$0$ | \n[[5]] | \n[[6]] | \n[[7]] | \n||
$0$ | \n$0$ | \n$1$ | \n[[8]] | \n[[9]] | \n[[10]] | \n
Find the inverse of the following matrix:
\\[A = \\left(\\begin{array}{rrr} \\var{a11} & \\var{a12} & \\var{a13}\\\\ \\var{a21} & \\var{a22} & \\var{a23}\\\\ \\var{a31} & \\var{a32} & \\var{a33}\\\\ \\end{array}\\right)\\]
Form the $3 \\times 6$ augmented matrix $B$ by placing $I_3$ to the right of $A$ as below:
\\[B = \\left(\\begin{array}{rrr|ccc} \\var{a11} & \\var{a12} & \\var{a13} &\\var{1}&\\var{0}&\\var{0}\\\\ \\var{a21} & \\var{a22} & \\var{a23}&\\var{0}&\\var{1}&\\var{0}\\\\ \\var{a31} & \\var{a32} & \\var{a33}&\\var{0}&\\var{0}&\\var{1}\\\\ \\end{array}\\right)\\]
In subsequent parts work with this matrix using row operations and introduce the identity matrix on the left hand side with the inverse of A eventually appearing on the right hand side.
\n ", "tags": ["MAS1602", "augmented matrices", "augmented matrix", "checked2015", "inverse matrix", "invertible matrices", "inverting a matrix", "linear algebra", "matrices", "matrix inverse", "matrix inversion"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t5/07/2012:
\n \t\tAdded tags.
\n \t\tChanged grammar in the question.
\n \t\tQuestion appears to be working correctly.
\n \t\t14/07/2012:
\n \t\tNeed to align columns where input takes place through the stages.
\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "$A$ a $3 \\times 3$ matrix. Using row operations on the augmented matrix $\\left(A | I_3\\right)$ reduce to $\\left(I_3 | A^{-1}\\right)$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "All of the working is now shown
"}, {"name": "Invert a 3x3 matrix using row operations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "name": "a"}, "f1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "f1"}, "a22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*(a*b-1)*g2", "description": "", "name": "a22"}, "g3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "g3"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c2"}, "f2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "f2"}, "c3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c3"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "name": "b"}, "f3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "f3"}, "a33": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*g3", "description": "", "name": "a33"}, "b24": {"templateType": "anything", "group": "Ungrouped variables", "definition": "g2*a*f1*(1-(a*b-b-1)*a*c)", "description": "", "name": "b24"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "", "name": "c"}, "g1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1", "description": "", "name": "g1"}, "g2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "g2"}, "b25": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*g2*(a*(a*b*c-b*c)-1)", "description": "", "name": "b25"}, "a31": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*a*c*g1", "description": "", "name": "a31"}, "a23": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*(a^2*b-a-a*b)*g3", "description": "", "name": "a23"}, "a13": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1*(b*a-b)*g3", "description": "", "name": "a13"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "name": "c1"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*g2", "description": "", "name": "s"}, "a32": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*c*b*g2", "description": "", "name": "a32"}, "a12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1*b*g2", "description": "", "name": "a12"}, "a11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1*g1", "description": "", "name": "a11"}, "a21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*a*g1", "description": "", "name": "a21"}}, "ungrouped_variables": ["a", "a11", "a12", "a13", "a21", "a22", "a23", "a31", "a32", "a33", "b", "b24", "b25", "c", "c1", "c2", "c3", "f1", "f2", "f3", "g1", "g2", "g3", "s"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f2*g2}", "minValue": "{-f2*g2}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-a*f2*g3}", "minValue": "{-a*f2*g3}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{ -f2*f1*a}", "minValue": "{ -f2*f1*a}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{f3*g2*c*b*(1-a)}", "minValue": "{f3*g2*c*b*(1-a)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{f3*g3*(1-a^2*b*c+a*b*c)}", "minValue": "{f3*g3*(1-a^2*b*c+a*b*c)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f3*f1*a*c}", "minValue": "{-f3*f1*a*c}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\nIntroduce zeros in the first column below the first entry by adding suitable multiples of the first row to rows 2 and 3.
\nInput all numbers as fractions or integers and not as decimals.
\n\n
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$\\var{a11}$ | \n$\\var{a12}$ | \n$\\var{a13}$ | \n$1$ | \n$0$ | \n$0$ | \n\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$0$ | \n[[0]] | \n[[1]] | \n[[2]] | \n$1$ | \n$0$ | \n||
$0$ | \n[[3]] | \n[[4]] | \n[[5]] | \n$0$ | \n$1$ | \n
Now, if necessary, multiply the second row by a suitable number so that the second entry in the second row is 1.
\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{s*(-b*c+a*b*c)}", "minValue": "{s*(-b*c+a*b*c)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{a*g2*g3}", "minValue": "{a*g2*g3}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{ g2*a*f1}", "minValue": "{ g2*a*f1}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f2*g2}", "minValue": "{-f2*g2}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{f3*g3}", "minValue": "{f3*g3}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{(a*b-b-1)*f3*a*c*f1}", "minValue": "{(a*b-b-1)*f3*a*c*f1}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f2*f3*(a*b*c-b*c)}", "minValue": "{-f2*f3*(a*b*c-b*c)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\nNow using this matrix, introduce a zero in the second column below the second entry of the second column by:
\nAdding [[0]] times the second row to the third row to get the matrix:
\n\n
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$\\var{a11}$ | \n$\\var{a12}$ | \n$\\var{a13}$ | \n$1$ | \n$0$ | \n$0$ | \n\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$0$ | \n$1$ | \n[[1]] | \n[[2]] | \n[[3]] | \n$0$ | \n||
$0$ | \n$0$ | \n[[4]] | \n[[5]] | \n[[6]] | \n$1$ | \n
Now, if necessary, multiply the third row by a suitable constant so that the third entry in the third column is 1.
\nWith this matrix, use the third row to introduce zeros into the second and first entries in the third column by adding suitable multiples of the third row to the second and first rows.
\nMultiply third row by [[0]]and add to the second row.
\nMultiply third row by [[1]]and add to the first row.
\nUsing this new matrix there is one more operation needed.
\nMultiplying the second row by $\\var{-a12}$ and adding to the first row to obtain the inverse matrix appearing on the right hand side.
\n\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$1$ | \n$0$ | \n$0$ | \n[[2]] | \n[[3]] | \n[[4]] | \n\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$0$ | \n$1$ | \n$0$ | \n[[5]] | \n[[6]] | \n[[7]] | \n||
$0$ | \n$0$ | \n$1$ | \n[[8]] | \n[[9]] | \n[[10]] | \n
Find the inverse of the following matrix:
\\[A = \\left(\\begin{array}{rrr} \\var{a11} & \\var{a12} & \\var{a13}\\\\ \\var{a21} & \\var{a22} & \\var{a23}\\\\ \\var{a31} & \\var{a32} & \\var{a33}\\\\ \\end{array}\\right)\\]
Form the $3 \\times 6$ augmented matrix $B$ by placing $I_3$ to the right of $A$ as below:
\\[B = \\left(\\begin{array}{rrr|ccc} \\var{a11} & \\var{a12} & \\var{a13} &\\var{1}&\\var{0}&\\var{0}\\\\ \\var{a21} & \\var{a22} & \\var{a23}&\\var{0}&\\var{1}&\\var{0}\\\\ \\var{a31} & \\var{a32} & \\var{a33}&\\var{0}&\\var{0}&\\var{1}\\\\ \\end{array}\\right)\\]
In subsequent parts work with this matrix using row operations and introduce the identity matrix on the left hand side with the inverse of A eventually appearing on the right hand side.
\n ", "tags": ["MAS1602", "augmented matrices", "augmented matrix", "checked2015", "inverse matrix", "invertible matrices", "inverting a matrix", "linear algebra", "matrices", "matrix inverse", "matrix inversion"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t5/07/2012:
\n \t\tAdded tags.
\n \t\tChanged grammar in the question.
\n \t\tQuestion appears to be working correctly.
\n \t\t14/07/2012:
\n \t\tNeed to align columns where input takes place through the stages.
\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "$A$ a $3 \\times 3$ matrix. Using row operations on the augmented matrix $\\left(A | I_3\\right)$ reduce to $\\left(I_3 | A^{-1}\\right)$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "All of the working is now shown
"}, {"name": "Matrices: Manipulation", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "George Stagg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/930/"}], "tags": ["checked2015", "Linear algebra", "Linear Algebra", "linear algebra", "matrices", "matrix", "matrix manipulation", "matrix multiplication", "multiply matrix", "products of matrices"], "metadata": {"description": "Elementary Exercises in multiplying matrices.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Answer the following questions on matrices.
\n", "advice": "", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variables": {"u": {"name": "u", "group": "Ungrouped variables", "definition": "random(3..4)", "description": "", "templateType": "anything"}, "a23": {"name": "a23", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}, "s5": {"name": "s5", "group": "Ungrouped variables", "definition": "if(m=3,0.5,-0.5)", "description": "", "templateType": "anything"}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "a11*v1+a12*v2+a13*v3", "description": "", "templateType": "anything"}, "b11": {"name": "b11", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "a22": {"name": "a22", "group": "Ungrouped variables", "definition": "random(-4,-3,-2,-1,1,2,3,5)", "description": "", "templateType": "anything"}, "s4": {"name": "s4", "group": "Ungrouped variables", "definition": "if(r=2,0.5,-0.5)", "description": "", "templateType": "anything"}, "s7": {"name": "s7", "group": "Ungrouped variables", "definition": "if(u=y,0.5,-0.5)", "description": "", "templateType": "anything"}, "s8": {"name": "s8", "group": "Ungrouped variables", "definition": "if(x=r,0.5,-0.5)", "description": "", "templateType": "anything"}, "mad": {"name": "mad", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),q),p))", "description": "", "templateType": "anything"}, "b23": {"name": "b23", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "templateType": "anything"}, "mac": {"name": "mac", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),n),m))", "description": "", "templateType": "anything"}, "a33": {"name": "a33", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "mag": {"name": "mag", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),u),w))", "description": "", "templateType": "anything"}, "ba32": {"name": "ba32", "group": "Ungrouped variables", "definition": "b31*a12+b32*a22+b33*a32", "description": "", "templateType": "anything"}, "b21": {"name": "b21", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "", "templateType": "anything"}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "n+random(0,z)", "description": "", "templateType": "anything"}, "ab33": {"name": "ab33", "group": "Ungrouped variables", "definition": "a31*b13+a32*b23+a33*b33", "description": "", "templateType": "anything"}, "mah": {"name": "mah", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),x),y))", "description": "", "templateType": "anything"}, "mae": {"name": "mae", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),s),r))", "description": "", "templateType": "anything"}, "ba22": {"name": "ba22", "group": "Ungrouped variables", "definition": "b21*a12+b22*a22+b23*a32", "description": "", "templateType": "anything"}, "a13": {"name": "a13", "group": "Ungrouped variables", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "ab13": {"name": "ab13", "group": "Ungrouped variables", "definition": "a11*b13+a12*b23+a13*b33", "description": "", "templateType": "anything"}, "w2": {"name": "w2", "group": "Ungrouped variables", "definition": "random(-4..4)", "description": "", "templateType": "anything"}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "q1": {"name": "q1", "group": "Ungrouped variables", "definition": "b11*w1+b12*w2+b13*w3", "description": "", "templateType": "anything"}, "a32": {"name": "a32", "group": "Ungrouped variables", "definition": "random(-4..4)", "description": "", "templateType": "anything"}, "ab23": {"name": "ab23", "group": "Ungrouped variables", "definition": "a21*b13+a22*b23+a23*b33", "description": "", "templateType": "anything"}, "ba11": {"name": "ba11", "group": "Ungrouped variables", "definition": "b11*a11+b12*a21+b13*a31", "description": "", "templateType": "anything"}, "ab32": {"name": "ab32", "group": "Ungrouped variables", "definition": "a31*b12+a32*b22+a33*b32", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "ba31": {"name": "ba31", "group": "Ungrouped variables", "definition": "b31*a11+b32*a21+b33*a31", "description": "", "templateType": "anything"}, "a21": {"name": "a21", "group": "Ungrouped variables", "definition": "random(-1,0,1)", "description": "", "templateType": "anything"}, "v3": {"name": "v3", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything"}, "s1": {"name": "s1", "group": "Ungrouped variables", "definition": "if(n=p,0.5,-0.5)", "description": "", "templateType": "anything"}, "ba33": {"name": "ba33", "group": "Ungrouped variables", "definition": "b31*a13+b32*a23+b33*a33", "description": "", "templateType": "anything"}, "v1": {"name": "v1", "group": "Ungrouped variables", "definition": "random(-3..3)", "description": "", "templateType": "anything"}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "[[s1,-s1],[s2,-s2],[s3,-s3],[s4,-s4],[s5,-s5],[s6,-s6],[s7,-s7],[s8,-s8],[s9,-s9],[s10,-s10]]", "description": "", "templateType": "anything"}, "w1": {"name": "w1", "group": "Ungrouped variables", "definition": "random(4..6)", "description": "", "templateType": "anything"}, "z": {"name": "z", "group": "Ungrouped variables", "definition": "random(-2,-1,1,2)", "description": "", "templateType": "anything"}, "c13": {"name": "c13", "group": "Ungrouped variables", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "p3": {"name": "p3", "group": "Ungrouped variables", "definition": "a31*v1+a32*v2+a33*v3", "description": "", "templateType": "anything"}, "s2": {"name": "s2", "group": "Ungrouped variables", "definition": "if(q=m,0.5,-0.5)", "description": "", "templateType": "anything"}, "q2": {"name": "q2", "group": "Ungrouped variables", "definition": "b21*w1+b22*w2+b23*w3", "description": "", "templateType": "anything"}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(3..4)", "description": "", "templateType": "anything"}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "u+random(0,z)", "description": "", "templateType": "anything"}, "c11": {"name": "c11", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}, "ab21": {"name": "ab21", "group": "Ungrouped variables", "definition": "a21*b11+a22*b21+a23*b31", "description": "", "templateType": "anything"}, "v2": {"name": "v2", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "ba12": {"name": "ba12", "group": "Ungrouped variables", "definition": "b11*a12+b12*a22+b13*a32", "description": "", "templateType": "anything"}, "b32": {"name": "b32", "group": "Ungrouped variables", "definition": "random(-3..3)", "description": "", "templateType": "anything"}, "b33": {"name": "b33", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}, "s9": {"name": "s9", "group": "Ungrouped variables", "definition": "if(w=3,0.5,-0.5)", "description": "", "templateType": "anything"}, "s10": {"name": "s10", "group": "Ungrouped variables", "definition": "if(u=3,0.5,-0.5)", "description": "", "templateType": "anything"}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "m+random(0,z)", "description": "", "templateType": "anything"}, "ab22": {"name": "ab22", "group": "Ungrouped variables", "definition": "a21*b12+a22*b22+a23*b32", "description": "", "templateType": "anything"}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "random(3..5)", "description": "", "templateType": "anything"}, "b22": {"name": "b22", "group": "Ungrouped variables", "definition": "random(-4,-3,-2,-1,1,2,3,4)", "description": "", "templateType": "anything"}, "p2": {"name": "p2", "group": "Ungrouped variables", "definition": "a21*v1+a22*v2+a23*v3", "description": "", "templateType": "anything"}, "a31": {"name": "a31", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "u+random(0,z)", "description": "", "templateType": "anything"}, "c12": {"name": "c12", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "ab11": {"name": "ab11", "group": "Ungrouped variables", "definition": "a11*b11+a12*b21+a13*b31", "description": "", "templateType": "anything"}, "ba21": {"name": "ba21", "group": "Ungrouped variables", "definition": "b21*a11+b22*a21+b23*a31", "description": "", "templateType": "anything"}, "ba23": {"name": "ba23", "group": "Ungrouped variables", "definition": "b21*a13+b22*a23+b23*a33", "description": "", "templateType": "anything"}, "q3": {"name": "q3", "group": "Ungrouped variables", "definition": "b31*w1+b32*w2+b33*w3", "description": "", "templateType": "anything"}, "ab12": {"name": "ab12", "group": "Ungrouped variables", "definition": "a11*b12+a12*b22+a13*b32", "description": "", "templateType": "anything"}, "ba13": {"name": "ba13", "group": "Ungrouped variables", "definition": "b11*a13+b12*a23+b13*a33", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(3..6 except m)", "description": "", "templateType": "anything"}, "b31": {"name": "b31", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(4..6)", "description": "", "templateType": "anything"}, "s3": {"name": "s3", "group": "Ungrouped variables", "definition": "if(s=5,0.5,-0.5)", "description": "", "templateType": "anything"}, "s6": {"name": "s6", "group": "Ungrouped variables", "definition": "if(r=3,0.5,-0.5)", "description": "", "templateType": "anything"}, "ab31": {"name": "ab31", "group": "Ungrouped variables", "definition": "a31*b11+a32*b21+a33*b31", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "random(-1,1,2)", "description": "", "templateType": "anything"}, "b12": {"name": "b12", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "w3": {"name": "w3", "group": "Ungrouped variables", "definition": "random(-4..4)", "description": "", "templateType": "anything"}, "b13": {"name": "b13", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ba21", "a21", "a22", "a23", "b23", "b22", "b21", "ba22", "w3", "w2", "w1", "ba11", "a11", "ba13", "p1", "q1", "q", "q3", "q2", "ab23", "ab22", "ab21", "s3", "s2", "s1", "a12", "s7", "s6", "s5", "s4", "b12", "b13", "b11", "c13", "c12", "c11", "a33", "a32", "a31", "ba32", "ba33", "a13", "ba31", "s10", "s9", "b32", "b31", "v1", "v2", "v3", "mae", "mad", "mag", "mah", "ba12", "b33", "p2", "p3", "ba23", "ab11", "ab31", "ab32", "ab33", "ab12", "m", "s8", "n", "mac", "p", "s", "r", "u", "w", "v", "y", "x", "z", "ab13"], "variable_groups": [], "functions": {}, "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 = \\left(\\begin{array}{rrr} \\var{a11} & \\var{a12} & \\var{a13}\\\\ \\var{a21} & \\var{a22} & \\var{a23}\\\\ \\var{a31} & \\var{a32} & \\var{a33}\\\\ \\end{array}\\right),\\;\\;\\;\\; B= \\left(\\begin{array}{rrr} \\var{b11} & \\var{b12} & \\var{b13}\\\\ \\var{b21} & \\var{b22} & \\var{b23}\\\\ \\var{b31} & \\var{b32} & \\var{b33}\\\\ \\end{array}\\right),\\;\\;\\;\\; v= \\left(\\begin{array}{r} \\var{v1}\\\\ \\var{v2} \\\\ \\var{v3} \\end{array}\\right),\\;\\;\\;\\; w= \\left(\\begin{array}{r} \\var{w1}\\\\ \\var{w2} \\\\ \\var{w3} \\end{array}\\right)\\]
\nFind the following products:
\n$Av= $ [[0]]
\n$Bw= $ [[1]]
\n$BA= $ [[2]]
\n$AB= $ [[3]]
", "gaps": [{"type": "matrix", "useCustomName": true, "customName": "Av", "marks": "1.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([[p1],[p2],[p3]])", "correctAnswerFractions": false, "numRows": "3", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "Bw", "marks": "1.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([[q1],[q2],[q3]])", "correctAnswerFractions": false, "numRows": "3", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "BA", "marks": "4.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([ba11,ba12,ba13],\n [ba21,ba22,ba23],\n [ba31,ba32,ba33])", "correctAnswerFractions": false, "numRows": "3", "numColumns": "3", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "AB", "marks": "4.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([ab11,ab12,ab13],\n [ab21,ab22,ab23],\n [ab31,ab32,ab33])", "correctAnswerFractions": false, "numRows": "3", "numColumns": "3", "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": "Consider the following matrices together with the matrices from the first part of the question.
\n\\[\\begin{eqnarray}&C=& \\var{mac},\\;\\;\\;\\; &D=& \\var{mad},\\;\\;\\; \\;&E= &\\var{mae}\\\\&F=& \\left(\\begin{array}{rr} \\var{w1} & \\var{a12}\\\\ \\var{w2} & \\var{b23} \\\\ \\var{w3} & \\var{w2} \\\\\\var{v1} & \\var{b12}\\\\ 0 & \\var{-w2} \\end{array}\\right),\\;\\;\\;\\;&G=&\\var{mag},\\;\\;\\;\\;&H=&\\var{mah} \\end{eqnarray}\\]
\nWhich of the following products of matrices can be calculated?
\n[[0]]
\nPlease note that for every correct answer you get 0.5 marks and for every incorrect answer 0.5 is taken away. The minimum mark you can get is 0.
", "gaps": [{"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "choices": ["$CD$
", "$DC$
", "$EF$
", "$FE$
", "$BC$
", "$AE$
", "$GH$
", "$HE$
", "$AG$
", "$GB$
"], "matrix": "v", "layout": {"type": "all", "expression": ""}, "answers": ["Can be calculated", "Cannot be calculated"]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Multiply 2x2 matrices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([ [random(-3,-1,0,3),random(-3..1)], [random(2,3),random(-3..-1)] ])", "description": "", "name": "b"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([ [random(-2,1,2),random(1..4)], [random(-2..2),random(1..3)] ])", "description": "", "name": "a"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([ [random(1,0,4), a[0][1]+b[0][1]], [random(2..5),random(0,1)] ])", "description": "", "name": "c"}}, "ungrouped_variables": ["a", "b", "c"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "a*b", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "$\\mathbf{AB} = \\var{A}\\var{B} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "b*a", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "$\\mathbf{BA} = \\var{B}\\var{A} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "c*b", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "$\\mathbf{CB} = \\var{C}\\var{B} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "a*c", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "$\\mathbf{AC} = \\var{A}\\var{C} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}], "statement": "Let
\n\\begin{align} \\mathbf{A} &= \\var{a}, & \\mathbf{B} &= \\var{b}, & \\mathbf{C} &= \\var{c} \\end{align}
\nCalculate the following products of these matrices:
", "tags": ["checked2015", "MAS1602", "matrices", "matrix", "matrix multiplication", "matrix product", "multiplication of matrices", "multiplying matrices", "product of matrices", "tested1"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "10/07/2012:
\nAdded tags.
\nDisplay of matrices looks untidy when individual components include negative numbers.
\nIs it worthwhile restricting all components of matrices to be non zero?
\nQuestion appears to be working correctly.
\n24/12/2012:
\nChecked calculations, OK. Added tested1 tag.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Multiplication of $2 \\times 2$ matrices.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\\begin{align}
\\mathbf{AB} &= \\var{A}\\var{B} \\\\
&= \\begin{pmatrix} \\simplify[]{ {a[0][0]}*{b[0][0]}+{a[0][1]}*{b[1][0]} } & \\simplify[]{ {a[0][0]}*{b[0][1]} + {a[0][1]}*{b[1][1]} } \\\\ \\simplify[]{ {a[1][0]}*{b[0][0]} + {a[1][1]}*{b[1][0]} } & \\simplify[]{ {a[1][0]}*{b[0][1]} + {a[1][1]}*{b[1][1]} } \\end{pmatrix} \\\\
&= \\var{a*b}
\\end{align}
\\begin{align}
\\mathbf{BA} &= \\var{B}\\var{A} \\\\
&= \\begin{pmatrix} \\simplify[]{ {b[0][0]}*{a[0][0]}+{b[0][1]}*{a[1][0]} } & \\simplify[]{ {b[0][0]}*{a[0][1]} + {b[0][1]}*{a[1][1]} } \\\\ \\simplify[]{ {b[1][0]}*{a[0][0]} + {b[1][1]}*{a[1][0]} } & \\simplify[]{ {b[1][0]}*{a[0][1]} + {b[1][1]}*{a[1][1]} } \\end{pmatrix} \\\\
&= \\var{b*a}
\\end{align}
\\begin{align}
\\mathbf{CB} &= \\var{C}\\var{B} \\\\
&= \\begin{pmatrix} \\simplify[]{ {c[0][0]}*{b[0][0]}+{c[0][1]}*{b[1][0]} } & \\simplify[]{ {c[0][0]}*{b[0][1]} + {c[0][1]}*{b[1][1]} } \\\\ \\simplify[]{ {c[1][0]}*{b[0][0]} + {c[1][1]}*{b[1][0]} } & \\simplify[]{ {c[1][0]}*{b[0][1]} + {c[1][1]}*{b[1][1]} } \\end{pmatrix} \\\\
&= \\var{c*b}
\\end{align}
\\begin{align}
\\mathbf{AC} &= \\var{A}\\var{C} \\\\
&= \\begin{pmatrix} \\simplify[]{ {a[0][0]}*{c[0][0]}+{a[0][1]}*{c[1][0]} } & \\simplify[]{ {a[0][0]}*{c[0][1]} + {a[0][1]}*{c[1][1]} } \\\\ \\simplify[]{ {a[1][0]}*{c[0][0]} + {a[1][1]}*{c[1][0]} } & \\simplify[]{ {a[1][0]}*{c[0][1]} + {a[1][1]}*{c[1][1]} } \\end{pmatrix} \\\\
&= \\var{a*c}
\\end{align}
$\\mathbf{w} \\; \\mathbf{v} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "w*B", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": 1, "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "$\\mathbf{w} \\mathbf{B} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": false, "correctAnswer": "B*v", "markPerCell": false, "allowResize": false, "correctAnswerFractions": false, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": 1, "tolerance": 0, "showCorrectAnswer": true, "marks": 1}], "type": "gapfill", "prompt": "$\\mathbf{B} \\mathbf{v} = $ [[0]]
", "showCorrectAnswer": true, "marks": 0}], "statement": "Answer the following questions on matrices.
\nLet
\n\\begin{align} \\mathbf{v} &= \\var{v}, & \\mathbf{B} &= \\var{B}, & \\mathbf{w} &= \\var{w} \\end{align}
", "tags": ["checked2015", "MAS1602", "matrices", "matrix", "matrix multiplication", "matrix product", "multiplication of matrices", "multiply matrix", "product of matrices", "tested1"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "10/07/2012:
\nAdded tags.
Perhaps it would be worthwhile restraining all components of the three matrices to be non zero?
\nQuestion appears to be working correctly.
\n24/12/2012:
\nCalculation checked, OK. Added tested1 tag.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Very elementary matrix multiplication.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\\begin{align}
\\mathbf{w} \\mathbf{v} &= \\simplify{{w}*{v}} \\\\
&= \\simplify[]{{w[0][0]}*{v[0][0]}+{w[0][1]}*{v[1][0]}} \\\\
&= \\var{w*v}
\\end{align}
Since $\\mathbf{w}$ is a $1 \\times 2$ matrix and has the same number of columns, $2$, as the rows in the $2 \\times 2$ matrix $\\mathbf{B}$ we can multiply and form $\\mathbf{w} \\mathbf{B}$ which is a $1 \\times 2$ row vector:
\n\\begin{align}
\\mathbf{wB} &= \\simplify{{w}*{B}} \\\\
&= \\begin{pmatrix} \\simplify[]{ {w[0][0]}*{B[0][0]} + {w[0][1]}*{B[1][0]} }, & \\simplify[]{ {w[0][0]}*{B[0][1]} + {w[0][1]}*{B[1][1]} } \\end{pmatrix} \\\\
&= \\var{w*B}
\\end{align}
Since $\\mathbf{B}$ is a $2 \\times 2$ matrix and has the same number of columns, $2$, as the rows in $\\mathbf{v}$ we can form the matrix $\\mathbf{Bv}$ which will be a $2 \\times 1$ column vector.
\nWe find this vector to be:
\n\\begin{align}
\\mathbf{Bv} &= \\simplify{{B}*{v}} \\\\
&= \\begin{pmatrix} \\simplify[]{ {B[0][0]}*{v[0][0]} + {B[0][1]}*{v[1][0]} } \\\\ \\simplify[]{ {B[1][0]}*{v[0][0]} + {B[1][1]}*{v[1][0]} } \\end{pmatrix} \\\\
&= \\var{B*v}
\\end{align}
Putting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Rewrite the following system of equations as a matrix equation
\n\\[ \\mathbf{Av} = \\mathbf{b} \\]
\nfor a matrix $\\mathbf{A}$ and column vectors $\\mathbf{v}$ and $\\mathbf{b}$.
\n\\begin{align}
\\simplify[std]{ {ma[0][0]}x + {ma[0][1]}y} &= \\var{mb[0][0]} \\\\
\\simplify[std]{ {ma[1][0]}x + {ma[1][1]}y} &= \\var{mb[1][0]}
\\end{align}
Input all numbers as fractions or integers and not as decimals.
", "advice": "The equations can be written in the matrix form
\n\\[ \\var{ma}\\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\var{mb} \\]
\n$\\mathrm{det}(\\mathbf{A}) = \\simplify[]{ {ma[0][0]}*{ma[1][1]} - {ma[0][1]}*{ma[1][0]}} = \\var{det(ma)} \\neq 0$, so $\\mathbf{A}$ is invertible.
\n\\[ \\mathbf{A}^{-1} = \\simplify[fractionnumbers]{{ma_inverse}} \\]
\nWe have
\n\\begin{align}
\\mathbf{A}^{-1}\\mathbf{b} &= \\simplify[fractionnumbers]{{ma_inverse}*{mb}} \\\\
&= \\simplify[fractionnumbers]{{ma_inverse*mb}}
\\end{align}
Rearrange the equation $\\mathbf{Av}=\\mathbf{b}$ to make $\\mathbf{v}$ the subject:
\n\\begin{align}
\\mathbf{A}^{-1}\\mathbf{A}\\mathbf{v} &= \\mathbf{A}^{-1}\\mathbf{b} \\\\
\\mathbf{v} &= \\mathbf{A}^{-1}\\mathbf{b} \\\\ \\\\
\\end{align}
Hence,
\n\\[ \\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\simplify[fractionnumbers]{{ma_inverse*mb}} \\]
\nThat is,
\n\\begin{align}
x &= \\simplify[fractionnumbers]{{x}}, \\\\ \\\\
y &= \\simplify[fractionnumbers]{{y}}
\\end{align}
Matrix A. a10 is picked so it's non-singular, and a11 is never $\\pm a01$.
\nNo entry is 0.
", "templateType": "anything", "can_override": false}, "a10": {"name": "a10", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,a00,-a00,a00*a11/a01])", "description": "", "templateType": "anything", "can_override": false}, "ma_inverse": {"name": "ma_inverse", "group": "Ungrouped variables", "definition": "matrix([\n [ma[1][1], -ma[0][1]],\n [-ma[1][0], ma[0][0]]\n])/det(ma)", "description": "", "templateType": "anything", "can_override": false}, "a01": {"name": "a01", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "(ma_inverse*mb)[1][0]", "description": "", "templateType": "anything", "can_override": false}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,a01,-a01])", "description": "", "templateType": "anything", "can_override": false}, "a00": {"name": "a00", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ma", "a00", "a01", "a10", "a11", "mb", "ma_inverse", "x", "y"], "variable_groups": [], "functions": {}, "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": "$\\mathbf{A} = $ [[0]]
\n[[1]] | \n
[[2]] | \n
$\\mathbf{b} = $ [[3]]
Find the inverse of $\\mathbf{A}$.
\n$\\mathbf{A}^{-1} = $ [[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": "ma_inverse", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "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": "Now find $\\mathbf{A}^{-1}\\mathbf{b}$.
\n$\\mathbf{A}^{-1}\\mathbf{b} = $ [[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": "ma_inverse*mb", "correctAnswerFractions": true, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "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": "Finally, solve the equations.
\n$x = $ [[0]]
\n$y = $ [[1]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "x", "maxValue": "x", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "y", "maxValue": "y", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}], "name": "", "pickQuestions": 0}], "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "Questions on matrix arithmetic.
"}, "type": "exam", "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "browse": true, "showresultspage": "oncompletion", "preventleave": true, "allowregen": true, "showfrontpage": true}, "timing": {"timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}, "allowPause": true}, "pickQuestions": 0, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}