// Numbas version: finer_feedback_settings {"name": "LV02 Scalar multiplication of vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "LV02 Scalar multiplication of vectors", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "
Work through the following questions exploring how to multiply a vector by a scalar.
\nFor the whole of this question:
\n$\\bf{a} = \\var{a}$ and $\\bf{b}=\\var{b}$.
", "advice": "The vectors in this question have two dimensions but the ideas herein work in any number of dimensions.
\nTo multiply a vector by a scalar (number) you just multiply each element by that scalar:
\n$$
k\\left(\\begin{array}{c}
a \\\\
b \\\\
\\end{array}\\right) =
\\left(\\begin{array}{c}
ak \\\\
bk \\\\
\\end{array}\\right).
$$
So we have:
\n1)
\n$$
\\var{m}\\var{a} = \\var{m*a}.
$$
The second and third part of this question just combine this idea of multiplying a vector by a scalar and the idea that addition and subtraction work by just calculating element by element (as long as all the vectors involved have the same dimensions).
\n2)
\n$$
\\var{p}\\var{a} + \\var{q}\\var{b} =
\\left(\\begin{array}{c}
\\var{p} \\times \\var{a[0]} + \\var{q} \\times \\var{b[0]} \\\\
\\var{p}\\times \\var{a[1]} + \\var{q} \\times \\var{b[1]}\\\\
\\end{array}\\right) = \\var{p*a+q*b}.
$$
3)
\n$$
\\var{r}\\var{a} - \\var{s}\\var{b} =
\\left(\\begin{array}{c}
\\var{r} \\times \\var{a[0]} - \\var{s} \\times \\var{b[0]} \\\\
\\var{s}\\times \\var{a[1]} - \\var{s} \\times \\var{b[1]}\\\\
\\end{array}\\right) = \\var{r*a-s*b}.
$$
Use this link to find some resources which will help you revise this topic.
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "vector(repeat(random(-4..4),2))", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "vector(repeat(random(-4..4),2))", "description": "", "templateType": "anything", "can_override": false}, "answeradd": {"name": "answeradd", "group": "Ungrouped variables", "definition": "p*a+q*b", "description": "", "templateType": "anything", "can_override": false}, "answersub": {"name": "answersub", "group": "Ungrouped variables", "definition": "r*a-s*b", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(-9..9 except [-1,0,1,m])", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(-9..9 except [-1,0,1,p,m])", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(-9..9 except [-1,0,1])", "description": "", "templateType": "anything", "can_override": false}, "answerma": {"name": "answerma", "group": "Ungrouped variables", "definition": "m*a", "description": "", "templateType": "anything", "can_override": false}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "random(2..9 except [p,m,q])", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(2..9 except [p,m,q,r])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "m", "p", "q", "r", "s", "answerma", "answeradd", "answersub"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "matrix", "useCustomName": true, "customName": "1)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Calculate $\\var{m}\\bf{a}$.
", "correctAnswer": "answerma", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}, {"type": "matrix", "useCustomName": true, "customName": "2)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Calculate $\\var{p}\\bf{a}+\\var{q}\\bf{b}$.
", "correctAnswer": "answeradd", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}, {"type": "matrix", "useCustomName": true, "customName": "3)", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Calculate $\\var{r}\\bf{a} - \\var{s}\\bf{b}$.
", "correctAnswer": "answersub", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}], "resources": []}]}], "contributors": [{"name": "Mash Sheffield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4679/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}]}