// Numbas version: finer_feedback_settings {"name": "Vectors: dot/scalar products", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Vectors: dot/scalar products", "tags": [], "metadata": {"description": "

Calculate the dot products of (a) two 2D vectors and (b) two 3D vectors.

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

Find the dot product (also called the scalar product) below.

", "advice": "

To calculate the dot product, multiply the corresponding elements of the vectors. Hence for a 3D vector, the process is as follows:

\n

$$ \\begin{bmatrix} a_1 \\\\ a_2 \\\\ a_3 \\end{bmatrix} . \\begin{bmatrix} b_1 \\\\ b_2 \\\\ b_3 \\end{bmatrix} = a_1b_1+a_2b_2+a_3b_3 .$$

\n

The answers to the questions above should be therefore calculated as follows.

\n

Part A
$\\var{A}\\cdot\\var{B}=(\\var{a1}\\times\\var{B1})+(\\var{A2}\\times\\var{B2})=\\var{a1*b1+a2*b2}$

\n

Part B
$\\var{C}\\cdot\\var{D}=(\\var{c1}\\times\\var{d1})+(\\var{c2}\\times\\var{d2})+(\\var{c3}\\times\\var{d3})=\\var{c1*d1+c2*d2+c3*d3}$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a1": {"name": "a1", "group": "2D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "2D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "2D vectors", "definition": "vector(a1,a2)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "2D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "2D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "2D vectors", "definition": "vector(b1,b2)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "3D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "3D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "c3": {"name": "c3", "group": "3D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "3D vectors", "definition": "vector(c1,c2,c3)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "3D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "3D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "d3": {"name": "d3", "group": "3D vectors", "definition": "random(2..9)", "description": "", "templateType": "anything", "can_override": false}, "D": {"name": "D", "group": "3D vectors", "definition": "vector(d1,d2,d3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "2D vectors", "variables": ["a2", "a1", "A", "b1", "b2", "B"]}, {"name": "3D vectors", "variables": ["c1", "c2", "c3", "C", "d1", "d2", "d3", "D"]}], "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": "

$\\var{A}\\cdot\\var{B}=$[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "a1*b1+a2*b2", "maxValue": "a1*b1+a2*b2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "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{C}\\cdot\\var{D}=$[[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "c1*d1+c2*d2+c3*d3", "maxValue": "c1*d1+c2*d2+c3*d3", "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": "Will Roberts", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/32402/"}], "resources": []}]}], "contributors": [{"name": "Will Roberts", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/32402/"}]}