// Numbas version: exam_results_page_options {"name": "Find determinant of a 3x3 matrix by row reduction", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"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"], "name": "Find determinant of a 3x3 matrix by row reduction", "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": {}, "extensions": [], "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": "

a)

\n

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.

\n

Subtract $\\simplify{{c20}r_2}$ from $r_1$ to get $\\mathrm{M}_1 = \\var{m2}$.

\n

Subtract $\\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}$.

\n

b)

\n

Considering 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$.

\n

Subtract $\\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.

\n

Subtract $\\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.

\n

c)

\n

Using 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}$.

", "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/"}]}]}], "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/"}]}