// 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": [{"name": "Elementary operations on vectors,", "variable_groups": [], "metadata": {"description": "

Elementary operations on vectors; sum, modulus, unit vector, scalar multiple. 

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["b4", "q", "s3", "s2", "s1", "s5", "s4", "ssquares", "v1", "v2", "a4", "a", "c", "b", "d", "g", "f", "m", "n", "ssquaresb", "ssquaresa", "v"], "functions": {}, "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "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}

\n

Enter your answers to the following questions exactly, using the function sqrt(x) if necessary.

", "preamble": {"js": "", "css": ""}, "tags": ["addition of vectors", "checked2015", "modulus of vectors", "parallel vectors", "scalar multiple of vectors", "sum of vectors", "unit vectors", "vector", "Vector", "vectors"], "parts": [{"customMarkingAlgorithm": "", "sortAnswers": false, "scripts": {}, "prompt": "

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

", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0, "unitTests": [], "gaps": [{"customMarkingAlgorithm": "", "numColumns": 1, "extendBaseMarkingAlgorithm": true, "scripts": {}, "allowResize": false, "correctAnswer": "v", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "matrix", "showFeedbackIcon": true, "marks": "0.6", "tolerance": 0, "markPerCell": false, "unitTests": [], "allowFractions": false, "variableReplacements": [], "correctAnswerFractions": false, "numRows": "3"}], "variableReplacements": []}, {"customMarkingAlgorithm": "", "sortAnswers": false, "scripts": {}, "prompt": "

Calculate the following.

\n

$\\lVert \\boldsymbol{v} \\rVert=$ [[0]]

\n

$\\lVert \\boldsymbol{w} \\rVert = $ [[1]]

\n

$\\lVert \\boldsymbol{v}+\\boldsymbol{w} \\rVert = $ [[2]]

", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0, "unitTests": [], "gaps": [{"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "sqrt({a^2+b^2+g^2})", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}, {"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "sqrt({c^2+d^2+f^2})", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}, {"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "sqrt({(a+c)^2+ (b+d)^2 +(g+f)^2})", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}], "variableReplacements": []}, {"customMarkingAlgorithm": "", "sortAnswers": false, "scripts": {}, "prompt": "

Let $\\boldsymbol{z}=\\boldsymbol{v}+\\boldsymbol{w}$.

\n

Find 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)$

\n

You must enter your answers exactly, using the function sqrt(x) if necessary.

", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0, "unitTests": [], "gaps": [{"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "({(a + c)} / Sqrt({(((a + c) ^ 2) + ((b + d) ^ 2) + ((g + f) ^ 2))}))", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}, {"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "({(b + d)} / Sqrt({(((a + c) ^ 2) + ((b + d) ^ 2) + ((g + f) ^ 2))}))", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}, {"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "({(g + f)} / Sqrt({(((a + c) ^ 2) + ((b + d) ^ 2) + ((g + f) ^ 2))}))", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}], "variableReplacements": []}, {"customMarkingAlgorithm": "", "sortAnswers": false, "scripts": {}, "prompt": "

Find

\n

$\\var{a4}\\boldsymbol{v} = $ [[0]]

\n

$\\var{b4}\\boldsymbol{w} = $ [[1]]

", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0, "unitTests": [], "gaps": [{"customMarkingAlgorithm": "", "numColumns": 1, "extendBaseMarkingAlgorithm": true, "scripts": {}, "allowResize": false, "correctAnswer": "a4*v1", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "matrix", "showFeedbackIcon": true, "marks": "0.6", "tolerance": 0, "markPerCell": false, "unitTests": [], "allowFractions": false, "variableReplacements": [], "correctAnswerFractions": false, "numRows": "3"}, {"customMarkingAlgorithm": "", "numColumns": 1, "extendBaseMarkingAlgorithm": true, "scripts": {}, "allowResize": false, "correctAnswer": "b4*v2", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "matrix", "showFeedbackIcon": true, "marks": "0.6", "tolerance": 0, "markPerCell": false, "unitTests": [], "allowFractions": false, "variableReplacements": [], "correctAnswerFractions": false, "numRows": "3"}], "variableReplacements": []}, {"customMarkingAlgorithm": "", "sortAnswers": false, "scripts": {}, "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)$

", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0, "unitTests": [], "gaps": [{"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "({a} / Sqrt({(({a} ^ 2) + ({b} ^ 2) + ({g} ^ 2))}))", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}, {"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "({b} / Sqrt({(({a} ^ 2) + ({b} ^ 2) + ({g} ^ 2))}))", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}, {"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "({g} / Sqrt({(({a} ^ 2) + ({b} ^ 2) + ({g} ^ 2))}))", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}, {"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "({( - c)} / Sqrt({(({c} ^ 2) + ({d} ^ 2) + ({f} ^ 2))}))", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}, {"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "({( - d)} / Sqrt({(({c} ^ 2) + ({d} ^ 2) + ({f} ^ 2))}))", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}, {"showPreview": true, "customMarkingAlgorithm": "", "scripts": {}, "answer": "({( - f)} / Sqrt({(({c} ^ 2) + ({d} ^ 2) + ({f} ^ 2))}))", "failureRate": 1, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "jme", "vsetRange": [0, 1], "showFeedbackIcon": true, "answerSimplification": "std", "marks": 0.6, "vsetRangePoints": 5, "checkVariableNames": false, "expectedVariableNames": [], "unitTests": [], "variableReplacements": [], "checkingAccuracy": 0.001}], "variableReplacements": []}], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "advice": "

a)

\n

\\[\\boldsymbol{v}+\\boldsymbol{w} = \\var{vector(a,b,g)} + \\var{vector(c,d,f)} = \\var{vector(a+c,b+d,g+f)} \\]

\n

b)

\n

In 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}$.

\n

Hence:

\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}

\n

c)

\n

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} \\]

\n

For 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}

\n

d)

\n

\\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}

\n

\\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}

\n

\n

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} \\]

\n

and 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} \\]

", "variables": {"s2": {"templateType": "anything", "description": "", "definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s2"}, "s4": {"templateType": "anything", "description": "", "definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s4"}, "n": {"templateType": "anything", "description": "", "definition": "matrix([a,b],[c,d])", "group": "Ungrouped variables", "name": "n"}, "ssquaresb": {"templateType": "anything", "description": "", "definition": "(c)^2+(d)^2+(f)^2", "group": "Ungrouped variables", "name": "ssquaresb"}, "v2": {"templateType": "anything", "description": "", "definition": "vector(c,d,f)", "group": "Ungrouped variables", "name": "v2"}, "c": {"templateType": "anything", "description": "", "definition": "s3*random(2..9)", "group": "Ungrouped variables", "name": "c"}, "b4": {"templateType": "anything", "description": "", "definition": "-random(3..9)", "group": "Ungrouped variables", "name": "b4"}, "m": {"templateType": "anything", "description": "", "definition": "matrix([a,b],[c,d])", "group": "Ungrouped variables", "name": "m"}, "d": {"templateType": "anything", "description": "", "definition": "s4*random(2..9)", "group": "Ungrouped variables", "name": "d"}, "s3": {"templateType": "anything", "description": "", "definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s3"}, "v1": {"templateType": "anything", "description": "", "definition": "vector(a,b,g)", "group": "Ungrouped variables", "name": "v1"}, "g": {"templateType": "anything", "description": "", "definition": "s1*random(2..9)", "group": "Ungrouped variables", "name": "g"}, "ssquares": {"templateType": "anything", "description": "", "definition": "(a+c)^2+(b+d)^2+(f+g)^2", "group": "Ungrouped variables", "name": "ssquares"}, "ssquaresa": {"templateType": "anything", "description": "", "definition": "(a)^2+(b)^2+(g)^2", "group": "Ungrouped variables", "name": "ssquaresa"}, "v": {"templateType": "anything", "description": "", "definition": "v1+v2", "group": "Ungrouped variables", "name": "v"}, "q": {"templateType": "anything", "description": "", "definition": "M+N", "group": "Ungrouped variables", "name": "q"}, "b": {"templateType": "anything", "description": "", "definition": "s2*random(2..9)", "group": "Ungrouped variables", "name": "b"}, "a": {"templateType": "anything", "description": "", "definition": "s1*random(2..9)", "group": "Ungrouped variables", "name": "a"}, "f": {"templateType": "anything", "description": "", "definition": "random(2..9)", "group": "Ungrouped variables", "name": "f"}, "s5": {"templateType": "anything", "description": "", "definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s5"}, "a4": {"templateType": "anything", "description": "", "definition": "random(3..9)", "group": "Ungrouped variables", "name": "a4"}, "s1": {"templateType": "anything", "description": "", "definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s1"}}, "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/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "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/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}