// Numbas version: finer_feedback_settings {"name": "LV05 Scalar product of 3D vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "LV05 Scalar product of 3D vectors", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "
It is given $\\bf{a} = \\var{a}$ and $\\bf{b} = \\var{b}$.
\nFind the scalar (or dot) product of $\\bf{a}$ and $\\bf{b}$.
", "advice": "It is important to note that for vectors there is more than one type of multiplication. This question is specifically about the scalar (or dot) product.
\nFor the vectors $ \\mathbf v = \\pmatrix{v_1 \\\\ v_2 \\\\ v_3},\\, \\mathbf w = \\pmatrix{w_1 \\\\ w_2 \\\\ w_3},$ the scalar (or dot) product is defined as
\n$$
\\mathbf{v \\cdot w} = v_1 \\times w_1 + v_2 \\times w_2 + v_3 \\times w_3.
$$
So for this question:
\n$$
\\bf{a} = \\var{a} \\qquad \\text{and} \\qquad \\bf{b} = \\var{b}\\\\
\\bf{a} \\cdot \\bf{b} = \\var{a[0]}\\times\\var{b[0]} + \\var{a[1]}\\times\\var{b[1]} + \\var{a[2]}\\times\\var{b[2]} = \\var{adotb}.
$$
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(-9..9 except 0),3))", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "vector(repeat(random(-9..9 except 0),3))", "description": "", "templateType": "anything", "can_override": false}, "adotb": {"name": "adotb", "group": "Ungrouped variables", "definition": "dot(a,b)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "adotb"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Scalar product", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$\\bf{a} \\cdot \\bf{b} =$ [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "scalar product", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "adotb", "maxValue": "adotb", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "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/"}]}