// Numbas version: finer_feedback_settings {"name": "Vectors 1 Elementary operations on vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"type": "gapfill", "prompt": "
Calculate $\\boldsymbol{v}+\\boldsymbol{w} = $ [[0]]
", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"type": "matrix", "numColumns": 1, "scripts": {}, "allowFractions": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowResize": false, "numRows": "3", "customMarkingAlgorithm": "", "variableReplacements": [], "correctAnswer": "v", "tolerance": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": "1", "correctAnswerFractions": false, "extendBaseMarkingAlgorithm": true, "markPerCell": false}], "extendBaseMarkingAlgorithm": true, "sortAnswers": false}, {"type": "gapfill", "prompt": "Calculate $\\boldsymbol{v}+3\\boldsymbol{w} = $[[0]]
", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"type": "matrix", "numColumns": 1, "scripts": {}, "allowFractions": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowResize": false, "numRows": "3", "customMarkingAlgorithm": "", "variableReplacements": [], "correctAnswer": "v1 + 3*v2", "tolerance": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "correctAnswerFractions": false, "extendBaseMarkingAlgorithm": true, "markPerCell": false}], "extendBaseMarkingAlgorithm": true, "sortAnswers": false}, {"type": "gapfill", "prompt": "Calculate $4\\boldsymbol{v}-2\\boldsymbol{w} = $[[0]]
", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"type": "matrix", "numColumns": 1, "scripts": {}, "allowFractions": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowResize": false, "numRows": "3", "customMarkingAlgorithm": "", "variableReplacements": [], "correctAnswer": "4*v1 - 2*v2", "tolerance": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": 1, "correctAnswerFractions": false, "extendBaseMarkingAlgorithm": true, "markPerCell": false}], "extendBaseMarkingAlgorithm": true, "sortAnswers": false}, {"type": "gapfill", "prompt": "Calculate the following.
\n$\\lVert \\boldsymbol{v} \\rVert=$ [[0]]
\n$\\lVert \\boldsymbol{w} \\rVert = $ [[1]]
\n$\\lVert \\boldsymbol{v}+\\boldsymbol{w} \\rVert = $ [[2]]
", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"type": "jme", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "showPreview": true, "customMarkingAlgorithm": "", "variableReplacements": [], "answerSimplification": "std", "expectedVariableNames": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "marks": "1", "answer": "sqrt({a^2+b^2+g^2})", "checkVariableNames": false, "vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001}, {"type": "jme", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "showPreview": true, "customMarkingAlgorithm": "", "variableReplacements": [], "answerSimplification": "std", "expectedVariableNames": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "marks": "1", "answer": "sqrt({c^2+d^2+f^2})", "checkVariableNames": false, "vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001}, {"type": "jme", "scripts": {}, "failureRate": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "showPreview": true, "customMarkingAlgorithm": "", "variableReplacements": [], "answerSimplification": "std", "expectedVariableNames": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "marks": "1", "answer": "sqrt({(a+c)^2+ (b+d)^2 +(g+f)^2})", "checkVariableNames": false, "vsetRangePoints": 5, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001}], "extendBaseMarkingAlgorithm": true, "sortAnswers": false}, {"type": "gapfill", "prompt": "Let $\\boldsymbol{z}=\\boldsymbol{v}+\\boldsymbol{w}$.
\nCalculate 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.
Calculate
\n$\\var{a4}\\boldsymbol{v} = $ [[0]]
\n$\\var{b4}\\boldsymbol{w} = $ [[1]]
", "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": [], "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "gaps": [{"type": "matrix", "numColumns": 1, "scripts": {}, "allowFractions": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowResize": false, "numRows": "3", "customMarkingAlgorithm": "", "variableReplacements": [], "correctAnswer": "a4*v1", "tolerance": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": "1", "correctAnswerFractions": false, "extendBaseMarkingAlgorithm": true, "markPerCell": false}, {"type": "matrix", "numColumns": 1, "scripts": {}, "allowFractions": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "allowResize": false, "numRows": "3", "customMarkingAlgorithm": "", "variableReplacements": [], "correctAnswer": "b4*v2", "tolerance": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "marks": "1", "correctAnswerFractions": false, "extendBaseMarkingAlgorithm": true, "markPerCell": false}], "extendBaseMarkingAlgorithm": true, "sortAnswers": false}], "metadata": {"description": "Elementary operations on vectors; sum, modulus, unit vector, scalar multiple.
", "licence": "Creative Commons Attribution 4.0 International"}, "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} &= \\simplify{vector({a4}*{a}, {a4}*{b}, {a4}*{g})} \\\\[1em]
&= \\var{a4*vector(a,b,g)}
\\end{align}
\\begin{align}
\\var{-b4}\\boldsymbol{v} &= \\simplify{vector({-b4}*{c}, {-b4}*{d}, {-b4}*{f})} \\\\[1em]
&= \\var{-b4*vector(c,d,f)}
\\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} \\]
", "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "", "js": ""}, "name": "Vectors 1 Elementary operations on vectors", "functions": {}, "extensions": [], "tags": [], "ungrouped_variables": ["b4", "q", "s3", "s2", "s1", "s5", "s4", "ssquares", "v1", "v2", "a4", "a", "c", "b", "d", "g", "f", "m", "n", "ssquaresb", "ssquaresa", "v"], "variable_groups": [], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variables": {"s3": {"group": "Ungrouped variables", "templateType": "anything", "name": "s3", "description": "", "definition": "random(1,-1)"}, "s4": {"group": "Ungrouped variables", "templateType": "anything", "name": "s4", "description": "", "definition": "random(1,-1)"}, "f": {"group": "Ungrouped variables", "templateType": "anything", "name": "f", "description": "", "definition": "random(2..9)"}, "v": {"group": "Ungrouped variables", "templateType": "anything", "name": "v", "description": "", "definition": "v1+v2"}, "q": {"group": "Ungrouped variables", "templateType": "anything", "name": "q", "description": "", "definition": "M+N"}, "ssquaresb": {"group": "Ungrouped variables", "templateType": "anything", "name": "ssquaresb", "description": "", "definition": "(c)^2+(d)^2+(f)^2"}, "g": {"group": "Ungrouped variables", "templateType": "anything", "name": "g", "description": "", "definition": "s1*random(2..9)"}, "v2": {"group": "Ungrouped variables", "templateType": "anything", "name": "v2", "description": "", "definition": "vector(c,d,f)"}, "ssquares": {"group": "Ungrouped variables", "templateType": "anything", "name": "ssquares", "description": "", "definition": "(a+c)^2+(b+d)^2+(f+g)^2"}, "s1": {"group": "Ungrouped variables", "templateType": "anything", "name": "s1", "description": "", "definition": "random(1,-1)"}, "ssquaresa": {"group": "Ungrouped variables", "templateType": "anything", "name": "ssquaresa", "description": "", "definition": "(a)^2+(b)^2+(g)^2"}, "m": {"group": "Ungrouped variables", "templateType": "anything", "name": "m", "description": "", "definition": "matrix([a,b],[c,d])"}, "a4": {"group": "Ungrouped variables", "templateType": "anything", "name": "a4", "description": "", "definition": "random(3..9)"}, "b4": {"group": "Ungrouped variables", "templateType": "anything", "name": "b4", "description": "", "definition": "-random(3..9)"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "name": "a", "description": "", "definition": "s1*random(2..9)"}, "n": {"group": "Ungrouped variables", "templateType": "anything", "name": "n", "description": "", "definition": "matrix([a,b],[c,d])"}, "s5": {"group": "Ungrouped variables", "templateType": "anything", "name": "s5", "description": "", "definition": "random(1,-1)"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "name": "c", "description": "", "definition": "s3*random(2..9)"}, "v1": {"group": "Ungrouped variables", "templateType": "anything", "name": "v1", "description": "", "definition": "vector(a,b,g)"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "name": "b", "description": "", "definition": "s2*random(2..9)"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "name": "d", "description": "", "definition": "s4*random(2..9)"}, "s2": {"group": "Ungrouped variables", "templateType": "anything", "name": "s2", "description": "", "definition": "random(1,-1)"}}, "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.