// Numbas version: exam_results_page_options {"name": "Row reducing a matrix and finding its rank and nullity-MA2223", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Row reducing a matrix and finding its rank and nullity-MA2223", "tags": ["bases", "basis", "column space", "dimension", "echelon form", "linear algebra", "linear independence", "linearly dependent", "matrices", "matrix type", "null space", "nullity", "rank", "row operations", "row reduced", "row space", "row-reduced"], "metadata": {"description": "

Reduce a 5x6 matrix to row reduced form and using this find rank and nullity.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Find the row-reduced echelon form $R$ of the following matrix $A$.

\n

$A=\\var{testmatrix}$

\n

\n

", "advice": "

a) The following shows how $A$ is reduced to row-echelon form.

\n

\n

{solution(record_ops_matrix,record_ops_message)}

\n

b) 

\n

The rank of A is the number of columns of R with pivots, i.e. $\\var{rank}$.

\n

The nullity of A is the number of columns of R without pivots, i.e. $5-\\var{rank}=\\var{5-rank}$.

\n

Remember that the Rank-Nullity Theorem says that the number of columns of A equals the rank of A plus the nullity of A, i.e. $5=\\var{rank}+\\var{nullity}$.

\n

Also the dimensions of the row space and the column space are both equal to the rank.

\n

Finally, the dimension of the null space is the nullity.

\n

", "rulesets": {}, "extensions": ["stats"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"column_basis": {"name": "column_basis", "group": "Ungrouped variables", "definition": "set(map(trtestmatrix[x],x,echelonform[1]))", "description": "", "templateType": "anything", "can_override": false}, "maxint": {"name": "maxint", "group": "Ungrouped variables", "definition": "4", "description": "", "templateType": "anything", "can_override": false}, "echmatrix": {"name": "echmatrix", "group": "Ungrouped variables", "definition": "matrix(ech)", "description": "", "templateType": "anything", "can_override": false}, "deter": {"name": "deter", "group": "Ungrouped variables", "definition": "rref(rdmat,0)[3]", "description": "", "templateType": "anything", "can_override": false}, "record": {"name": "record", "group": "Ungrouped variables", "definition": "rref(list(testmatrix),0)", "description": "", "templateType": "anything", "can_override": false}, "echelonform": {"name": "echelonform", "group": "Ungrouped variables", "definition": "echelon_form_matrix(rows,rank,columns,maxint)", "description": "", "templateType": "anything", "can_override": false}, "nullity": {"name": "nullity", "group": "Ungrouped variables", "definition": "5-rank", "description": "", "templateType": "anything", "can_override": false}, "ech": {"name": "ech", "group": "Ungrouped variables", "definition": "echelonform[0]", "description": "", "templateType": "anything", "can_override": false}, "null_basis": {"name": "null_basis", "group": "Ungrouped variables", "definition": "switch(sum=6,[[ec[0][2]*ec[2][3]-ec[0][3],ec[1][2]*ec[2][3]-ec[1][3],-ec[2][3],1,0],\n [ec[0][2]*ec[2][4]-ec[0][4],ec[1][2]*ec[2][4]-ec[1][4],-ec[2][4],0,1]],\n sum=7,[[-ec[0][2],-ec[1][2],1,0,0],[-ec[0][4],-ec[1][4],0,-ec[2][4],1]],\n (sum=8) and(5 in echform),[[-ec[0][2],-ec[1][2],1,0,0],[-ec[0][3],-ec[1][3],0,1,0]],\n sum=8,[[-ec[0][1],1,0,0,0],[-ec[0][4],0,-ec[1][4],-ec[2][4],1]],\n sum=9,[[-ec[0][1],1,0,0,0],[-ec[0][3],0,-ec[1][3],1,0]],\n [[-ec[0][1],1,0,0,0],[-ec[0][2],0,1,0,0]])", "description": "", "templateType": "anything", "can_override": false}, "trtestmatrix": {"name": "trtestmatrix", "group": "Ungrouped variables", "definition": "transpose(testmatrix)", "description": "", "templateType": "anything", "can_override": false}, "columns": {"name": "columns", "group": "Ungrouped variables", "definition": "5", "description": "", "templateType": "anything", "can_override": false}, "testmatrix": {"name": "testmatrix", "group": "Ungrouped variables", "definition": "matrix(rdmat)*matrix(ech)", "description": "", "templateType": "anything", "can_override": false}, "sum": {"name": "sum", "group": "Ungrouped variables", "definition": "sum(echform)", "description": "", "templateType": "anything", "can_override": false}, "record_ops_matrix": {"name": "record_ops_matrix", "group": "Ungrouped variables", "definition": "record[0]", "description": "", "templateType": "anything", "can_override": false}, "rows": {"name": "rows", "group": "Ungrouped variables", "definition": "6", "description": "", "templateType": "anything", "can_override": false}, "rank": {"name": "rank", "group": "Ungrouped variables", "definition": "random(2,3,4)\n", "description": "", "templateType": "anything", "can_override": false}, "rref1": {"name": "rref1", "group": "Ungrouped variables", "definition": "rref1(list(testmatrix))[0]", "description": "", "templateType": "anything", "can_override": false}, "chosen": {"name": "chosen", "group": "Ungrouped variables", "definition": "[true,true,false,true,false]", "description": "", "templateType": "anything", "can_override": false}, "numsteps": {"name": "numsteps", "group": "Ungrouped variables", "definition": "rref(list(testmatrix),0)[2]", "description": "", "templateType": "anything", "can_override": false}, "rdmat": {"name": "rdmat", "group": "Ungrouped variables", "definition": "rdmat(rows)", "description": "", "templateType": "anything", "can_override": false}, "echform": {"name": "echform", "group": "Ungrouped variables", "definition": "map(x+1,x,echelonform[1])", "description": "", "templateType": "anything", "can_override": false}, "student_cols_matrix": {"name": "student_cols_matrix", "group": "Ungrouped variables", "definition": "transpose(matrix(map(transpose(echmatrix)[n],n,filter(chosen[j],j,0..4))))", "description": "", "templateType": "anything", "can_override": false}, "record_ops_message": {"name": "record_ops_message", "group": "Ungrouped variables", "definition": "record[1]", "description": "", "templateType": "anything", "can_override": false}, "not_chosen_col": {"name": "not_chosen_col", "group": "Ungrouped variables", "definition": "transpose(matrix(map(transpose(echmatrix)[n],n,filter(!chosen[j],j,0..4)))[0])", "description": "", "templateType": "anything", "can_override": false}, "ec": {"name": "ec", "group": "Ungrouped variables", "definition": "echmatrix", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "deter<>0\nand\nmax(map(testing(record[0][x]),x,0..length(record[0])-1))=0", "maxRuns": "200"}, "ungrouped_variables": ["echelonform", "ech", "echform", "testmatrix", "record", "rref1", "record_ops_matrix", "record_ops_message", "rank", "maxint", "numsteps", "rdmat", "deter", "nullity", "echmatrix", "trtestmatrix", "rows", "columns", "column_basis", "sum", "null_basis", "ec", "chosen", "student_cols_matrix", "not_chosen_col"], "variable_groups": [], "functions": {"solution": {"parameters": [["matrix_list", "list"], ["message_list", "list"]], "type": "html", "language": "javascript", "definition": "function st(o){\n return '['+o.toString()+']';\n}\nfunction display_format(mat){\nvar s= st(mat.map(st));\n return '$\\\\simplify[fractionNumbers]{{matrix('+s+')}}$';\n}\nvar table = $('');\nvar n=matrix_list.length;\nvar m='';\nvar mess='';\nfor(var i=0;i');\ntable.append('');\ntable.append(''); \n}\nreturn table;\n"}, "rref1": {"parameters": [["m", "list"]], "type": "list", "language": "javascript", "definition": "function finish() {\n for(var i=0;i=ind?temp.push(getRandomInt(1,max)):temp.push(0);\n }\n for(var k=0;k

\n

$R= $[[0]]

\n

All entries in the matrix must be input as fractions or integers and not as decimals.

\n

\n

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "{echmatrix}", "correctAnswerFractions": true, "numRows": "6", "numColumns": "5", "allowResize": true, "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": "

\n

$\\operatorname{Rank}(A)=$[[0]]

\n

$\\operatorname{Nullity}(A)=$[[1]]

\n

$\\operatorname{dim}(\\operatorname{col}(A))=$[[2]]

\n

$\\operatorname{dim}(\\operatorname{row}(A))=$[[3]]

\n

$\\operatorname{dim}(\\operatorname{null}(A))=$[[4]]

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "rank", "maxValue": "rank", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "nullity", "maxValue": "nullity", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "rank", "maxValue": "rank", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "rank", "maxValue": "rank", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "nullity", "maxValue": "nullity", "correctAnswerFraction": false, "allowFractions": false, "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", "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/"}]}
'+mess+'
'+m+'