// Numbas version: finer_feedback_settings {"name": "Vector operations", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [["question-resources/crane.svg", "afd7d3c65873afd2087e7da2875ad43abfe6420abd6dd35391e4d1e1dfae0048.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "feedback": {"showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "allowrevealanswer": true, "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview"}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Vector operations", "tags": [], "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "
Vectors can be combined by adding, subtracting and multiplying by a number. To do this, we follow the usual rules of algebra where $\\vec{i}$ and $\\vec{j}$ are treated as variables. For example, $$(2\\vec{i}+\\vec{j})+(3\\vec{i}+5\\vec{j})=5\\vec{i}+6\\vec{j}$$and$$2(4\\vec{i}-\\vec{j})=8\\vec{i}-2\\vec{j}.$$Vectors are never multiplied together. However, if you do more maths in the future you may come across two operations known as the dot product and the cross product which share some properties with multiplication.
\nGraphically, given vectors $\\vec{u}$ and $\\vec{v}$, the sum $\\vec{u}+\\vec{v}$ is drawn as follows: create a path by placing the vectors $\\vec{u}$ and $\\vec{v}$ tip-to-tail, and draw the vector from the start to the end of the path. We can also add multiple vectors together in this way.
\n{additionexample}
\nSimilarly, given a vector $\\vec{v}$, the vector $2\\vec{v}$ has the same direction but twice the length, and $-\\vec{v}=-1\\vec{v}$ has the same length but points in the opposite direction. Try dragging the tip of the vector below.
\n{scalarexample}
", "advice": "", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"additionexample": {"name": "additionexample", "group": "Ungrouped variables", "definition": "jessiecode(300,300,[-4.5,4.5,4.5,-4.5],safe(\"\"\"\n \n a = point(-1,-3) <<\n id:\"A\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n b = point(3,2) <<\n id:\"B\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n c = point(-3,3) <<\n id:\"C\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n \n \n u = arrow(a,b) <<\n strokeWidth:3,highlight:false,color:\"SeaGreen\",\n withLabel: true, name: \"$\\\\\\\\vec{u}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.5fr right',\n highlight:false >>\n >>;\n \n v = arrow(b,c) <<\n strokeWidth:3,highlight:false,color:\"SeaGreen\",\n withLabel: true, name: \"$\\\\\\\\vec{v}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.5fr right',\n highlight:false >>\n >>;\n \n w = arrow(a,c) <<\n strokeWidth:3,highlight:false,color:\"FireBrick\",dash:3,\n withLabel: true, name: \"$\\\\\\\\vec{u}+\\\\\\\\vec{v}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.5fr left',\n highlight:false >>\n >>;\n \n \n vx = function() {return trunc(b.X()-a.X(),1);};\n vy = function() {return trunc(b.Y() - a.Y(),1);};\n sign = function() {if (vy() < 0) {return \"\";} else {return \"+\";}};\n\n\n \n \n\"\"\"),\n[\n \"showNavigation\": false, \"axis\":false,\n \"zoom\": [\"enabled\": false], pan: [\"enabled\": false]\n])", "description": "", "templateType": "anything", "can_override": false}, "crane": {"name": "crane", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-5,55,55,-5],\n [\n ['image', ['resources/question-resources/crane.svg',[-4,0], [30,50]],\n [\"fixed\":true, \"highlight\":false]],\n \n ['point', [20,30], [\"id\":\"A\",\"size\":0,\"withLabel\":false,\"fixed\":true]],\n ['point', [15,20], [\"id\":\"B\",\"size\":0,\"withLabel\":false,\"fixed\":true]],\n ['point', [20,5], [\"id\":\"C\",\"size\":0,\"withLabel\":false,\"fixed\":true]],\n ['point', [40,25], [\"id\":\"D\",\"size\":0,\"withLabel\":false,\"fixed\":true]],\n \n ['arrow', ['A','B'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{W}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.6,\n \"position\": '0.9fr right',\n \"fontSize\":15,\n \"highlight\":false\n ]\n ]],['arrow', ['A','C'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{G}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '1.0fr left',\n \"highlight\":false,\n \"fontSize\":15\n ]\n ]],['arrow', ['A','D'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{C}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.3,\n \"position\": '0.95fr left',\n \"highlight\":false,\n \"fontSize\":15\n ]\n ]],\n ],\n [\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "triangle": {"name": "triangle", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-1,6,6,-1],\n [\n ['point', [0.2,0.2], [\"id\":\"P\",\"size\":2,\"name\":\"$P$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorY\":\"top\",\n \"anchorX\":\"right\",\n \"offset\":[0,0],\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]],\n \n ['point', [4.8,2.7], [\"id\":\"Q\",\"size\":2,\"name\":\"$Q$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorY\":\"middle\",\n \"anchorX\":\"left\",\n \"offset\":[5,0],\n \"fontSize\":20,\n \"highlight\":false,\n ]\n ]],\n \n ['point', [1.5,4.8], [\"id\":\"R\",\"size\":2,\"name\":\"$R$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorY\":\"bottom\",\n \"anchorX\":\"middle\",\n \"offset\":[0,0],\n \"fontSize\":20,\n \"highlight\":false\n ]\n ]],\n ['arrow', ['Q','R'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{a}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['arrow', ['Q', 'P'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{b}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n ['arrow', ['P','R'], [\"strokeWidth\":2,\"name\":\"$\\\\vec{c}$\",\"withLabel\":true,\n \"fixed\":true,\"highlight\":false,\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr left',\n \"fontSize\":25,\n \"highlight\":false\n ]\n ]],\n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "addition": {"name": "addition", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-1,6,6,-1],\n [\n \n ['point', [4.8,5], [\"id\":\"P\",\"size\":15,\"withLabel\":false,\n \"fixed\":false, \"showInfoBox\": false,\n \"strokeWidth\": 0, \"highlightStrokeWidth\": 0,\n \"fillOpacity\": 0, \"highlightFillOpacity\": 0.2,\n \"fillColor\": \"orange\", \"highlightFillColor\": \"orange\"]],\n \n ['point', [1.5,5], [\"id\":\"Q\",\"size\":15,\"withLabel\":false,\n \"fixed\":false, \"showInfoBox\": false,\n \"strokeWidth\": 0, \"highlightStrokeWidth\": 0,\n \"fillOpacity\": 0, \"highlightFillOpacity\": 0.2,\n \"fillColor\": \"orange\", \"highlightFillColor\": \"orange\"]],\n \n ['arrow', ['P','Q'], [\"id\":\"a\",\"strokeWidth\":3,\"withLabel\":false,\n \"fixed\":false,\"highlight\":false,\"color\":\"green\"]],\n \n ['arrow',[[0,0],[5,2]],[\"id\":\"u\",\"strokeWidth\":2,\"fixed\":false,\n \"withLabel\":true,\"name\":\"$\\\\vec{u}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]]\n ],\n \n ['arrow',[[1,1],[-0.5,3.5]],[\"id\":\"v\",\"strokeWidth\":2,\"fixed\":false,\n \"withLabel\":true,\"name\":\"$\\\\vec{v}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]]\n ]\n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "subtraction": {"name": "subtraction", "group": "Ungrouped variables", "definition": "jsxgraph(\n 300, 300, [-1,6,6,-1],\n [\n \n ['point', [0,0], [\"id\":\"P\",\"size\":15,\"withLabel\":false,\n \"fixed\":false, \"showInfoBox\": false,\n \"strokeWidth\": 0, \"highlightStrokeWidth\": 0,\n \"fillOpacity\": 0, \"highlightFillOpacity\": 0.2,\n \"fillColor\": \"orange\", \"highlightFillColor\": \"orange\"]],\n \n ['point', [4,1], [\"id\":\"Q\",\"size\":15,\"withLabel\":false,\n \"fixed\":false, \"showInfoBox\": false,\n \"strokeWidth\": 0, \"highlightStrokeWidth\": 0,\n \"fillOpacity\": 0, \"highlightFillOpacity\": 0.2,\n \"fillColor\": \"orange\", \"highlightFillColor\": \"orange\"]],\n \n ['arrow', ['P','Q'], [\"id\":\"a\",\"strokeWidth\":3,\"withLabel\":false,\n \"fixed\":false,\"highlight\":false,\"color\":\"green\"]],\n \n ['arrow',[[0,5],[5,5]],[\"id\":\"u\",\"strokeWidth\":2,\"fixed\":false,\n \"withLabel\":true,\"name\":\"$\\\\vec{u}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.2,\n \"position\": '0.5fr left',\n \"fontSize\":20,\n \"highlight\":false\n ]]\n ],\n \n ['arrow',[[1,4],[4.5,2]],[\"id\":\"v\",\"strokeWidth\":2,\"fixed\":false,\n \"withLabel\":true,\"name\":\"$\\\\vec{v}$\",\n \"label\": [\n \"anchorX\": 'middle',\n \"anchorY\": 'middle',\n \"offset\": [0, 0],\n \"distance\": 1.5,\n \"position\": '0.5fr right',\n \"fontSize\":20,\n \"highlight\":false\n ]]\n ]\n \n ],\n [\"axis\":false,\"pan\":[\"enabled\":false],\"zoom\":[\"enabled\":false]]\n)", "description": "", "templateType": "anything", "can_override": false}, "vectortemp": {"name": "vectortemp", "group": "Ungrouped variables", "definition": "jessiecode(300,300,[-4.5,4.5,4.5,-4.5],safe(\"\"\"\n \n a = point(0,0) <<\n id:\"A\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n b = point(3,2) <<\n id:\"B\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n v = arrow(a,b) <<\n strokeWidth:3,highlight:false,color:\"SeaGreen\"\n >>;\n \n vx = function() {return trunc(b.X()-a.X(),1);};\n vy = function() {return trunc(b.Y() - a.Y(),1);};\n sign = function() {if (vy() < 0) {return \"\";} else {return \"+\";}};\n \n t = text(4,-4,function() {return \"$\" + vx() + \"\\\\\\\\vec{i}\" + sign() + vy() + \"\\\\\\\\vec{j}$\";}) <<\n anchorX:\"right\", anchorY:\"bottom\",\n fontSize:18, frozen:true, highlight:false\n >>;\n \n back = polygon([0.2,-3.1],[4.1,-3.1],[4.1,-4.1],[0.2,-4.1]) <<\n withLines: false, highlight: false, frozen: true,\n fillColor: \"#E8E8E8\", fillOpacity:1,\n vertices: << visible: false >>\n >>;\n \n reset = button(4.25,4.25,\"reset\",function() {\n A.X=0;A.Y=0;B.X=3;B.Y=2;\n }) <<\n anchorX:\"right\",anchorY:\"top\", fixed:true, highlight:false,\n cssStyle: \"border-radius:3px\"\n >>;\n \n \n\"\"\"),\n[\n \"showNavigation\": false,\n \"zoom\": [\"enabled\": false], pan: [\"enabled\": false],\n \"DefaultAxes\":[\n \"x\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]],\n \"y\":[\"highlight\":false,\"fixed\":true,\n \"ticks\":[\"minorTicks\":0,\"insertTicks\":false]]\n ]\n])", "description": "", "templateType": "anything", "can_override": false}, "scalarexample": {"name": "scalarexample", "group": "Ungrouped variables", "definition": "jessiecode(300,300,[-4.5,4.5,4.5,-4.5],safe(\"\"\"\n \n\n a = point(-1,-1) <<\n size: 3, color: \"black\", showInfoBox: false, highlight: false,\n withLabel: false, fixed: true\n >>;\n \n b = point(1,1) <<\n id:\"B\", size:15, withLabel:false, showInfoBox:false,\n strokeWidth:0,highlightStrokeWidth:0,\n fillOpacity:0,highlightFillOpacity:0.2,\n fillColor:\"orange\",highlightFillColor:\"orange\"\n >>;\n \n b2 = point(\n function() {return 2*b.X()-a.X();},\n function() {return 2*b.Y()-a.Y();})\n << visible: false >>;\n \n b3 = point(\n function() {return 2*a.X()-b.X();},\n function() {return 2*a.Y()-b.Y();})\n << visible: false >>;\n \n \n \n v2 = arrow(a,b2) <<\n strokeWidth:3,highlight: false, color:\"CornflowerBlue\",\n withLabel: true, name: \"$2\\\\\\\\vec{v}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.8fr right',\n highlight: false, layer:8 >>\n >>;\n \n v = arrow(a,b) <<\n strokeWidth:3,highlight: false, color:\"SeaGreen\",\n withLabel: true, name: \"$\\\\\\\\vec{v}$\", fixed: false,\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.5, position: '0.5fr right',\n highlight: false, layer: 12 >>\n >>;\n \n \n v3 = arrow(a,b3) <<\n strokeWidth:3,highlight:false,color:\"FireBrick\",\n withLabel: true, name: \"$-\\\\\\\\vec{v}$\",\n label: << fontSize: 20, anchorX: 'middle', anchorY: 'middle',\n offset: [0, 0], distance: 1.2, position: '0.8fr left',\n highlight: false, layer:8 >>\n >>;\n \n\n \n \n\"\"\"),\n[\n \"showNavigation\": false, \"axis\":false,\n \"zoom\": [\"enabled\": false], pan: [\"enabled\": false]\n])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["additionexample", "crane", "triangle", "addition", "subtraction", "vectortemp", "scalarexample"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Calculate the following expressions. Make sure to write your answers as vectors!
\n$(\\vec{i}+3\\vec{j})+(4\\vec{i}-\\vec{j})=$ [[0]]
\n$(2\\vec{i}-2\\vec{j})-(7\\vec{i}-3\\vec{j})=$ [[1]]
\n$4(\\vec{i}+\\vec{j})+3(-\\vec{i}+\\vec{j})=$ [[2]]
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "v1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "5i+2j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "v2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "-5i+j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "v3", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "i+7j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "$a\\vec{i}+b\\vec{j}$ or $a\\vec{i}-b\\vec{j}$", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "A load on the end of a crane is subject to three forces: $\\vec{G}$ due to gravity, $\\vec{W}$ due to the wind and $\\vec{C}$ due to the movement of the crane. The total force experienced by the load is $\\vec{T}=\\vec{G}+\\vec{W}+\\vec{C}$.
\n{crane}
\nWe have $\\vec{G}=-25\\vec{j}$, $\\vec{W}=$ [[0]] and $\\vec{C}=$ [[1]].
\nTherefore, the total force is the vector $\\vec{T}=$ [[2]].
", "gaps": [{"type": "jme", "useCustomName": true, "customName": "W", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "-5i-10j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "C", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "20i-5j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}, {"type": "jme", "useCustomName": true, "customName": "T", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "answer": "15i-40j", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notation": "standard", "mustmatchpattern": {"pattern": "((`+- $n*i `| i `| -i) + (`+- $n*j `| j `| -j)) `| (`+- $n*i `| i `| -i) `| (`+- $n*j `| j `| -j) `| 0", "partialCredit": "100", "message": "?i+?j or ?i-?j", "nameToCompare": "", "warningTime": "submission"}, "valuegenerators": [{"name": "j", "value": ""}], "functionsets": ["extension:jsxgraph", "arithmetic", "complex_numbers", "exponentials", "trigonometry", "rounding", "number_theory", "comparison", "linear_algebra", "booleans", "set_theory", "intervals", "number_ranges", "lists", "dictionaries", "strings", "type_casting", "number_parsing", "precision", "json", "jme", "pattern_matching", "html", "randomisation", "control_flow", "comprehensions", "calculus", "marking", "http", "promises"], "enabledfunctions": [], "disabledfunctions": []}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Given points $P$ and $Q$, the vector which starts at $P$ and ends at $Q$ is sometimes denoted $\\overline{PQ}$. In the below diagram, we have $\\overline{PQ}=-\\vec{b}$. This is vector obtained from $\\vec{b}$ by taking the negative of its components, which has the same length but points in the opposite direction to $\\vec{b}$.
\nWe have $\\vec{c}=-\\vec{b}+\\vec{a}$, because starting at $P$ and travelling backwards along $\\vec{b}$, then forwards along $\\vec{a}$, gives the same total change as $\\vec{c}$.
\n{triangle}
\nWhich of the following statements are true?
\n$\\vec{a}=\\overline{QR}$ [[0]] $\\vec{c}=\\overline{RP}$ [[1]] $\\overline{QR}=-\\overline{RQ}$ [[2]]
\n$\\vec{a}+\\vec{b}=\\vec{c}$ [[3]] $\\vec{b}+\\vec{c}=\\vec{a}$ [[4]] $\\vec{c}=\\vec{a}-\\vec{b}$ [[5]]
\n$\\overline{QR}+\\overline{RP}=\\overline{QP}$ [[6]] $\\overline{RP}-\\overline{PQ}=\\overline{QR}$ [[7]]
", "gaps": [{"type": "1_n_2", "useCustomName": true, "customName": "tf1", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf2", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["0", "1"], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf3", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf4", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["0", "1"], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf5", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf6", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf7", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "1_n_2", "useCustomName": true, "customName": "tf7", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showBlankOption": true, "showCellAnswerState": true, "interpretedAnswerForm": "list of list of boolean", "choices": ["True", "False"], "matrix": ["0", "1"], "distractors": ["", ""]}], "sortAnswers": false, "inlineCorrectAnswer": true}, {"type": "extension", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "interpreted_answer:\n let(\n [e1,e2], jxg_position(addition[\"P\"]),\n [f1,f2], jxg_position(addition[\"Q\"]),\n [f1-e1,f2-e2]\n )\n\ncorrect_answer:\n [3.5,4.5] // currently hard-coded\n\nmark:\n let(\n ans, interpreted_answer,\n cor, correct_answer,\n if(withintolerance(ans[0],cor[0],0.5) and withintolerance(ans[1],cor[1],0.5),correct(),incorrect())\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Rerrange the vectors so the third vector is equal to $\\vec{u}+\\vec{v}$.
\n{addition}
"}, {"type": "extension", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "interpreted_answer:\n let(\n [e1,e2], jxg_position(subtraction[\"P\"]),\n [f1,f2], jxg_position(subtraction[\"Q\"]),\n [f1-e1,f2-e2]\n )\n\ncorrect_answer:\n [1.5, 2] // currently hard-coded\n\nmark:\n let(\n ans, interpreted_answer,\n cor, correct_answer,\n if(withintolerance(ans[0],cor[0],0.5) and withintolerance(ans[1],cor[1],0.5),correct(),incorrect())\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "adaptiveMarkingUseCondition": "", "adaptiveMarkingNotUsedMessage": "", "exploreObjective": null, "prompt": "Rearrange the vectors so the third vector is equal to $\\vec{u}-\\vec{v}$.
\n{subtraction}
"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "showAllParts": false, "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}], "resources": ["question-resources/crane.svg"]}]}], "contributors": [{"name": "Fern Gossow", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/38158/"}]}