// Numbas version: finer_feedback_settings {"metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Questions on vector arithmetic and vector operations, including dot and cross product.

"}, "question_groups": [{"pickQuestions": 1, "name": "Group", "pickingStrategy": "all-ordered", "questions": [{"name": "Vectors: adding, multiply by scalar, magnitude", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "h"], "tags": ["rebel", "Rebel", "REBEL", "rebelmaths"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"prompt": "

The vector $\\mathbf{x}+\\mathbf{y}$ is [[0]]$\\mathbf{i}+$[[1]]$\\mathbf{j}+$[[2]]$\\mathbf{k}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{a}+{d}", "minValue": "{a}+{d}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{b}+{f}", "minValue": "{b}+{f}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 2, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{c}+{g}", "minValue": "{c}+{g}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 2, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

The vector {h}$\\mathbf{x}$ is [[0]]$\\mathbf{i}+$[[1]]$\\mathbf{j}+$[[2]]$\\mathbf{k}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{h}*{a}", "minValue": "{h}*{a}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 2, "type": "numberentry", "showPrecisionHint": false}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{h}*{b}", "marks": 2, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{h}*{c}", "marks": 2, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"stepsPenalty": 0, "precisionType": "dp", "prompt": "

Find $|\\mathbf{x}|$, the magnitude of $\\mathbf{x}$ to the nearest whole number.

", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "maxValue": "sqrt{a^2+b^2+c^2}", "strictPrecision": true, "minValue": "sqrt{a^2+b^2+c^2}", "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "

If $\\mathbf{x}=x_1\\mathbf{i}+x_2\\mathbf{j}+x_3\\mathbf{k}$, then $|x|=\\sqrt{x_1^2+x_2^2+x_3^2}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "precisionPartialCredit": 0, "correctAnswerFraction": false, "showCorrectAnswer": true, "precision": 0, "scripts": {}, "marks": 8, "type": "numberentry", "showPrecisionHint": false}], "statement": "

Let $\\mathbf{x}=${a}$\\mathbf{i}+${b}$\\mathbf{j}+${c}$\\mathbf{k}$ and $\\mathbf{y}=${d}$\\mathbf{i}+${f}$\\mathbf{j}+${g}$\\mathbf{k}$ 

\n

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "g": {"definition": "random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "f": {"definition": "random(1..10)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "h": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "h", "description": ""}}, "metadata": {"description": "

Magnitude of a vector, adding vectors, multiply by a scalar.

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Elementary operations on vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Katy Dobson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/854/"}, {"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}, {"name": "Paul Emanuel", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2551/"}], "ungrouped_variables": ["b4", "q", "s3", "s2", "s1", "s5", "s4", "ssquares", "v1", "v2", "a4", "a", "c", "b", "d", "g", "f", "m", "n", "ssquaresb", "ssquaresa", "v"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "tags": [], "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"type": "gapfill", "unitTests": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "customMarkingAlgorithm": "", "sortAnswers": false, "gaps": [{"type": "matrix", "allowResize": false, "allowFractions": false, "correctAnswerFractions": false, "unitTests": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "numColumns": 1, "variableReplacements": [], "customMarkingAlgorithm": "", "correctAnswer": "v", "tolerance": 0, "markPerCell": false, "numRows": "3", "extendBaseMarkingAlgorithm": true, "marks": "1", "showFeedbackIcon": true, "scripts": {}}], "extendBaseMarkingAlgorithm": true, "marks": 0, "showFeedbackIcon": true, "prompt": "

Calculate $\\mathbf{v}+\\mathbf{w} = $ [[0]]

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

Calculate $\\mathbf{v}+3\\mathbf{w} = $[[0]]

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

Calculate $4\\mathbf{v}-2\\mathbf{w} = $[[0]]

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

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

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

\n

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

\n

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

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

Calculate

\n

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

\n

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

", "scripts": {}}], "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} &= \\simplify{vector({a4}*{a}, {a4}*{b}, {a4}*{g})} \\\\[1em]
&= \\var{a4*vector(a,b,g)}
\\end{align}

\n

\\begin{align}
\\var{-b4}\\boldsymbol{v} &= \\simplify{vector({-b4}*{c}, {-b4}*{d}, {-b4}*{f})} \\\\[1em]
&= \\var{-b4*vector(c,d,f)}
\\end{align}

\n

e)

\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": {"b": {"templateType": "anything", "definition": "s2*random(2..9)", "name": "b", "description": "", "group": "Ungrouped variables"}, "q": {"templateType": "anything", "definition": "M+N", "name": "q", "description": "", "group": "Ungrouped variables"}, "v": {"templateType": "anything", "definition": "v1+v2", "name": "v", "description": "", "group": "Ungrouped variables"}, "s1": {"templateType": "anything", "definition": "random(1,-1)", "name": "s1", "description": "", "group": "Ungrouped variables"}, "d": {"templateType": "anything", "definition": "s4*random(2..9)", "name": "d", "description": "", "group": "Ungrouped variables"}, "g": {"templateType": "anything", "definition": "s1*random(2..9)", "name": "g", "description": "", "group": "Ungrouped variables"}, "a4": {"templateType": "anything", "definition": "random(3..9)", "name": "a4", "description": "", "group": "Ungrouped variables"}, "m": {"templateType": "anything", "definition": "matrix([a,b],[c,d])", "name": "m", "description": "", "group": "Ungrouped variables"}, "s5": {"templateType": "anything", "definition": "random(1,-1)", "name": "s5", "description": "", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "definition": "s1*random(2..9)", "name": "a", "description": "", "group": "Ungrouped variables"}, "f": {"templateType": "anything", "definition": "random(2..9)", "name": "f", "description": "", "group": "Ungrouped variables"}, "s3": {"templateType": "anything", "definition": "random(1,-1)", "name": "s3", "description": "", "group": "Ungrouped variables"}, "v2": {"templateType": "anything", "definition": "vector(c,d,f)", "name": "v2", "description": "", "group": "Ungrouped variables"}, "ssquares": {"templateType": "anything", "definition": "(a+c)^2+(b+d)^2+(f+g)^2", "name": "ssquares", "description": "", "group": "Ungrouped variables"}, "v1": {"templateType": "anything", "definition": "vector(a,b,g)", "name": "v1", "description": "", "group": "Ungrouped variables"}, "s4": {"templateType": "anything", "definition": "random(1,-1)", "name": "s4", "description": "", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "definition": "s3*random(2..9)", "name": "c", "description": "", "group": "Ungrouped variables"}, "b4": {"templateType": "anything", "definition": "-random(3..9)", "name": "b4", "description": "", "group": "Ungrouped variables"}, "ssquaresa": {"templateType": "anything", "definition": "(a)^2+(b)^2+(g)^2", "name": "ssquaresa", "description": "", "group": "Ungrouped variables"}, "n": {"templateType": "anything", "definition": "matrix([a,b],[c,d])", "name": "n", "description": "", "group": "Ungrouped variables"}, "s2": {"templateType": "anything", "definition": "random(1,-1)", "name": "s2", "description": "", "group": "Ungrouped variables"}, "ssquaresb": {"templateType": "anything", "definition": "(c)^2+(d)^2+(f)^2", "name": "ssquaresb", "description": "", "group": "Ungrouped variables"}}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "variable_groups": [], "statement": "

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}

\n

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

", "preamble": {"js": "", "css": ""}, "type": "question"}, {"name": "Dot product and angle between two vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}], "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"gaps": [{"unitTests": [], "mustBeReducedPC": 0, "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReduced": false, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "minValue": "ans1-0.005", "maxValue": "ans1+0.005", "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 1, "variableReplacements": []}, {"unitTests": [], "mustBeReducedPC": 0, "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReduced": false, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "minValue": "ansrad-0.05", "maxValue": "ansrad+0.05", "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 1, "variableReplacements": []}, {"unitTests": [], "mustBeReducedPC": 0, "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReduced": false, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "minValue": "dot_of_ab-0.001", "maxValue": "dot_of_ab+0.001", "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 1, "variableReplacements": []}], "unitTests": [], "type": "gapfill", "sortAnswers": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "

$\\mathbf{a}=\\pmatrix{\\var{a[0]},\\var{a[1]},\\var{a[2]}}$ and $\\mathbf{ b}=\\pmatrix{\\var{b[0]},\\var{b[1]},\\var{b[2]}}$

\n

$\\mathbf{a} \\cdot \\mathbf{b}=$ [[2]]

\n

$\\cos({\\theta})=$ [[0]]  (Give your answer to two decimal places)

\n

$\\theta=$ [[1]] (Give your answer, in radians to one decimal place )

", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 0, "variableReplacements": []}, {"gaps": [{"unitTests": [], "mustBeReducedPC": 0, "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReduced": false, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "minValue": "ans2-0.005", "maxValue": "ans2+0.005", "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 1, "variableReplacements": []}, {"unitTests": [], "mustBeReducedPC": 0, "type": "numberentry", "scripts": {}, "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "mustBeReduced": false, "allowFractions": false, "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "minValue": "ansrad2-0.05", "maxValue": "ansrad2+0.05", "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 1, "variableReplacements": []}, {"answer": "{dot_of_cd}", "unitTests": [], "type": "jme", "scripts": {}, "vsetRange": [0, 1], "failureRate": 1, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "showPreview": true, "checkingAccuracy": 0.001, "checkingType": "absdiff", "checkVariableNames": false, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 1, "expectedVariableNames": [], "variableReplacements": []}], "unitTests": [], "type": "gapfill", "sortAnswers": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "prompt": "

 $ \\mathbf{c}=\\var{c[0]}i  + \\var{c[1]}j + \\var{c[2]}k$ and $\\mathbf{d}= \\var{d[0]}i+ \\var{d[1]}j+\\var{d[2]}k$

\n

$\\mathbf{c} \\cdot \\mathbf{d}=$ [[2]]

\n

$\\cos({\\theta})=$ [[0]]  (Give your answer to two decimal places)

\n

$\\theta=$ [[1]]  (Give your answer, in radians to one decimal place)

", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 0, "variableReplacements": []}], "functions": {}, "variables": {"ans1": {"name": "ans1", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "precround(dot(a,b)/(lena*lenb),2)"}, "a": {"name": "a", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "vector(repeat(random(1..9)*sign(random(1,-1)),3))"}, "d": {"name": "d", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "vector(repeat(random(2..9)*sign(random(1,1)),3))"}, "ansrad2": {"name": "ansrad2", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "precround(arccos(ans2),1)"}, "dot_of_cd": {"name": "dot_of_cd", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "dot(c,d)"}, "dot_of_ab": {"name": "dot_of_ab", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "dot(a,b)"}, "ansrad": {"name": "ansrad", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "precround(arccos(ans1),1)"}, "lena": {"name": "lena", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "abs(a)"}, "lenb": {"name": "lenb", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "abs(b)"}, "lend": {"name": "lend", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "abs(d)"}, "c": {"name": "c", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "vector(repeat(random(2..9)*sign(random(1,1)),3))"}, "b": {"name": "b", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "vector(repeat(random(1..9)*sign(random(1,-1)),3))"}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "precround(dot(c,d)/(lenc*lend),2)"}, "lenc": {"name": "lenc", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "abs(c)"}}, "advice": "

Note that in this advice, the full calculator display is used in the calculation of each step; any rounding is purely for display clarity.

\n

The dot product of two vectors $\\boldsymbol{a}=\\pmatrix{a_1,a_2,a_3}$ and $\\boldsymbol{b}=\\pmatrix{b_1,b_2,b_3}$ is given by

\n

\\[\\boldsymbol{a\\cdot b}=a_1b_1+a_2b_2+a_3b_3\\]

\n

\n

$\\lvert\\boldsymbol{a}\\rvert=\\sqrt{a_1^2+a_2^2+a_3^2}$ ,$\\lvert\\boldsymbol{b}\\rvert=\\sqrt{b_1^2+b_2^2+b_3^2}$ are the lengths of the vectors $\\boldsymbol{a}$ and $\\boldsymbol{b}$.

\n

\n

and so

\n

\\[\\cos(\\theta)=\\frac{\\boldsymbol{a\\cdot b}}{\\lvert\\boldsymbol{a}\\rvert \\lvert\\boldsymbol{b}\\rvert}=\\frac{a_1b_1+a_2b_2+a_3b_3}{\\lvert\\boldsymbol{a}\\rvert \\lvert\\boldsymbol{b}\\rvert}.\\]

\n

In part a) therefore, we have

\n

\\[\\cos(\\theta)=\\frac{\\var{dot(a,b)}}{\\var{precround(lena,2)}\\times\\var{precround(lenb,2)}}=\\frac{\\var{dot(a,b)}}{\\var{precround(lena*lenb,2)}}=\\var{ans1} \\; \\text{to 2d.p.,}\\]

\n

Which gives an angle $\\theta =\\var{ansrad}$ radians to 1 d.p.

", "metadata": {"description": "

Find the dot product and the angle between two vectors

", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "tags": [], "statement": "

Find the angle  $\\theta$  between the following pairs of vectors.

", "ungrouped_variables": ["a", "lenb", "c", "b", "lenc", "d", "lend", "ans1", "ans2", "lena", "ansrad", "ansrad2", "dot_of_ab", "dot_of_cd"], "type": "question"}, {"name": "Angle between two vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}], "parts": [{"variableReplacements": [], "showCorrectAnswer": true, "prompt": "

Angle in degrees = [[0]]$^{\\circ}$

\n

Angle in radians = [[1]]radians.

\n

Note that you can input the radians as a decimal to 4 decimal places or as a mulptiple of $\\pi$. You input $\\pi$ as pi.

", "marks": 0, "unitTests": [], "scripts": {}, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "sortAnswers": false, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "gaps": [{"variableReplacements": [], "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "unitTests": [], "scripts": {}, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "allowFractions": false, "correctAnswerFraction": false, "maxValue": "{angle}", "customMarkingAlgorithm": "", "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "{angle}", "showFeedbackIcon": true}, {"variableReplacements": [], "showCorrectAnswer": true, "marks": 1, "unitTests": [], "scripts": {}, "checkingType": "absdiff", "expectedVariableNames": [], "answer": "{precround(angle*pi/180,4)}", "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.0001, "customMarkingAlgorithm": "", "type": "jme", "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "showPreview": true, "checkVariableNames": false, "failureRate": 1, "showFeedbackIcon": true}], "showFeedbackIcon": true}], "functions": {}, "advice": "

Bruker formelen:

\n

$\\boldsymbol{A \\cdot B} = |\\boldsymbol{A}||\\boldsymbol{B}|\\cos(\\theta)$ der $\\theta$ er vinkelen mellom vektorene.

\n

Her er $|\\boldsymbol{A}| = \\sqrt{ (\\var{s1})^2+(\\var{s2})^2} = \\simplify[all]{sqrt({s1^2+s2^2})},\\;\\;\\;|\\boldsymbol{B}| = \\sqrt{ (\\var{s3})^2+(\\var{s4})^2} = \\simplify[all]{sqrt({s3^2+s4^2})}$

\n

og

\n

$\\boldsymbol{A \\cdot B} = (\\var{fa},\\var{sa}, \\var{ta}) \\cdot (\\var{fb},\\var{sb}, \\var{tb}) = \\var{g}$.

\n

Slik at \\[\\begin{eqnarray*} \\cos(\\theta)&=&\\frac{\\var{g}}{\\sqrt{2}\\sqrt{2}} = \\simplify[std]{{g}/{2}}\\\\ \\Rightarrow \\theta &=&\\arccos\\left(\\simplify[std]{{g}/{2}}\\right)\\\\ &=&\\var{angle}\\,^{\\circ} \\end{eqnarray*} \\]
Konvertering fra grader til radianer gjøres ved å multiplisere vinkel i grader med $\\displaystyle \\frac{\\pi}{180}$.

\n

Da blir $\\displaystyle \\var{angle}\\,^{\\circ}=\\simplify[std]{({angle}*pi)/{180}= {precround(angle*pi/180,4)}}$ radianer i 4 siffers nøyaktighet.

", "statement": "

Given the vectors
$\\mathbf{a}=\\var{fa}\\mathbf{i}+\\var{sa}\\mathbf{j}+\\var{ta}\\mathbf{k},\\;\\;\\;\\mathbf{b}=\\var{fb}\\mathbf{i}+\\var{sb}\\mathbf{j}+ \\var{tb}\\mathbf{k}$

\n

Find the angle between these vectors in degrees and radians.

\n

Note that the angle must be between $0\\,^{\\circ}$ and $180\\,^{\\circ}$ (between $0$ and $\\pi$ radians)

", "tags": [], "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["s1", "a", "s4", "fa", "angle", "g", "fb", "tb", "sb", "ta", "c", "sa", "s2", "s3", "u", "d", "b", "t"], "variables": {"a": {"definition": "if(t=1,2,1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "a"}, "s4": {"definition": "if(s1=s3 ,-s2,random(-1,1))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s4"}, "fa": {"definition": "if(t=1,0,s1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "fa"}, "angle": {"definition": "precround(180/pi*arccos(g/2),1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "angle"}, "s1": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s1"}, "fb": {"definition": "if(u=1,0,s3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "fb"}, "tb": {"definition": "if(u=3,0,s4)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "tb"}, "sb": {"definition": "if(u=2,0,if(u=1,s3,s4))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "sb"}, "ta": {"definition": "if(t=3,0,s2)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "ta"}, "c": {"definition": "if(u=1,2,1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "c"}, "sa": {"definition": "if(t=2,0,if(t=1,s1,s2))", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "sa"}, "s2": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s2"}, "s3": {"definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "s3"}, "u": {"definition": "random(1,2,3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "u"}, "d": {"definition": "if(u=3,2,3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "d"}, "b": {"definition": "if(t=3,2,3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "b"}, "g": {"definition": "{fa*fb+sa*sb+ta*tb}", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "g"}, "t": {"definition": "random(1,2,3)", "group": "Ungrouped variables", "templateType": "anything", "description": "", "name": "t"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the angle between two vectors

"}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variable_groups": [], "type": "question"}, {"name": "Cross product", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}], "statement": "

Given the vectors:
\\[{\\bf a}=\\simplify{{a} v:i+{b}v:j+{g}v:k},\\;\\;\\;{\\bf b}=\\simplify[std]{{c}v:i+{d}v:j+{f}v:k}\\]

\n

answer the following question:

", "metadata": {"description": "

Given vectors $\\boldsymbol{a,\\;b}$, find $\\boldsymbol{a\\times b}$

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"s4": {"group": "Ungrouped variables", "description": "", "definition": "random(1,-1)", "name": "s4", "templateType": "anything"}, "f": {"group": "Ungrouped variables", "description": "", "definition": "random(2..9)", "name": "f", "templateType": "anything"}, "c": {"group": "Ungrouped variables", "description": "", "definition": "s3*random(2..9)", "name": "c", "templateType": "anything"}, "inner": {"group": "Ungrouped variables", "description": "", "definition": "{a*c+b*d+f*g}", "name": "inner", "templateType": "anything"}, "g": {"group": "Ungrouped variables", "description": "", "definition": "s1*random(2..9)", "name": "g", "templateType": "anything"}, "s2": {"group": "Ungrouped variables", "description": "", "definition": "random(1,-1)", "name": "s2", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "description": "", "definition": "s1*random(2..9)", "name": "a", "templateType": "anything"}, "d": {"group": "Ungrouped variables", "description": "", "definition": "s4*random(2..9)", "name": "d", "templateType": "anything"}, "b": {"group": "Ungrouped variables", "description": "", "definition": "s2*random(2..9)", "name": "b", "templateType": "anything"}, "s1": {"group": "Ungrouped variables", "description": "", "definition": "random(1,-1)", "name": "s1", "templateType": "anything"}, "s3": {"group": "Ungrouped variables", "description": "", "definition": "random(1,-1)", "name": "s3", "templateType": "anything"}, "s5": {"group": "Ungrouped variables", "description": "", "definition": "random(1,-1)", "name": "s5", "templateType": "anything"}}, "functions": {}, "tags": [], "parts": [{"type": "gapfill", "scripts": {}, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "gaps": [{"type": "numberentry", "scripts": {}, "extendBaseMarkingAlgorithm": true, "maxValue": "{b*f-g*d}", "showFeedbackIcon": true, "correctAnswerFraction": false, "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "{b*f-g*d}", "allowFractions": false, "marks": 6, "mustBeReducedPC": 0, "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "showCorrectAnswer": true}, {"type": "numberentry", "scripts": {}, "extendBaseMarkingAlgorithm": true, "maxValue": "{g*c-a*f}", "showFeedbackIcon": true, "correctAnswerFraction": false, "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "{g*c-a*f}", "allowFractions": false, "marks": 6, "mustBeReducedPC": 0, "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "showCorrectAnswer": true}, {"type": "numberentry", "scripts": {}, "extendBaseMarkingAlgorithm": true, "maxValue": "{a*d-b*c}", "showFeedbackIcon": true, "correctAnswerFraction": false, "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "mustBeReduced": false, "variableReplacementStrategy": "originalfirst", "minValue": "{a*d-b*c}", "allowFractions": false, "marks": 6, "mustBeReducedPC": 0, "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "unitTests": [], "showCorrectAnswer": true}], "customMarkingAlgorithm": "", "prompt": "

Find ${{\\bf a}\\times {\\bf b}} =\\;\\;$ [[0]]${\\bf i}+ $[[1]]${\\bf j}+ $[[2]]${\\bf k}$

", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "marks": 0, "variableReplacements": [], "unitTests": [], "showCorrectAnswer": true}], "advice": "

\\[ \\begin{eqnarray*} \\boldsymbol{a\\times b}&=& \\begin{vmatrix} \\boldsymbol{i} & \\boldsymbol{j} &\\boldsymbol{k}\\\\ \\var{a} & \\var{b} & \\var{g}\\\\ \\var{c} & \\var{d} & \\var{f} \\end{vmatrix}\\\\ \\\\ &=&\\simplify[]{({b}*{f}-{g}*{d})v:i + ({g}*{c} - {a}*{f})v:j+({a}*{d}-{b}*{c})v:k}\\\\ \\\\ &=&\\simplify[std]{{b*f-g*d}v:i+{g*c-a*f}v:j+{a*d-b*c}v:k} \\end{eqnarray*} \\]

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variable_groups": [], "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s3", "s2", "s1", "s5", "s4", "inner"], "type": "question"}, {"name": " Vectors: when perpendicular 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}], "statement": "

Given the vectors:
\\[\\mathbf{a}=\\simplify[std]{{a}v:i+{b}v:j+lambda*v:k},\\;\\;\\;\\mathbf{b}=\\simplify[std]{{c}v:i+{d}v:j+{f}v:k}\\]

", "variable_groups": [], "functions": {}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s3", "s2", "s1", "s5", "s4"], "tags": [], "advice": "

a)

\n

$\\boldsymbol{A}$ and $\\boldsymbol{B}$ are perpendicular to one another when $\\boldsymbol{A \\cdot B} = 0$.

\n

Now \\[ \\begin{eqnarray*}\\boldsymbol{A \\cdot B} &=& \\simplify[]{{a}*{c}+{b}*{d}+lambda*{f}}\\\\ &=& \\simplify[std]{{f}*lambda+{a*c+b*d}} \\end{eqnarray*} \\]
Hence \\[\\boldsymbol{A \\cdot B} = 0 \\Rightarrow \\simplify[std]{{f}*lambda+{a*c+b*d}=0} \\Rightarrow \\lambda = \\simplify[std]{{-a*c-b*d}/{f}}\\]

\n

b)

\n

$\\boldsymbol{A}$ is in the $xy$ plane when $\\lambda=0$.

", "parts": [{"sortAnswers": false, "gaps": [{"vsetRangePoints": 5, "showPreview": true, "expectedVariableNames": [], "variableReplacements": [], "type": "jme", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "failureRate": 1, "variableReplacementStrategy": "originalfirst", "answerSimplification": "std", "checkVariableNames": false, "vsetRange": [0, 1], "unitTests": [], "checkingAccuracy": 0.001, "notallowed": {"message": "

Enter as a fraction or an integer and not as a decimal.

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "marks": 1.5, "checkingType": "absdiff", "answer": "{-a*c-b*d}/{f}", "scripts": {}}], "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "prompt": "

Find $\\lambda$ such that $\\mathbf{a}$ and $\\mathbf{b}$ are perpendicular to one another:

\n

$\\lambda =\\;\\;$ [[0]].

\n

Enter your answer as a fraction or an integer and not as a decimal.

", "showFeedbackIcon": true, "marks": 0, "scripts": {}}, {"sortAnswers": false, "gaps": [{"mustBeReduced": false, "maxValue": "{0}", "variableReplacements": [], "type": "numberentry", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "unitTests": [], "correctAnswerFraction": false, "extendBaseMarkingAlgorithm": true, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "marks": 0.5, "mustBeReducedPC": 0, "minValue": "{0}", "allowFractions": false, "scripts": {}, "notationStyles": ["plain", "en", "si-en"]}], "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "prompt": "

Find $\\lambda$ such that $\\mathbf{a}$ is in the $xy$ plane:

\n

$\\lambda =\\;\\;$ [[0]].

", "showFeedbackIcon": true, "marks": 0, "scripts": {}}], "metadata": {"description": "

When are vectors $\\boldsymbol{A,\\;B}perpendicular?

", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"js": "", "css": ""}, "variables": {"s3": {"name": "s3", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "random(1,-1)"}, "c": {"name": "c", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "s3*random(2..9)"}, "s1": {"name": "s1", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "random(1,-1)"}, "a": {"name": "a", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "s1*random(2..9)"}, "g": {"name": "g", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "s1*random(2..9)"}, "d": {"name": "d", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "s4*random(2..9)"}, "b": {"name": "b", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "s2*random(2..9)"}, "f": {"name": "f", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "random(2,4,5,10)"}, "s5": {"name": "s5", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "random(1,-1)"}, "s4": {"name": "s4", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "random(1,-1)"}, "s2": {"name": "s2", "group": "Ungrouped variables", "description": "", "templateType": "anything", "definition": "random(1,-1)"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question"}]}], "name": "Vectors - Ex. Sheet 2 ", "showQuestionGroupNames": false, "percentPass": "0", "showstudentname": true, "feedback": {"intro": "", "feedbackmessages": [], "showanswerstate": true, "allowrevealanswer": true, "showactualmark": true, "advicethreshold": 0, "showtotalmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "timing": {"timeout": {"action": "none", "message": ""}, "allowPause": true, "timedwarning": {"action": "none", "message": ""}}, "navigation": {"showfrontpage": false, "reverse": true, "allowregen": true, "preventleave": true, "showresultspage": "oncompletion", "browse": true, "onleave": {"action": "none", "message": ""}}, "duration": 0, "type": "exam", "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}, {"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}, {"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}], "extensions": [], "custom_part_types": [], "resources": []}