// Numbas version: exam_results_page_options {"name": "Describe (one-component) vectors in terms of base vectors, add and find magnitude", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

a)

\n

Vector $\\boldsymbol{q}$ has no horizontal component and a vertical length of $\\var{q}$, therefore

\n

\\[ \\boldsymbol{q} =0\\boldsymbol{i}+\\var{q}\\boldsymbol{j} =\\var{q}\\boldsymbol{j}\\text{.} \\]

\n

Vector $\\boldsymbol{r}$ has no vertical component and a horizontal length of $\\var{r}$, therefore 

\n

\\[\\boldsymbol{r} = \\var{r}\\boldsymbol{i} +0\\boldsymbol{j}= \\var{r}\\boldsymbol{i}\\text{.} \\]

\n

Vector $\\boldsymbol{s}$ has no horizontal component and a vertical length of $\\var{s}$ in the negative direction, therefore 

\n

\\[\\boldsymbol{s} = 0\\boldsymbol{i}-\\var{s}\\boldsymbol{j}=-\\var{s}\\boldsymbol{j}\\text{.} \\]

\n

Vector $\\boldsymbol{t}$ has no vertical component and a horizontal length of $\\var{t}$ in the negative direction, therefore 

\n

\\[\\boldsymbol{t} = -\\var{t}\\boldsymbol{i}+0\\boldsymbol{j} =-\\var{t}\\boldsymbol{i}\\text{.} \\]

\n

b)

\n

Now that we have our vectors in component form we can compute $\\boldsymbol{u} =\\boldsymbol{q}+\\boldsymbol{r}$:

\n

\\[ \\boldsymbol{u} = \\boldsymbol{q}+\\boldsymbol{r} = \\var{r}\\boldsymbol{i} + \\var{q}\\boldsymbol{j}\\text{.} \\]

\n

Note that this is a vector which points diagonally up and right.

\n

c)

\n

We can follow a similar procedure to obtain the vector $\\boldsymbol{v} = \\boldsymbol{r}+\\boldsymbol{s}+2\\boldsymbol{t}$.

\n

\\begin{align}
\\boldsymbol{v} = \\boldsymbol{r}+\\boldsymbol{s}+2\\boldsymbol{t}
&= \\var{r}\\boldsymbol{i}-\\var{s}\\boldsymbol{j}-2\\left( \\var{t}\\boldsymbol{i}\\right)  \\\\ 
&= \\var{r}\\boldsymbol{i}-\\var{s}\\boldsymbol{j}-\\var{2*t}\\boldsymbol{i} \\\\
&= \\var{r-2*t}\\boldsymbol{i}-\\var{s}\\boldsymbol{j}\\text{.}
\\end{align}

\n

d)

\n

We can find the maginitude of the vector $\\boldsymbol{v}$ by using Pythagoras' Rule. The magnitude is the length of the hypotenuse of a triangle with sides $\\var{abs(vi)}$ and $\\var{abs(vj)}$.

\n

\\[\\lvert\\boldsymbol{v}\\rvert = \\sqrt{\\var{abs(vi)}^2+\\var{abs(vj)}^2} = \\var{dpformat(sqrt(vi^2+vj^2),1)}\\text{.} \\]

", "statement": "

Consider the four vectors, $\\boldsymbol{q}$, $\\boldsymbol{r}$, $\\boldsymbol{s}$ and $\\boldsymbol{t}$, acting from A to, respectively, the points B, C, D and E.

\n

{vector_plot()}

\n
", "variables": {"t": {"name": "t", "group": "Random Variables", "definition": "random(3..4)", "templateType": "anything", "description": ""}, "r": {"name": "r", "group": "Random Variables", "definition": "random(2..4)", "templateType": "anything", "description": ""}, "q": {"name": "q", "group": "Random Variables", "definition": "random(4..5)", "templateType": "anything", "description": ""}, "s": {"name": "s", "group": "Random Variables", "definition": "random(2..5 except q)", "templateType": "anything", "description": ""}, "vj": {"name": "vj", "group": "Computed variables", "definition": "-s", "templateType": "anything", "description": "

j component of v

"}, "vi": {"name": "vi", "group": "Computed variables", "definition": "(r-2*t)", "templateType": "anything", "description": "

i component of v

"}}, "tags": [], "ungrouped_variables": [], "functions": {"unit_vectors": {"language": "javascript", "type": "html", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('150px','150px',{boundingBox:[0.3,2.4,2.4,0.3],grid:true,axis:false,});\n \nvar board = div.board;\ngrid = board.create('grid', [], {strokeColor: '#333'}); \n\n// points\np1 = board.create('point', [1,1], {size:1,name:'', fixed:true, showInfobox: false});\n\n// arrows\nvar a1 = board.create('line',[[1,1],[2,1]], {straightFirst:false, straightLast:false, strokeWidth:2, strokeColor:'blue', lastArrow:true});\nvar a2 = board.create('line',[[1,1],[1,2]], {straightFirst:false, straightLast:false, strokeWidth:2, strokeColor:'blue', lastArrow:true });\n\nt1 = board.create('text',[1.4,0.7,'i'],{fontsize: 20, color: 'blue'});\nt2 = board.create('text',[0.6,1.7,'j'],{fontsize: 20, color: 'blue'});\n\nreturn div"}, "vector_plot": {"language": "javascript", "type": "html", "parameters": [], "definition": "var q = Numbas.jme.unwrapValue(question.scope.variables.q);\nvar r = Numbas.jme.unwrapValue(question.scope.variables.r);\nvar s = Numbas.jme.unwrapValue(question.scope.variables.s);\nvar t = Numbas.jme.unwrapValue(question.scope.variables.t);\n\nvar mx = Math.max(q,r,s,t)+0.5\n\nvar div = Numbas.extensions.jsxgraph.makeBoard('350px','350px',{boundingBox:[-mx,mx,mx,-mx],grid:true,axis:false,});\n \nvar board = div.board;\ngrid = board.create('grid', [], {strokeColor: '#555'}); \n\n\n\n// points\np1 = board.create('point', [0,0], {size:3,name:'A', fixed:true, showInfobox: false, label:{fontsize:16,offset:[-20,-10]}});\np2 = board.create('point', [0,q], {size:3,name:'B', fixed:true, showInfobox: false, label:{fontsize:16,offset:[-20,-5]}});\np3 = board.create('point', [r,0], {size:3,name:'C', fixed:true, showInfobox: false, label:{fontsize:16,offset:[-10,-20]}});\np4 = board.create('point', [0,-s], {size:3,name:'D', fixed:true, showInfobox: false, label:{fontsize:16,offset:[-20,-5]}});\np5 = board.create('point', [-t,0], {size:3,name:'E', fixed:true, showInfobox: false, label:{fontsize:16,offset:[-10,-20]}});\n\n// arrows\nvar a1 = board.create('line',[p1,p2], {straightFirst:false, straightLast:false, strokeWidth:2, strokeColor:'blue', lastArrow:true, touchFirstPoint:true, touchLastPoint:true });\nvar a2 = board.create('line',[p1,p3], {straightFirst:false, straightLast:false, strokeWidth:2, strokeColor:'blue', lastArrow:true, touchFirstPoint:true, touchLastPoint:true });\nvar a3 = board.create('line',[p1,p4], {straightFirst:false, straightLast:false, strokeWidth:2, strokeColor:'blue', lastArrow:true, touchFirstPoint:true, touchLastPoint:true });\nvar a4 = board.create('line',[p1,p5], {straightFirst:false, straightLast:false, strokeWidth:2, strokeColor:'blue', lastArrow:true, touchFirstPoint:true, touchLastPoint:true });\n\n\nt1 = board.create('text',[0.2,q/2,'q'],{fontsize: 20, color: 'blue'});\nt2 = board.create('text',[r/2,0.4,'r'],{fontsize: 20, color: 'blue'});\nt3 = board.create('text',[0.2,-s/2,'s'],{fontsize: 20, color: 'blue'});\nt4 = board.create('text',[-t/2,0.4,'t'],{fontsize: 20, color: 'blue'});\n\nreturn div"}}, "name": "Describe (one-component) vectors in terms of base vectors, add and find magnitude", "preamble": {"js": "", "css": ""}, "extensions": ["jsxgraph"], "type": "question", "variable_groups": [{"variables": ["q", "r", "s", "t"], "name": "Random Variables"}, {"variables": ["vi", "vj"], "name": "Computed variables"}], "rulesets": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"description": "

This question introduces base vectors i and j and asks the student to interpret a JSXGraph diagram to write four vectors in terms of the base vectors. Further parts ask the student to add vectors and find a magnitude.

", "licence": "Creative Commons Attribution 4.0 International"}, "parts": [{"scripts": {}, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "0", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "0", "showCorrectAnswer": true, "type": "numberentry", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "q", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "q", "showCorrectAnswer": true, "type": "numberentry", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "r", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "r", "showCorrectAnswer": true, "type": "numberentry", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "0", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "0", "showCorrectAnswer": true, "type": "numberentry", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "0", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "0", "showCorrectAnswer": true, "type": "numberentry", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "-s", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "-s", "showCorrectAnswer": true, "type": "numberentry", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "-t", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "-t", "showCorrectAnswer": true, "type": "numberentry", "marks": "0.5", "showFeedbackIcon": true}, {"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [], "mustBeReducedPC": 0, "minValue": "0", "correctAnswerFraction": false, "allowFractions": false, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "0", "showCorrectAnswer": true, "type": "numberentry", "marks": "0.5", "showFeedbackIcon": true}], "type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "prompt": "

Vectors can be written in terms of their components by defining base vectors: let $\\boldsymbol{i}$ be a vector of length 1 unit in the horizontal direction and $\\boldsymbol{j}$ a vector of length 1 unit in the vertical direction.

\n

{unit_vectors()}

\n

Write each of the vectors $\\boldsymbol{q}$, $\\boldsymbol{r}$, $\\boldsymbol{s}$ and $\\boldsymbol{t}$ in terms of the base vectors $\\boldsymbol{i}$ and $\\boldsymbol{j}$. Enter $0$ if there is no component.

\n

$\\boldsymbol{q} = $ [[0]] $\\boldsymbol{i}$ +  [[1]] $\\boldsymbol{j}$

\n

$\\boldsymbol{r} = $ [[2]] $\\boldsymbol{i}$ + [[3]] $\\boldsymbol{j}$

\n

$\\boldsymbol{s} = $ [[4]] $\\boldsymbol{i}$ + [[5]] $\\boldsymbol{j}$

\n

$\\boldsymbol{t} = $ [[6]] $\\boldsymbol{i}$ + [[7]] $\\boldsymbol{j}$

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

What are the components of the vector $\\boldsymbol{u} = \\boldsymbol{q}+\\boldsymbol{r}$?

\n

$u$ = [[0]] $\\boldsymbol{i}$ + [[1]] $\\boldsymbol{j}$

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

What are the components of the vector $\\boldsymbol{v} = \\boldsymbol{r}+\\boldsymbol{s}+2\\boldsymbol{t}$?

\n

$\\boldsymbol{v}$ = [[0]] $\\boldsymbol{i}$ + [[1]] $\\boldsymbol{j}$

", "variableReplacements": [], "showFeedbackIcon": true}, {"scripts": {}, "showCorrectAnswer": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "variableReplacements": [{"part": "p2g0", "variable": "vi", "must_go_first": false}, {"part": "p2g1", "variable": "vj", "must_go_first": false}], "mustBeReducedPC": 0, "precisionPartialCredit": 0, "precision": "1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "minValue": "sqrt(vi^2+vj^2)", "allowFractions": false, "correctAnswerStyle": "plain", "precisionType": "dp", "scripts": {}, "maxValue": "sqrt(vi^2+vj^2)", "showCorrectAnswer": true, "strictPrecision": false, "type": "numberentry", "showPrecisionHint": true, "marks": 1, "showFeedbackIcon": true, "precisionMessage": "You have not given your answer to the correct precision."}], "type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "prompt": "

What is the magnitude of the vector $\\boldsymbol{v}$?

\n

$\\lvert{\\boldsymbol{v}}\\rvert = $ [[0]]

", "variableReplacements": [], "showFeedbackIcon": true}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}]}]}], "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}]}