// Numbas version: finer_feedback_settings {"name": "Elementary operations on vectors, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s1", "description": ""}, "v1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "vector(a,b,g)", "name": "v1", "description": ""}, "s5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s5", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(2..9)", "name": "a", "description": ""}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s3*random(2..9)", "name": "c", "description": ""}, "s4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s4", "description": ""}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s2", "description": ""}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "v1+v2", "name": "v", "description": ""}, "v2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "vector(c,d,f)", "name": "v2", "description": ""}, "ssquaresa": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(a)^2+(b)^2+(g)^2", "name": "ssquaresa", "description": ""}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(2..9)", "name": "b", "description": ""}, "ssquaresb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(c)^2+(d)^2+(f)^2", "name": "ssquaresb", "description": ""}, "q": {"templateType": "anything", "group": "Ungrouped variables", "definition": "M+N", "name": "q", "description": ""}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s4*random(2..9)", "name": "d", "description": ""}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([a,b],[c,d])", "name": "m", "description": ""}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "f", "description": ""}, "b4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-random(3..9)", "name": "b4", "description": ""}, "ssquares": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(a+c)^2+(b+d)^2+(f+g)^2", "name": "ssquares", "description": ""}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([a,b],[c,d])", "name": "n", "description": ""}, "a4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(3..9)", "name": "a4", "description": ""}, "s3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s3", "description": ""}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(2..9)", "name": "g", "description": ""}}, "ungrouped_variables": ["b4", "q", "s3", "s2", "s1", "s5", "s4", "ssquares", "v1", "v2", "a4", "a", "c", "b", "d", "g", "f", "m", "n", "ssquaresb", "ssquaresa", "v"], "name": "Elementary operations on vectors, ", "functions": {}, "parts": [{"showCorrectAnswer": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "
Find $\\boldsymbol{v}+\\boldsymbol{w} = $ [[0]]
", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"markPerCell": false, "allowFractions": false, "correctAnswer": "v", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "allowResize": false, "unitTests": [], "correctAnswerFractions": false, "variableReplacementStrategy": "originalfirst", "numRows": "3", "scripts": {}, "type": "matrix", "numColumns": 1, "tolerance": 0, "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.6", "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}, {"showCorrectAnswer": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "Calculate the following.
\n$\\lVert \\boldsymbol{v} \\rVert=$ [[0]]
\n$\\lVert \\boldsymbol{w} \\rVert = $ [[1]]
\n$\\lVert \\boldsymbol{v}+\\boldsymbol{w} \\rVert = $ [[2]]
", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"answer": "sqrt({a^2+b^2+g^2})", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "vsetRangePoints": 5, "marks": 0.6, "scripts": {}, "answerSimplification": "std", "expectedVariableNames": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "sqrt({c^2+d^2+f^2})", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "vsetRangePoints": 5, "marks": 0.6, "scripts": {}, "answerSimplification": "std", "expectedVariableNames": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "sqrt({(a+c)^2+ (b+d)^2 +(g+f)^2})", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "vsetRangePoints": 5, "marks": 0.6, "scripts": {}, "answerSimplification": "std", "expectedVariableNames": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}, {"showCorrectAnswer": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "Let $\\boldsymbol{z}=\\boldsymbol{v}+\\boldsymbol{w}$.
\nFind the unit vector $\\boldsymbol{u_z}$ in the direction of $\\boldsymbol{z}$. Write $\\boldsymbol{u_z}$ as a row vector.
\n$\\boldsymbol{u_z}= \\big($ [[0]], [[1]], [[2]] $\\big)$
\nYou must enter your answers exactly, using the function sqrt(x)
if necessary.
Find
\n$\\var{a4}\\boldsymbol{v} = $ [[0]]
\n$\\var{b4}\\boldsymbol{w} = $ [[1]]
", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"markPerCell": false, "allowFractions": false, "correctAnswer": "a4*v1", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "allowResize": false, "unitTests": [], "correctAnswerFractions": false, "variableReplacementStrategy": "originalfirst", "numRows": "3", "scripts": {}, "type": "matrix", "numColumns": 1, "tolerance": 0, "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.6", "showFeedbackIcon": true}, {"markPerCell": false, "allowFractions": false, "correctAnswer": "b4*v2", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "allowResize": false, "unitTests": [], "correctAnswerFractions": false, "variableReplacementStrategy": "originalfirst", "numRows": "3", "scripts": {}, "type": "matrix", "numColumns": 1, "tolerance": 0, "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.6", "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}, {"showCorrectAnswer": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "Find the unit vector $\\boldsymbol{u_v}$ parallel to $\\boldsymbol{v}$, and the unit vector $-\\boldsymbol{u_w}$ anti-parallel to $\\boldsymbol{w}$. Write both vectors as row vectors.
\n$\\boldsymbol{u_v} = \\big($ [[0]], [[1]], [[2]] $\\big)$
\n$-\\boldsymbol{u_w} = \\big($ [[3]], [[4]], [[5]] $\\big)$
", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"answer": "({a} / Sqrt({(({a} ^ 2) + ({b} ^ 2) + ({g} ^ 2))}))", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "vsetRangePoints": 5, "marks": 0.6, "scripts": {}, "answerSimplification": "std", "expectedVariableNames": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "({b} / Sqrt({(({a} ^ 2) + ({b} ^ 2) + ({g} ^ 2))}))", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "vsetRangePoints": 5, "marks": 0.6, "scripts": {}, "answerSimplification": "std", "expectedVariableNames": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "({g} / Sqrt({(({a} ^ 2) + ({b} ^ 2) + ({g} ^ 2))}))", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "vsetRangePoints": 5, "marks": 0.6, "scripts": {}, "answerSimplification": "std", "expectedVariableNames": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "({( - c)} / Sqrt({(({c} ^ 2) + ({d} ^ 2) + ({f} ^ 2))}))", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "vsetRangePoints": 5, "marks": 0.6, "scripts": {}, "answerSimplification": "std", "expectedVariableNames": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "({( - d)} / Sqrt({(({c} ^ 2) + ({d} ^ 2) + ({f} ^ 2))}))", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "vsetRangePoints": 5, "marks": 0.6, "scripts": {}, "answerSimplification": "std", "expectedVariableNames": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}, {"answer": "({( - f)} / Sqrt({(({c} ^ 2) + ({d} ^ 2) + ({f} ^ 2))}))", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "checkVariableNames": false, "unitTests": [], "vsetRange": [0, 1], "type": "jme", "vsetRangePoints": 5, "marks": 0.6, "scripts": {}, "answerSimplification": "std", "expectedVariableNames": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "failureRate": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "You are given the vectors
\n\\begin{align}
\\boldsymbol{v} & =\\simplify[std]{vector({a},{b},{g})}, &
\\boldsymbol{w} &= \\simplify[std]{vector({c},{d},{f})}\\qquad \\in{\\mathbb R}^3.
\\end{align}
Enter your answers to the following questions exactly, using the function sqrt(x)
if necessary.
Elementary operations on vectors; sum, modulus, unit vector, scalar multiple.
"}, "extensions": [], "advice": "\\[\\boldsymbol{v}+\\boldsymbol{w} = \\var{vector(a,b,g)} + \\var{vector(c,d,f)} = \\var{vector(a+c,b+d,g+f)} \\]
\nIn general for a vector $\\boldsymbol{x}= \\begin{pmatrix}x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, we have $\\lVert \\boldsymbol{x} \\rVert = \\sqrt{x_1^2+x_2^2+x_3^2}$.
\nHence:
\n\\begin{align}
\\lVert \\boldsymbol{v} \\rVert &= \\sqrt{\\var{a^2}+\\var{b^2}+\\var{g^2}} = \\simplify[all]{ sqrt({a^2+b^2+g^2})} \\\\
\\lVert \\boldsymbol{w} \\rVert &= \\sqrt{\\var{c^2}+\\var{d^2}+\\var{f^2}} = \\simplify[all]{ sqrt({c^2+d^2+f^2})} \\\\
\\lVert \\boldsymbol{v+w} \\rVert &= \\sqrt{\\var{(a+c)^2}+\\var{(b+d)^2}+\\var{(g+f)^2}} = \\simplify[all]{ sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}
\\end{align}
Given a vector $\\boldsymbol{x}= \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix}$, the unit vector parallel to $\\boldsymbol{x}$ is given by:
\n\\[ \\boldsymbol{u_x} = \\frac{1}{\\lVert \\boldsymbol{x} \\rVert} \\begin{pmatrix} x_1 \\\\ x_2 \\\\ x_3 \\end{pmatrix} = \\begin{pmatrix} \\frac{x_1}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_2}{\\lVert \\boldsymbol{x} \\rVert} \\\\ \\frac{x_3}{\\lVert \\boldsymbol{x} \\rVert} \\end{pmatrix} \\]
\nFor this example we have $\\lVert \\boldsymbol{v+w} \\rVert =\\simplify[std]{sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}$, hence:
\n\\begin{align}
&&\\boldsymbol{z} = \\boldsymbol{v} + \\boldsymbol{w} &= \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\\
\\implies && \\boldsymbol{u_z} &= \\frac{1}{\\sqrt{\\var{ssquares}}} \\begin{pmatrix} \\var{a+c} \\\\ \\var{b+d} \\\\ \\var{g+f} \\end{pmatrix} \\\\[1em]
&& &= \\begin{pmatrix} \\simplify[std]{{a+c}/sqrt({ssquares})} \\\\ \\simplify[std]{{b+d}/sqrt({ssquares})} \\\\ \\simplify[std]{{g+f}/sqrt({ssquares})} \\end{pmatrix}
\\end{align}
\\begin{align}
\\var{a4}\\boldsymbol{v} &=\\var{a4}\\var{vector(a,b,g)}\\\\[1em]
&= \\simplify{vector({a4}*{a}, {a4}*{b}, {a4}*{g})}\\\\[1em]
\\end{align}
\\begin{align}
\\var{-b4}\\boldsymbol{v} &=\\var{-b4}\\var{vector(c,d,f)}\\\\[1em]
&= \\simplify{vector({-b4}*{c}, {-b4}*{d}, {-b4}*{f})}\\\\[1em]
\\end{align}
Using the information above, the unit vector parallel to $\\boldsymbol{v}$ is:
\n\\[ \\boldsymbol{u_v} = \\begin{pmatrix} \\simplify[std]{{a}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{b}/sqrt({ssquaresA})} \\\\ \\simplify[std]{{g}/sqrt({ssquaresA})} \\end{pmatrix} \\]
\nand the unit vector anti-parallel to $\\boldsymbol{w}$ is:
\n\\[ -\\boldsymbol{u_w} = \\begin{pmatrix} \\simplify[std]{{-c}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-d}/sqrt({ssquaresB})} \\\\ \\simplify[std]{{-f}/sqrt({ssquaresB})} \\end{pmatrix} \\]
", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}