// Numbas version: finer_feedback_settings {"name": "Maria's copy of Simon's copy of 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": "Maria's copy of Simon's copy of Elementary operations on vectors", "variables": {"ssquaresa": {"definition": "(a)^2+(b)^2+(g)^2", "name": "ssquaresa", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "v2": {"definition": "vector(c,d,f)", "name": "v2", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "f": {"definition": "random(2..9)", "name": "f", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "v1": {"definition": "vector(a,b,g)", "name": "v1", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "s5": {"definition": "random(1,-1)", "name": "s5", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "a4": {"definition": "random(3..9)", "name": "a4", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "s3": {"definition": "random(1,-1)", "name": "s3", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "ssquaresb": {"definition": "(c)^2+(d)^2+(f)^2", "name": "ssquaresb", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "v": {"definition": "v1+v2", "name": "v", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "m": {"definition": "matrix([a,b],[c,d])", "name": "m", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "ssquares": {"definition": "(a+c)^2+(b+d)^2+(f+g)^2", "name": "ssquares", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "g": {"definition": "s1*random(2..9)", "name": "g", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "s1": {"definition": "random(1,-1)", "name": "s1", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "a": {"definition": "s1*random(2..9)", "name": "a", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "c": {"definition": "s3*random(2..9)", "name": "c", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "q": {"definition": "M+N", "name": "q", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "b4": {"definition": "-random(3..9)", "name": "b4", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "b": {"definition": "s2*random(2..9)", "name": "b", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "s4": {"definition": "random(1,-1)", "name": "s4", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "n": {"definition": "matrix([a,b],[c,d])", "name": "n", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "d": {"definition": "s4*random(2..9)", "name": "d", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "s2": {"definition": "random(1,-1)", "name": "s2", "templateType": "anything", "group": "Ungrouped variables", "description": ""}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "
Elementary operations on vectors; sum, modulus, unit vector, scalar multiple.
"}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "functions": {}, "advice": "\\[\\boldsymbol{v}+\\boldsymbol{w} = \\var{vector(a,b,g)} + \\var{vector(c,d,f)} = \\var{vector(a+c,b+d,g+f)} \\]
\n\n\\begin{align}
\\var{a4}\\boldsymbol{v} &= \\var{a4}\\times \\var{vector(a,b,g)}
&= \\var{a4*vector(a,b,g)}
\\end{align}
\\begin{align}
\\var{b4}\\boldsymbol{w} &= \\var{b4}\\times\\var{vector(c, d, f)}
&= \\var{b4*vector(c,d,f)}
\\end{align}
(c)
\n$4\\mathbf{v}-2\\mathbf{w} = 4\\times \\var{vector(a,b,g)}-2\\times \\var{vector(c,d,f)}=\\var{vector(4*a,4*b,4*g)}-\\var{vector(2*c,2*d,2*f)}= \\var{vector(4*a-2*c,4*b-2*d,4*g-2*f)}$
\n\n\n\n(d)
\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{z}= \\begin{pmatrix} z_1 \\\\ z_2 \\\\ z_3 \\end{pmatrix}$, the unit vector parallel to $\\boldsymbol{z}$ is given by:
\n\\[ \\boldsymbol{\\hat{z}} = \\frac{1}{\\lVert \\boldsymbol{z} \\rVert} \\begin{pmatrix} z_1 \\\\ z_2 \\\\ z_3 \\end{pmatrix} = \\begin{pmatrix} \\frac{z_1}{\\lVert \\boldsymbol{z} \\rVert} \\\\ \\frac{z_2}{\\lVert \\boldsymbol{z} \\rVert} \\\\ \\frac{z_3}{\\lVert \\boldsymbol{z} \\rVert} \\end{pmatrix} \\]
\nFor this example we have
\n$\\boldsymbol{v}+\\boldsymbol{w} = \\var{vector(a+c,b+d,g+f)}$ from part (a)
\nand
\n$\\lVert \\boldsymbol{v+w} \\rVert =\\simplify[std]{sqrt({(a+c)^2+(b+d)^2+(f+g)^2})}$ from part (d)
\n\n
Hence:
\n\\begin{align}
&& \\boldsymbol{\\hat{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}
You are given the vectors
\n\\begin{align}
\\mathbf{v} & =\\simplify[std]{vector({a},{b},{g})}, &
\\mathbf{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.
Calculate $\\mathbf{v}+\\mathbf{w} = $ [[0]]
", "showFeedbackIcon": true, "type": "gapfill", "gaps": [{"tolerance": 0, "scripts": {}, "showCorrectAnswer": true, "numRows": "3", "allowResize": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "showFeedbackIcon": true, "type": "matrix", "correctAnswerFractions": false, "customMarkingAlgorithm": "", "numColumns": 1, "marks": "1", "correctAnswer": "v", "unitTests": [], "markPerCell": false}], "marks": 0, "unitTests": []}, {"scripts": {}, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "prompt": "Calculate
\n$\\var{a4}\\mathbf{v} = $ [[0]]
\n$\\var{b4}\\mathbf{w} = $ [[1]]
", "showFeedbackIcon": true, "type": "gapfill", "gaps": [{"tolerance": 0, "scripts": {}, "showCorrectAnswer": true, "numRows": "3", "allowResize": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "showFeedbackIcon": true, "type": "matrix", "correctAnswerFractions": false, "customMarkingAlgorithm": "", "numColumns": 1, "marks": "1", "correctAnswer": "a4*v1", "unitTests": [], "markPerCell": false}, {"tolerance": 0, "scripts": {}, "showCorrectAnswer": true, "numRows": "3", "allowResize": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "showFeedbackIcon": true, "type": "matrix", "correctAnswerFractions": false, "customMarkingAlgorithm": "", "numColumns": 1, "marks": "1", "correctAnswer": "b4*v2", "unitTests": [], "markPerCell": false}], "marks": 0, "unitTests": []}, {"scripts": {}, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "prompt": "Calculate $4\\mathbf{v}-2\\mathbf{w} = $[[0]]
", "showFeedbackIcon": true, "type": "gapfill", "gaps": [{"tolerance": 0, "scripts": {}, "showCorrectAnswer": true, "numRows": "3", "allowResize": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "allowFractions": false, "showFeedbackIcon": true, "type": "matrix", "correctAnswerFractions": false, "customMarkingAlgorithm": "", "numColumns": 1, "marks": 1, "correctAnswer": "4*v1 - 2*v2", "unitTests": [], "markPerCell": false}], "marks": 0, "unitTests": []}, {"scripts": {}, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "prompt": "Calculate the following.
\n$\\vert \\mathbf{v} \\vert=$ [[0]]
\n$\\vert \\mathbf{w} \\vert = $ [[1]]
\n$\\vert \\mathbf{v}+\\mathbf{w} \\vert = $ [[2]]
\nYou must enter your answers exactly, using the function sqrt(x)
as necessary
Let $\\mathbf{z}=\\mathbf{v}+\\mathbf{w}$.
\nCalculate the unit vector $\\mathbf{\\hat{z}}$ in the direction of $\\mathbf{z}$. Write $\\mathbf{\\hat{z}}$ as a row vector.
\n$\\mathbf{\\hat{z}}= \\big($ [[0]], [[1]], [[2]] $\\big)$
\nYou must enter your answers exactly, using the function sqrt(x)
as necessary.