// Numbas version: finer_feedback_settings {"name": "Vectors: Unit Vectors 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Vectors: Unit Vectors 1", "tags": [], "metadata": {"description": "
Find the unit vectors in the direction of four 2-dimensional vectors. Three of the vectors are given, and the fourth is expressed as a linear combination of two of the other vectors.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Find the unit vectors in the direction of
\n\\[ \\mathbf a = \\var{a}, \\quad \\mathbf b = \\var{b}, \\quad \\mathbf c = \\var{c}, \\quad \\mathbf d = \\simplify{{m}*mathbf:a +{n}*mathbf:b}.\\]
", "advice": "A unit vector in the direction of a vector $\\mathbf n$ is defined as
\n\\[ \\mathbf{\\hat{n}} = \\dfrac{\\mathbf{n}}{|\\mathbf n |} , \\]
\nwhere $|\\mathbf n |$ is the magnitude of $\\mathbf n$.
\nFor the vector $\\mathbf a = \\var{a}$,
\n\\[ \\begin{split} | \\mathbf a | &\\, = \\simplify[!collectNumbers]{sqrt({a[0]}^2+{a[1]}^2)} \\\\ &\\, = \\simplify{sqrt({length(a)^2})} .\\end{split} \\]
\nTherefore,
\n\\[ \\mathbf{\\hat{a}} = \\frac{1}{\\simplify{sqrt({length(a)^2})}}\\var{a} = \\var{unita}. \\]
\nSimilarly,
\n\\[ \\mathbf{\\hat{b}} = \\frac{1}{\\simplify{sqrt({length(b)^2})}}\\var{b} = \\var{unitb}, \\]
\nand
\n\\[ \\mathbf{\\hat{c}} = \\frac{1}{\\simplify{sqrt({length(c)^2})}}\\var{c} = \\var{unitc}. \\]
\nFor the vector $\\mathbf d = \\simplify{{m}*mathbf:a +{n}*mathbf:b}$:
\n\\[ \\mathbf d = \\simplify[!collectNumbers]{{m}*{a} +{n}*{b}} = \\var{d}. \\]
\nTherefore,
\n\\[ \\mathbf{\\hat{d}} = \\frac{1}{\\simplify{sqrt({length(d)^2})}}\\var{d} = \\var{unitd}. \\]
\n\n\\[\\]
\nNote: It is also acceptable to give the answer in the form \\[ \\mathbf{\\hat{n}} = \\dfrac{1}{|\\mathbf n |}\\mathbf{n}, \\]
\nrather than dividing each term by the magnitude.
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "vector(repeat(random(-5..5 except 0),2))", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "vector(random(-5..5 except 0),random(-5..5 except a[1]))", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "vector(random(-5..5 except [a[0],0]),random(-5..5 except [b[0]]))", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "m*a+n*b", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(-1,1)*random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "unita": {"name": "unita", "group": "Ungrouped variables", "definition": "precround(a/length(a),2)", "description": "", "templateType": "anything", "can_override": false}, "unitd": {"name": "unitd", "group": "Ungrouped variables", "definition": "precround(d/length(d),2)", "description": "", "templateType": "anything", "can_override": false}, "unitb": {"name": "unitb", "group": "Ungrouped variables", "definition": "precround(b/length(b),2)", "description": "", "templateType": "anything", "can_override": false}, "unitc": {"name": "unitc", "group": "Ungrouped variables", "definition": "precround(c/length(c),2)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "abs(m)>abs(n) or abs(m)(Give answers to 2 decimal places where necessary)
", "gaps": [{"type": "matrix", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "vector(a[0],a[1])/length(a)", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false}, {"type": "matrix", "useCustomName": true, "customName": "Gap 1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "vector(b[0],b[1])/length(b)", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false}, {"type": "matrix", "useCustomName": true, "customName": "Gap 2", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "vector(c[0],c[1])/length(c)", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "vector(d[0],d[1])/length(d)", "correctAnswerFractions": false, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}