// Numbas version: finer_feedback_settings {"name": "Vectors - Introductory exercise (WB Q1.1 randomised)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Vectors - Introductory exercise (WB Q1.1 randomised)", "tags": [], "metadata": {"description": "

Simple vector addition and scalar multiplication in \\(\\mathbb{R}^2\\).

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

Calculate the following:

", "advice": "

We add vectors entry by entry, and we multiply a vector by a scalar by multiplying each entry.

\n

Part a) Zero times any vector is the zero vector: \\(0\\cdot \\begin{pmatrix}x_1\\\\x_2\\end{pmatrix}=\\begin{pmatrix}0\\\\0\\end{pmatrix}\\).

\n

Part b) \\[\\var{v1}+\\var{v2}=\\begin{pmatrix}\\simplify[]{{v1[0]}+{v2[0]}} \\\\ \\simplify[]{{v1[1]}+{v2[1]}}  \\end{pmatrix} = \\var{v1+v2}\\]

\n

Part c) \\[\\var{mu1}\\begin{pmatrix}\\sqrt{\\var{n}}\\\\\\var{w1[1]}\\end{pmatrix}+\\var{mu2}\\begin{pmatrix}-\\frac{\\sqrt{\\var{n}}}{\\var{b}}\\\\\\var{w2[1]}\\end{pmatrix}=\\begin{pmatrix}\\var{mu1}\\sqrt{\\var{n}}-\\var{mu2}\\frac{\\sqrt{\\var{n}}}{\\var{b}}\\\\\\var{mu1}\\var{w1[1]}+\\var{mu2}\\var{w2[1]}\\end{pmatrix} = \\var{mu1*w1+mu2*w2}\\]

", "rulesets": {}, "extensions": [], "variables": {"v1": {"name": "v1", "group": "Ungrouped variables", "definition": "vector((repeat(random(1..5),2)))", "description": "", "templateType": "anything"}, "v2": {"name": "v2", "group": "Ungrouped variables", "definition": "vector((repeat(random(1..5),2)))", "description": "", "templateType": "anything"}, "w1": {"name": "w1", "group": "Ungrouped variables", "definition": "vector(sqrt(n),pi)", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..5 except 4)", "description": "", "templateType": "anything"}, "w2": {"name": "w2", "group": "Ungrouped variables", "definition": "vector(-w1[0]/b,pi)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..3)", "description": "", "templateType": "anything"}, "mu1": {"name": "mu1", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "mu2": {"name": "mu2", "group": "Ungrouped variables", "definition": "b*mu1", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "v1<>v2", "maxRuns": 100}, "ungrouped_variables": ["v1", "v2", "w1", "w2", "n", "b", "mu1", "mu2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"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\n\n\n\n\n\n\n\n\n\n
\\(0\\cdot \\begin{pmatrix}x_1\\\\x_2\\end{pmatrix}= \\left( \\begin{matrix}\\phantom{.}\\\\\\phantom{.}\\\\\\phantom{.}\\end{matrix}\\right.\\)[[0]]\\(\\left.\\begin{matrix}\\phantom{.}\\\\\\phantom{.}\\\\\\phantom{.}\\end{matrix}\\right)\\)
[[1]]
\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "0", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "0", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}], "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": "

\\(\\var{v1}+\\var{v2}=\\) [[0]].

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "v1+v2", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "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": "

Enter \\(\\pi\\) as pi.

\n\n\n\n\n\n\n\n\n\n\n\n
\\(\\var{mu1}\\begin{pmatrix}\\sqrt{\\var{n}}\\\\\\var{w1[1]}\\end{pmatrix}+\\var{mu2}\\begin{pmatrix}-\\frac{\\sqrt{\\var{n}}}{\\var{b}}\\\\\\var{w2[1]}\\end{pmatrix}= \\left( \\begin{matrix}\\phantom{.}\\\\\\phantom{.}\\\\\\phantom{.}\\end{matrix}\\right.\\)[[0]]\\(\\left.\\begin{matrix}\\phantom{.}\\\\\\phantom{.}\\\\\\phantom{.}\\end{matrix}\\right)\\)
[[1]]
\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "0", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{(mu1+mu2)}*pi", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}]}], "contributors": [{"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}]}