// Numbas version: finer_feedback_settings {"percentPass": 0, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "Vectors 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}], "ungrouped_variables": ["t", "u", "a", "b", "c", "d", "fa", "fb", "g", "sa", "sb", "ta", "tb"], "variable_groups": [{"name": "Initial vectors", "variables": ["s1", "s2", "s3", "s4", "units", "direction_v", "direction_w", "v", "w"]}, {"name": "Result", "variables": ["angle", "precision"]}], "advice": "
Use the formula, $\\boldsymbol{v \\cdot w} = \\lVert \\boldsymbol{v} \\rVert \\lVert \\boldsymbol{w} \\rVert \\cos(\\theta)$m where $\\theta$ is the angle between the vectors.
\nHere
\n\\begin{align}
\\lVert \\boldsymbol{v} \\rVert &= \\simplify[]{sqrt({s1}^2 + {s2}^2)} \\\\
&= \\sqrt{2}, \\\\[1em]
\\lVert \\boldsymbol{w} \\rVert &= \\simplify[]{sqrt({s3}^2 + {s4}^2)} \\\\
&= \\sqrt{2}, \\\\[1em]
\\boldsymbol{v \\cdot w} &= \\var{v} \\boldsymbol{\\cdot} \\var{w} \\\\
&= \\var{dot(v,w)}
\\end{align}
So
\n\\begin{align}
\\cos(\\theta) &= \\frac{\\var{dot(v,w)}}{\\sqrt{2}\\sqrt{2}} = \\simplify[std]{{dot(v,w)}/2} \\\\
\\implies \\theta &= \\arccos\\left(\\simplify[std]{{dot(v,w)}/{2}}\\right) \\\\
&= \\var{precround(angle,precision)} \\text{ radians}
\\end{align}
Given vectors $\\boldsymbol{v,\\;w}$, find the angle between them.
", "notes": "15/7/2015
\nAdded tags
\n\n
16/07/2012:
Added tags.
\nQuestion appears to be working correctly.
Moved the \\rightarrow to the correct place in the solution.
\n
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "
You are given the vectors $\\boldsymbol{v} = \\var{v}$, $\\boldsymbol{w} = \\var{w}$ in $\\mathbb{R}^3$.
", "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "prompt": "Find the angle between $\\boldsymbol{v}$ and $\\boldsymbol{w}$, in radians.
\nNote the angle must be in the range $0$ to $\\pi$.
\nGive your answer to {precision} decimal places.
\nAngle in radians = [[0]]
", "gaps": [{"showPrecisionHint": false, "precisionPartialCredit": 0, "showCorrectAnswer": true, "precisionType": "dp", "type": "numberentry", "strictPrecision": true, "precision": "precision", "variableReplacementStrategy": "originalfirst", "scripts": {}, "minValue": "{angle}", "maxValue": "{angle}", "allowFractions": false, "correctAnswerFraction": false, "variableReplacements": [], "marks": 1, "precisionMessage": "You have not given your answer to the correct precision."}], "type": "gapfill", "variableReplacements": [], "marks": 0, "variableReplacementStrategy": "originalfirst"}], "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "variables": {"fb": {"name": "fb", "description": "", "definition": "if(u=1,0,s3)", "templateType": "anything", "group": "Ungrouped variables"}, "direction_v": {"name": "direction_v", "description": "", "definition": "map(units[j],j,shuffle(0..2))", "templateType": "anything", "group": "Initial vectors"}, "g": {"name": "g", "description": "", "definition": "{fa*fb+sa*sb+ta*tb}", "templateType": "anything", "group": "Ungrouped variables"}, "units": {"name": "units", "description": "", "definition": "map(vector(x),x,list(id(3)))", "templateType": "anything", "group": "Initial vectors"}, "direction_w": {"name": "direction_w", "description": "", "definition": "map(units[j],j,shuffle(0..2))", "templateType": "anything", "group": "Initial vectors"}, "c": {"name": "c", "description": "", "definition": "if(u=1,2,1)", "templateType": "anything", "group": "Ungrouped variables"}, "precision": {"name": "precision", "description": "", "definition": "3", "templateType": "anything", "group": "Result"}, "v": {"name": "v", "description": "", "definition": "direction_v[0]*s1 + direction_v[1]*s2", "templateType": "anything", "group": "Initial vectors"}, "w": {"name": "w", "description": "", "definition": "direction_w[0]*s3 + direction_w[1]*s4", "templateType": "anything", "group": "Initial vectors"}, "s1": {"name": "s1", "description": "", "definition": "random(1,-1)", "templateType": "anything", "group": "Initial vectors"}, "angle": {"name": "angle", "description": "", "definition": "arccos(dot(v,w)/(len(v)*len(w)))", "templateType": "anything", "group": "Result"}, "a": {"name": "a", "description": "", "definition": "if(t=1,2,1)", "templateType": "anything", "group": "Ungrouped variables"}, "s2": {"name": "s2", "description": "", "definition": "random(1,-1)", "templateType": "anything", "group": "Initial vectors"}, "d": {"name": "d", "description": "", "definition": "if(u=3,2,3)", "templateType": "anything", "group": "Ungrouped variables"}, "u": {"name": "u", "description": "", "definition": "random(1,2,3)", "templateType": "anything", "group": "Ungrouped variables"}, "tb": {"name": "tb", "description": "", "definition": "if(u=3,0,s4)", "templateType": "anything", "group": "Ungrouped variables"}, "b": {"name": "b", "description": "", "definition": "if(t=3,2,3)", "templateType": "anything", "group": "Ungrouped variables"}, "s3": {"name": "s3", "description": "", "definition": "random(1,-1)", "templateType": "anything", "group": "Initial vectors"}, "ta": {"name": "ta", "description": "", "definition": "if(t=3,0,s2)", "templateType": "anything", "group": "Ungrouped variables"}, "fa": {"name": "fa", "description": "", "definition": "if(t=1,0,s1)", "templateType": "anything", "group": "Ungrouped variables"}, "t": {"name": "t", "description": "", "definition": "random(1,2,3)", "templateType": "anything", "group": "Ungrouped variables"}, "sa": {"name": "sa", "description": "", "definition": "if(t=2,0,if(t=1,s1,s2))", "templateType": "anything", "group": "Ungrouped variables"}, "sb": {"name": "sb", "description": "", "definition": "if(u=2,0,if(u=1,s3,s4))", "templateType": "anything", "group": "Ungrouped variables"}, "s4": {"name": "s4", "description": "", "definition": "if(s1=s3 ,-s2,random(-1,1))", "templateType": "anything", "group": "Initial vectors"}}, "tags": ["angle between vectors", "angle beween two vectors", "checked2015", "degrees and radians", "dot product", "finding the angle between vectors", "inner product", "MAS1602", "mas1602", "radians", "scalar product", "vectors"], "functions": {}, "preamble": {"css": "", "js": ""}, "showQuestionGroupNames": false, "type": "question"}, {"name": "Vectors 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "tags": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "When are vectors $\\boldsymbol{v,\\;w}$ orthogonal?
"}, "parts": [{"type": "gapfill", "prompt": "Find $\\lambda \\in \\mathbb{R}$ such that $\\boldsymbol{v}$ and $\\boldsymbol{w}$ are orthogonal.
\n$\\lambda = $ [[0]]
", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "gaps": [{"notationStyles": ["plain", "en", "si-en"], "type": "numberentry", "minValue": "lambda", "correctAnswerFraction": true, "maxValue": "lambda", "marks": 1.5, "scripts": {}, "allowFractions": true, "mustBeReducedPC": 0, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "mustBeReduced": false, "showCorrectAnswer": true, "showFeedbackIcon": true}], "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}}], "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s3", "s2", "s1", "s5", "s4", "lambda", "mu1", "mu2", "v", "w", "u"], "statement": "You are given the vectors $\\boldsymbol{v} = \\begin{pmatrix}\\var{a} \\\\ \\var{b} \\\\ \\lambda \\end{pmatrix}$ and $\\boldsymbol{w} = \\begin{pmatrix} \\var{c} \\\\ \\var{d} \\\\ \\var{f} \\end{pmatrix}$.
\nEnter your answers to the following questions as fractions or integers, not decimals.
", "variables": {"g": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "g", "definition": "s1*random(2..9)"}, "s1": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s1", "definition": "random(1,-1)"}, "u": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "u", "definition": "mu1*v+mu2*w"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "d", "definition": "s4*random(2..9)"}, "mu2": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "mu2", "definition": "lcm(random(-5..5 except 0),f)"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "a", "definition": "s1*random(2..9)"}, "mu1": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "mu1", "definition": "lcm(random(-5..5 except 0),f)"}, "s3": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s3", "definition": "random(1,-1)"}, "v": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "v", "definition": "vector(a,b,lambda)"}, "s5": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s5", "definition": "random(1,-1)"}, "s4": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s4", "definition": "random(1,-1)"}, "w": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "w", "definition": "vector(c,d,f)"}, "lambda": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "lambda", "definition": "(-a*c-b*d)/f"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "b", "definition": "s2*random(2..9)"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "c", "definition": "s3*random(2..9)"}, "f": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "f", "definition": "random(2,4,5,10)"}, "s2": {"group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s2", "definition": "random(1,-1)"}}, "advice": "$\\boldsymbol{v}$ and $\\boldsymbol{w}$ are perpendicular to one another when $\\boldsymbol{v} \\cdot \\boldsymbol{w} = 0$.
\nNow
\n\\begin{align}
\\boldsymbol{v} \\cdot \\boldsymbol{w} &= \\simplify[]{{a}*{c}+{b}*{d}+lambda*{f}} \\\\
&= \\simplify[std]{{f}*lambda+{a*c+b*d}}
\\end{align}
Hence
\n\\[\\boldsymbol{v} \\cdot \\boldsymbol{w} = 0 \\implies \\simplify[std]{{f}*lambda+{a*c+b*d}}=0 \\implies \\lambda = \\simplify[std]{{-a*c-b*d}/{f}}\\]
\n$\\boldsymbol{v}$ is in the $xy$ plane when $\\lambda=0$.
", "variablesTest": {"maxRuns": 100, "condition": "u<>vector(0,0,0)"}, "functions": {}, "variable_groups": [], "type": "question"}, {"name": "Vectors 3 (dot and cross)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}], "tags": [], "metadata": {"description": "Determine if various combinations of vectors are defined or not.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Given the vectors $\\boldsymbol{v}$, $\\boldsymbol{w}$, $\\boldsymbol{u}$ in $\\mathbb{R}^3$, state whether the following quantities are scalars (real numbers), vectors (elements of $\\mathbb{R}^3$) or undefined.
\nIn this question, the symbol $\\cdot$ denotes the inner product and $\\times$ always denotes the cross product.
", "advice": "1. $\\boldsymbol{(v\\cdot w)\\cdot u}$ is undefined as $\\boldsymbol{v\\cdot w}$ is a scalar and we cannot take the inner product of a scalar with the vector $\\boldsymbol{u}$.
\n2. $\\boldsymbol{(v\\cdot w) u}$ is a vector and is a scalar multiple of $\\boldsymbol{u}$ as $\\boldsymbol{v \\cdot w}$ is a scalar.
\n3. $\\boldsymbol{(v \\cdot w)\\times u}$ is undefined as $\\boldsymbol{v\\cdot w}$ is a scalar and the cross product is only defined between vectors.
\n4. $\\boldsymbol{(v\\times w)\\times u}$ is a vector as $\\boldsymbol{v \\times w}$ and $\\boldsymbol{u}$ are vectors and the cross product between vectors produces a vector.
\n5. $\\boldsymbol{(v\\times w)\\cdot u}$ is a scalar as $\\boldsymbol{v \\times w}$ and $\\boldsymbol{u}$ are vectors and the inner or dot product is between vectors and produces a scalar.
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "shuffleAnswers": true, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["$\\boldsymbol{(v\\cdot w)\\cdot u}$", "$\\boldsymbol{(v\\cdot w)u}$", "$\\boldsymbol{(v\\cdot w)\\times u}$", "$\\boldsymbol{(v\\times w)\\times u}$", "$\\boldsymbol{(v\\times w)\\cdot u}$
"], "matrix": [[0, 0, 0.4], [0, 0.4, 0], [0, 0, 0.4], [0, 0.4, 0], [0.4, 0, 0]], "layout": {"type": "all", "expression": ""}, "answers": ["Scalar
", "Vector
", "Undefined
"]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Vectors 4 (dot product)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}], "type": "question", "preamble": {"js": "", "css": ""}, "parts": [{"gaps": [{"type": "numberentry", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showPrecisionHint": false, "scripts": {}, "marks": 2, "allowFractions": false, "minValue": "{inner}", "correctAnswerFraction": false, "showCorrectAnswer": true, "maxValue": "{inner}"}], "type": "gapfill", "variableReplacements": [], "scripts": {}, "marks": 0, "prompt": "Find $\\boldsymbol{v \\cdot w} = $ [[0]]
", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}], "metadata": {"description": "Given vectors $\\boldsymbol{v}$ and $\\boldsymbol{w}$, find their inner product.
", "licence": "Creative Commons Attribution 4.0 International", "notes": "\n \t\t15/07/2012:
\n \t\tAdded tags.
\n \t\t16/07/2012:
\n \t\tAdded tags.
Question appears to be working correctly.
\n \t\t"}, "tags": ["checked2015", "dot product", "dot product of two vectors", "inner product", "mas1602", "MAS1602", "scalar product", "three dimensional vectors", "unused", "vectors"], "advice": "\\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}
You are given the vectors $\\boldsymbol{v}= \\var{vector(a,b,g)}$ and $\\boldsymbol{w} = \\var{vector(c,d,f)}$ in $\\mathbb{R}^3$.
", "functions": {}}, {"name": "Vector 5 (cross product)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}], "showQuestionGroupNames": false, "statement": "You are given the vectors $\\boldsymbol{v} = \\var{vector(a,b,g)}$, $\\boldsymbol{w} = \\var{vector(c,d,f)}$.
", "question_groups": [{"name": "", "questions": [], "pickQuestions": 0, "pickingStrategy": "all-ordered"}], "functions": {}, "tags": ["3 dimensional vector", "checked2015", "cross product", "three dimensional vectors", "unused", "Vector", "vector", "vector product", "vectors"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "type": "question", "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["a", "b", "c", "d", "f", "g", "result", "s1", "s2", "s3", "s4", "s5"], "parts": [{"type": "gapfill", "gaps": [{"scripts": {}, "correctAnswerFractions": false, "marks": "3", "variableReplacements": [], "type": "matrix", "markPerCell": false, "showCorrectAnswer": true, "allowResize": false, "correctAnswer": "result", "allowFractions": false, "numColumns": 1, "tolerance": 0, "numRows": "3", "variableReplacementStrategy": "originalfirst"}], "showCorrectAnswer": true, "scripts": {}, "prompt": "Find
\n$\\boldsymbol{v} \\times \\boldsymbol{w} = $ [[0]]
", "marks": 0, "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}], "metadata": {"notes": "14/7/2015
\nAdded unused tag
\n\n
16/07/2012:
\nAdded tags.
Question appears to be working correctly.
", "description": "
Given vectors $\\boldsymbol{A,\\;B}$, find $\\boldsymbol{A\\times B}$
", "licence": "Creative Commons Attribution 4.0 International"}, "advice": "\\begin{align}
\\boldsymbol{v} \\times \\boldsymbol{w} &= \\begin{pmatrix} \\simplify[basic]{{b}*{f}-{g}*{d}} \\\\ \\simplify[basic]{{g}*{c}-{a}*{f}} \\\\ \\simplify[basic]{{a}*{d}-{b}*{c}} \\end{pmatrix} \\\\[1em]
&= \\var{result}
\\end{align}