// Numbas version: finer_feedback_settings {"name": "Matrices 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "variables": {"C": {"templateType": "anything", "description": "", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n3),m3)))", "group": "C", "name": "C"}, "m3": {"templateType": "anything", "description": "", "definition": "random(2..4)", "group": "C", "name": "m3"}, "A": {"templateType": "anything", "description": "", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n1),m1)))", "group": "A", "name": "A"}, "scalar2": {"templateType": "anything", "description": "
scalar
", "definition": "random(-6..9 except 0..1)", "group": "Addition/Scalar", "name": "scalar2"}, "m2": {"templateType": "anything", "description": "", "definition": "3", "group": "B", "name": "m2"}, "D": {"templateType": "anything", "description": "", "definition": "transpose(matrix(repeat(repeat(random(-9..9),2),3)))", "group": "Addition/Scalar", "name": "D"}, "B": {"templateType": "anything", "description": "", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n2),m2)))", "group": "B", "name": "B"}, "m1": {"templateType": "anything", "description": "", "definition": "random(1..2)", "group": "A", "name": "m1"}, "ans1": {"templateType": "anything", "description": "", "definition": "scalar1*C", "group": "Addition/Scalar", "name": "ans1"}, "ans3": {"templateType": "anything", "description": "", "definition": "scalar1*D + scalar3*F", "group": "Addition/Scalar", "name": "ans3"}, "n1": {"templateType": "anything", "description": "", "definition": "random(1..2)", "group": "A", "name": "n1"}, "scalar1": {"templateType": "anything", "description": "", "definition": "random(-6..9 except 0..1)", "group": "Addition/Scalar", "name": "scalar1"}, "n4": {"templateType": "anything", "description": "", "definition": "random(1..(n3-1) except n3)", "group": "C2", "name": "n4"}, "m4": {"templateType": "anything", "description": "", "definition": "random(1..(m3-1) except m3)", "group": "C2", "name": "m4"}, "F": {"templateType": "anything", "description": "", "definition": "transpose(matrix(repeat(repeat(random(-9..9),2),3)))", "group": "Addition/Scalar", "name": "F"}, "n2": {"templateType": "anything", "description": "", "definition": "3", "group": "B", "name": "n2"}, "ans2": {"templateType": "anything", "description": "", "definition": "scalar2*B", "group": "Addition/Scalar", "name": "ans2"}, "scalar3": {"templateType": "anything", "description": "", "definition": "random(-6..9 except 0..1)", "group": "Addition/Scalar", "name": "scalar3"}, "n3": {"templateType": "anything", "description": "", "definition": "random(2..4)", "group": "C", "name": "n3"}}, "extensions": [], "variable_groups": [{"variables": ["A", "n1", "m1"], "name": "A"}, {"variables": ["n2", "m2", "B"], "name": "B"}, {"variables": ["n3", "m3", "C"], "name": "C"}, {"variables": ["n4", "m4"], "name": "C2"}, {"variables": ["scalar1", "scalar2", "scalar3", "ans1", "ans2", "D", "F", "ans3"], "name": "Addition/Scalar"}], "advice": "a) Remember that the dimensions are $\\rm \\color{red}{rows} \\times \\color{blue}{columns}$, so you need to count the number or rwos and columns in the matrix and wrtite them in that order.
\nb) Remember that the elements are in the form $A_{\\rm \\color{red}{ rows},\\color{blue}{columns}}$ where $A$ is the matrix.
\nFor example if we are looking for $a_{12}$ we look at the matrix $A= \\begin{pmatrix} \\var{a11} &\\bf( \\underline{\\var{a12}}) \\\\ \\var{a21} & \\var{a22}\\end{pmatrix}$ we want the the element on $\\rm \\color{red}{row ~ 1}$ and $\\rm \\color{blue}{column ~ 2}$ which in this case is $\\bf \\underline{\\var{a12}}$
\n", "ungrouped_variables": [], "rulesets": {}, "preamble": {"css": "", "js": ""}, "functions": {}, "statement": "Throughout these questions:
\nMatrix $A=\\var{A}$,
\nMatrix $B=\\var{B}$,
\nMatrix $C=\\var{C}$,
\nMatrix $D=\\var{D}$,
\nand Matrix $E=\\var{F}$
", "parts": [{"gaps": [{"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "{n1}", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "{n1}", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "{m1}", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "{m1}", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "{n2}", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "{n2}", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "{m2}", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "{m2}", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "{n3}", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "{n3}", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "{m3}", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "{m3}", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}], "marks": 0, "prompt": "Give the dimensions of the following matrices:
\nMatrix $A$ is a [[0]]$ \\times $[[1]] matrix
\nMatrix $B$ is a [[2]]$ \\times$[[3]] matrix
\nMatrix $C$ is a [[4]]$ \\times$[[5]] matrix
", "scripts": {}, "sortAnswers": false, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "gapfill", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "showFeedbackIcon": true}, {"gaps": [{"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "A[n1-1][m1-1]", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "A[n1-1][m1-1]", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "b[n2-1][m2-1]", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "b[n2-1][m2-1]", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "c[n3-1][m3-1]", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "c[n3-1][m3-1]", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}, {"correctAnswerStyle": "plain", "allowFractions": false, "marks": 1, "minValue": "c[n4-1][m4-1]", "showFeedbackIcon": true, "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "maxValue": "c[n4-1][m4-1]", "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "numberentry", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "mustBeReducedPC": 0, "mustBeReduced": false}], "marks": 0, "prompt": "Give the values of the following elements of the matrices from above:
\n$a_{\\var{n1}\\var{m1}}=$[[0]]
\n$b_{\\var{n2}\\var{m2}}=$[[1]]
\n$c_{\\var{n3}\\var{m3}}=$[[2]]
\n$c_{\\var{n4}\\var{m4}}=$[[3]]
", "scripts": {}, "sortAnswers": false, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "gapfill", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "showFeedbackIcon": true}, {"gaps": [{"markPerCell": false, "allowFractions": false, "marks": 1, "allowResize": true, "correctAnswerFractions": false, "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "numColumns": "3", "extendBaseMarkingAlgorithm": true, "correctAnswer": "D+F", "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "matrix", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "tolerance": 0}, {"markPerCell": false, "allowFractions": false, "marks": 1, "allowResize": true, "correctAnswerFractions": false, "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "numColumns": "3", "extendBaseMarkingAlgorithm": true, "correctAnswer": "D-F", "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "matrix", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "tolerance": 0}, {"markPerCell": false, "allowFractions": false, "marks": 1, "allowResize": true, "correctAnswerFractions": false, "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "numColumns": "3", "extendBaseMarkingAlgorithm": true, "correctAnswer": "scalar1*C", "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "matrix", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "tolerance": 0}, {"markPerCell": false, "allowFractions": false, "marks": 1, "allowResize": true, "correctAnswerFractions": false, "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "numColumns": "3", "extendBaseMarkingAlgorithm": true, "correctAnswer": "scalar2*B", "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "matrix", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "tolerance": 0}, {"markPerCell": false, "allowFractions": false, "marks": 1, "allowResize": true, "correctAnswerFractions": false, "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "numColumns": "3", "extendBaseMarkingAlgorithm": true, "correctAnswer": "scalar1*D+scalar3*F", "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "matrix", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "tolerance": 0}], "marks": 0, "prompt": "In these questions, you need to change the size of the matrix where necessary
\n$D + E =$ [[0]]
\n$D - E =$ [[1]]
\n$\\var{scalar1}C =$ [[2]]
\n$\\var{scalar2}B =$ [[3]]
\n$\\var{scalar1}D + \\var{scalar3}E =$ [[4]]
\n", "scripts": {}, "sortAnswers": false, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "gapfill", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "showFeedbackIcon": true}, {"extendBaseMarkingAlgorithm": true, "marks": 1, "prompt": "Why can't we add Matrix $A$ to Matrix $D$ for example?
", "showFeedbackIcon": true, "scripts": {}, "displayAnswer": "The dimensions of the matricies have to be the same", "unitTests": [], "variableReplacementStrategy": "originalfirst", "type": "patternmatch", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "matchMode": "regex", "answer": "the dimensions are different|the dimensions have to be the same|the dimensions are not the same|the dimensions of the matrices are not the same|the dimensions of the matrices are different|the dimensions of the matrices have to be the same|they are different sizes|they are not the same size", "variableReplacements": []}], "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Matrices 1", "type": "question", "contributors": [{"name": "Mark Hodds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/510/"}, {"name": "Kevin Bohan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3363/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}]}], "contributors": [{"name": "Mark Hodds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/510/"}, {"name": "Kevin Bohan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3363/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}