// Numbas version: finer_feedback_settings {"name": "John's copy of 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": [{"variablesTest": {"condition": "deter<>0\nand\nmax(map(testing(record[0][x]),x,0..length(record[0])-1))=0", "maxRuns": "200"}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "notes": "
Rank can be 2,3 or 4
", "description": "Reduce a 5x6 matrix to row reduced form and using this find rank and nullity.
"}, "advice": "a) The following shows how $A$ is reduced to row-echelon form.
\n\n{solution(record_ops_matrix,record_ops_message)}
\nb)
\nThe rank of A is the number of columns of R with pivots, i.e. $\\var{rank}$.
\nThe nullity of A is the number of columns of R without pivots, i.e. $5-\\var{rank}=\\var{5-rank}$.
\nRemember 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}$.
\nAlso the dimensions of the row space and the column space are both equal to the rank.
\nFinally, the dimension of the null space is the nullity.
\n", "ungrouped_variables": ["echelonform", "ech", "echform", "testmatrix", "record", "rref1", "record_ops_matrix", "record_ops_message", "rank", "maxint", "steps", "rdmat", "deter", "nullity", "echmatrix", "trtestmatrix", "rows", "columns", "column_basis", "sum", "null_basis", "ec", "chosen", "student_cols_matrix", "not_chosen_col"], "parts": [{"variableReplacements": [], "prompt": "\n$R= $[[0]]
\nAll entries in the matrix must be input as fractions or integers and not as decimals.
\n\n", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "marks": 0, "gaps": [{"variableReplacements": [], "allowFractions": true, "showCorrectAnswer": true, "numRows": "6", "allowResize": true, "marks": "4", "type": "matrix", "numColumns": "5", "variableReplacementStrategy": "originalfirst", "markPerCell": false, "correctAnswerFractions": true, "scripts": {}, "tolerance": 0, "correctAnswer": "{echmatrix}"}]}, {"variableReplacements": [], "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", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "scripts": {}, "marks": 0, "gaps": [{"variableReplacements": [], "allowFractions": false, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "minValue": "rank", "scripts": {}, "type": "numberentry", "maxValue": "rank", "correctAnswerFraction": false, "marks": "0.2", "showPrecisionHint": false}, {"variableReplacements": [], "allowFractions": false, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "minValue": "nullity", "scripts": {}, "type": "numberentry", "maxValue": "nullity", "correctAnswerFraction": false, "marks": "0.2", "showPrecisionHint": false}, {"variableReplacements": [], "allowFractions": false, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "minValue": "rank", "scripts": {}, "type": "numberentry", "maxValue": "rank", "correctAnswerFraction": false, "marks": "0.2", "showPrecisionHint": false}, {"variableReplacements": [], "allowFractions": false, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "minValue": "rank", "scripts": {}, "type": "numberentry", "maxValue": "rank", "correctAnswerFraction": false, "marks": "0.2", "showPrecisionHint": false}, {"variableReplacements": [], "allowFractions": false, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "minValue": "nullity", "scripts": {}, "type": "numberentry", "maxValue": "nullity", "correctAnswerFraction": false, "marks": "0.2", "showPrecisionHint": false}]}], "preamble": {"js": "question.functions={};\nquestion.functions.ref=function(m){\n \n m = util.copyarray(m,true);\n \n function finish() {\n\n return rank;\n }\n\n\n\n var lead = 0;\n var rank = 0;\n var echelon=[];\n var rows = m.length;\n for(var i=0;i$A=\\var{testmatrix}$
\n\n", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "John Steele", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2218/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "John Steele", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2218/"}]}