// 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": [], "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", "name": "Matrices 1", "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "extensions": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"js": "", "css": ""}, "ungrouped_variables": [], "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}$
", "variables": {"scalar1": {"templateType": "anything", "group": "Addition/Scalar", "name": "scalar1", "definition": "random(-6..9 except 0..1)", "description": ""}, "C": {"templateType": "anything", "group": "C", "name": "C", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n3),m3)))", "description": ""}, "scalar2": {"templateType": "anything", "group": "Addition/Scalar", "name": "scalar2", "definition": "random(-6..9 except 0..1)", "description": "scalar
"}, "F": {"templateType": "anything", "group": "Addition/Scalar", "name": "F", "definition": "transpose(matrix(repeat(repeat(random(-9..9),2),3)))", "description": ""}, "m2": {"templateType": "anything", "group": "B", "name": "m2", "definition": "3", "description": ""}, "ans3": {"templateType": "anything", "group": "Addition/Scalar", "name": "ans3", "definition": "scalar1*D + scalar3*F", "description": ""}, "m4": {"templateType": "anything", "group": "C2", "name": "m4", "definition": "random(1..(m3-1) except m3)", "description": ""}, "A": {"templateType": "anything", "group": "A", "name": "A", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n1),m1)))", "description": ""}, "n2": {"templateType": "anything", "group": "B", "name": "n2", "definition": "3", "description": ""}, "D": {"templateType": "anything", "group": "Addition/Scalar", "name": "D", "definition": "transpose(matrix(repeat(repeat(random(-9..9),2),3)))", "description": ""}, "ans1": {"templateType": "anything", "group": "Addition/Scalar", "name": "ans1", "definition": "scalar1*C", "description": ""}, "m3": {"templateType": "anything", "group": "C", "name": "m3", "definition": "random(2..4)", "description": ""}, "n1": {"templateType": "anything", "group": "A", "name": "n1", "definition": "random(1..2)", "description": ""}, "B": {"templateType": "anything", "group": "B", "name": "B", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n2),m2)))", "description": ""}, "n3": {"templateType": "anything", "group": "C", "name": "n3", "definition": "random(2..4)", "description": ""}, "scalar3": {"templateType": "anything", "group": "Addition/Scalar", "name": "scalar3", "definition": "random(-6..9 except 0..1)", "description": ""}, "n4": {"templateType": "anything", "group": "C2", "name": "n4", "definition": "random(1..(n3-1) except n3)", "description": ""}, "ans2": {"templateType": "anything", "group": "Addition/Scalar", "name": "ans2", "definition": "scalar2*B", "description": ""}, "m1": {"templateType": "anything", "group": "A", "name": "m1", "definition": "random(1..2)", "description": ""}}, "parts": [{"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "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
", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "gaps": [{"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "{n1}", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "{n1}", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}, {"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "{m1}", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "{m1}", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}, {"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "{n2}", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "{n2}", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}, {"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "{m2}", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "{m2}", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}, {"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "{n3}", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "{n3}", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}, {"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "{m3}", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "{m3}", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}], "extendBaseMarkingAlgorithm": true, "sortAnswers": false}, {"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "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]]
", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "gaps": [{"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "A[n1-1][m1-1]", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "A[n1-1][m1-1]", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}, {"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "b[n2-1][m2-1]", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "b[n2-1][m2-1]", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}, {"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "c[n3-1][m3-1]", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "c[n3-1][m3-1]", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}, {"correctAnswerStyle": "plain", "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "unitTests": [], "maxValue": "c[n4-1][m4-1]", "mustBeReduced": false, "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "minValue": "c[n4-1][m4-1]", "type": "numberentry", "marks": 1, "mustBeReducedPC": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}], "extendBaseMarkingAlgorithm": true, "sortAnswers": false}, {"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "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", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "customMarkingAlgorithm": "", "gaps": [{"showCorrectAnswer": true, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "variableReplacements": [], "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "markPerCell": false, "allowResize": true, "type": "matrix", "marks": 1, "customMarkingAlgorithm": "", "numColumns": "3", "correctAnswer": "D+F", "correctAnswerFractions": false}, {"showCorrectAnswer": true, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "variableReplacements": [], "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "markPerCell": false, "allowResize": true, "type": "matrix", "marks": 1, "customMarkingAlgorithm": "", "numColumns": "3", "correctAnswer": "D-F", "correctAnswerFractions": false}, {"showCorrectAnswer": true, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "variableReplacements": [], "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "markPerCell": false, "allowResize": true, "type": "matrix", "marks": 1, "customMarkingAlgorithm": "", "numColumns": "3", "correctAnswer": "scalar1*C", "correctAnswerFractions": false}, {"showCorrectAnswer": true, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "variableReplacements": [], "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "markPerCell": false, "allowResize": true, "type": "matrix", "marks": 1, "customMarkingAlgorithm": "", "numColumns": "3", "correctAnswer": "scalar2*B", "correctAnswerFractions": false}, {"showCorrectAnswer": true, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "variableReplacements": [], "numRows": "3", "showFeedbackIcon": true, "scripts": {}, "markPerCell": false, "allowResize": true, "type": "matrix", "marks": 1, "customMarkingAlgorithm": "", "numColumns": "3", "correctAnswer": "scalar1*D+scalar3*F", "correctAnswerFractions": false}], "extendBaseMarkingAlgorithm": true, "sortAnswers": false}, {"showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "displayAnswer": "The dimensions of the matricies have to be the same", "prompt": "Why can't we add Matrix $A$ to Matrix $D$ for example?
", "matchMode": "regex", "variableReplacements": [], "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", "showFeedbackIcon": true, "scripts": {}, "type": "patternmatch", "marks": 1, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true}], "functions": {}, "variable_groups": [{"name": "A", "variables": ["A", "n1", "m1"]}, {"name": "B", "variables": ["n2", "m2", "B"]}, {"name": "C", "variables": ["n3", "m3", "C"]}, {"name": "C2", "variables": ["n4", "m4"]}, {"name": "Addition/Scalar", "variables": ["scalar1", "scalar2", "scalar3", "ans1", "ans2", "D", "F", "ans3"]}], "rulesets": {}, "type": "question", "contributors": [{"name": "Mark Hodds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/510/"}]}]}], "contributors": [{"name": "Mark Hodds", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/510/"}]}