// Numbas version: exam_results_page_options {"name": "Simon's copy of Inner product of two vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "preamble": {"js": "", "css": ""}, "variables": {"s3": {"templateType": "anything", "name": "s3", "description": "", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "s4": {"templateType": "anything", "name": "s4", "description": "", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "c": {"templateType": "anything", "name": "c", "description": "", "group": "Ungrouped variables", "definition": "s3*random(2..9)"}, "g": {"templateType": "anything", "name": "g", "description": "", "group": "Ungrouped variables", "definition": "s1*random(2..9)"}, "s5": {"templateType": "anything", "name": "s5", "description": "", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "b": {"templateType": "anything", "name": "b", "description": "", "group": "Ungrouped variables", "definition": "s2*random(2..9)"}, "inner": {"templateType": "anything", "name": "inner", "description": "", "group": "Ungrouped variables", "definition": "{a*c+b*d+f*g}"}, "s1": {"templateType": "anything", "name": "s1", "description": "", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "f": {"templateType": "anything", "name": "f", "description": "", "group": "Ungrouped variables", "definition": "random(2..9)"}, "a": {"templateType": "anything", "name": "a", "description": "", "group": "Ungrouped variables", "definition": "s1*random(2..9)"}, "s2": {"templateType": "anything", "name": "s2", "description": "", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "d": {"templateType": "anything", "name": "d", "description": "", "group": "Ungrouped variables", "definition": "s4*random(2..9)"}}, "name": "Simon's copy of Inner product of two vectors", "metadata": {"description": "

Given vectors $\\boldsymbol{v}$ and $\\boldsymbol{w}$, find their inner product.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "unitTests": [], "gaps": [{"showFeedbackIcon": true, "scripts": {}, "maxValue": "{inner}", "variableReplacementStrategy": "originalfirst", "minValue": "{inner}", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswerFraction": false, "mustBeReduced": false, "mustBeReducedPC": 0, "allowFractions": false, "correctAnswerStyle": "plain", "notationStyles": ["plain", "en", "si-en"], "variableReplacements": [], "marks": 2, "type": "numberentry", "customMarkingAlgorithm": ""}], "variableReplacements": [], "prompt": "

Find $\\boldsymbol{v \\cdot w} = $ [[0]]

", "marks": 0, "showCorrectAnswer": true, "sortAnswers": false, "customMarkingAlgorithm": ""}], "statement": "

You are given the vectors $\\boldsymbol{v}= \\var{vector(a,b,g)}$ and $\\boldsymbol{w} = \\var{vector(c,d,f)}$ in $\\mathbb{R}^3$.

", "variable_groups": [], "extensions": [], "advice": "

The dot product of two vectors $\\boldsymbol{a}=\\pmatrix{a_1,a_2,a_3}$ and $\\boldsymbol{b}=\\pmatrix{b_1,b_2,b_3}$ is given by

\n

\\[\\boldsymbol{a\\cdot b}=a_1b_1+a_2b_2+a_3b_3\\]

\n

\n

For our question:

\n

\\begin{align}
\\boldsymbol{v \\cdot w} &= \\var{vector(a,b,g)} \\boldsymbol{\\cdot} \\var{vector(c,d,f)} \\\\
&= \\simplify[]{{a}*{c}+{b}*{d}+{g}*{f}} \\\\
&= \\var{inner}
\\end{align}

", "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s3", "s2", "s1", "s5", "s4", "inner"], "tags": [], "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}