// Numbas version: exam_results_page_options {"name": "Find unit vector orthogonal to two others, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"v": {"group": "Ungrouped variables", "templateType": "anything", "definition": "vector(repeat(random(-9..9 except 0),3))", "description": "", "name": "v"}, "u": {"group": "Ungrouped variables", "templateType": "anything", "definition": "vector(repeat(random(-9..9 except 0),3))", "description": "", "name": "u"}, "apos": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(a[0]<0,-a,a)", "description": "", "name": "apos"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "cross(u,v)", "description": "", "name": "a"}, "unitapos": {"group": "Ungrouped variables", "templateType": "anything", "definition": "apos/len(a)", "description": "", "name": "unitapos"}}, "ungrouped_variables": ["u", "v", "a", "apos", "unitapos"], "name": "Find unit vector orthogonal to two others, ", "functions": {}, "parts": [{"customMarkingAlgorithm": "", "showCorrectAnswer": true, "prompt": "

$\\boldsymbol{\\hat{a}}=$ [[0]]  (Enter your answers to 3d.p.)

", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"precisionPartialCredit": 0, "allowResize": false, "type": "matrix", "numRows": 1, "precisionMessage": "You have not given your answer to the correct precision.", "tolerance": 0, "variableReplacements": [], "showCorrectAnswer": true, "allowFractions": false, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "correctAnswer": "matrix([unitapos])", "precision": "3", "unitTests": [], "correctAnswerFractions": false, "precisionType": "dp", "strictPrecision": false, "scripts": {}, "extendBaseMarkingAlgorithm": true, "numColumns": "3", "markPerCell": true, "marks": "3", "showFeedbackIcon": true}], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "variablesTest": {"condition": "a[0]<>0", "maxRuns": 100}, "statement": "

Find the unit vector $\\boldsymbol{\\hat{a}}$, with positive $x$-component, which is orthogonal to both $\\boldsymbol{u}=\\pmatrix{\\var{u[0]},\\var{u[1]},\\var{u[2]}}$ and $\\boldsymbol{v}=\\pmatrix{\\var{v[0]},\\var{v[1]},\\var{v[2]}}$.

", "tags": ["checked2015", "cross product", "vector", "Vector"], "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find a unit vector orthogonal to two others.

\n

Uses $\\wedge$ for the cross product. The interim calculations should all be displayed to enough dps, not 3,  to ensure accuracy to 3 dps. If the cross product has a negative x component then it is not explained that the negative of the cross product is taken for the unit vector.

"}, "extensions": [], "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

A vector $\\boldsymbol{a}$, which is orthogonal to both $\\boldsymbol{u}$ and $\\boldsymbol{v}$, is given by

\n

\\[ \\boldsymbol{u}\\wedge\\boldsymbol{v}=\\pmatrix{u_2 v_3 - u_3 v_2, & u_3 v_1 - u_1 v_3, & u_1 v_2 - u_2 v_1} \\]

\n

The magnitude of $\\boldsymbol{a}$ is given by 

\n

\\[ \\lvert\\boldsymbol{a}\\rvert=\\sqrt{a_1^2+a_2^2+a_3^2} \\]

\n

A unit vector $\\boldsymbol{\\hat{a}}$ is obtained by dividing the components of the vector $\\boldsymbol{a}$ by its magnitude, i.e.

\n

\\[ \\boldsymbol{\\hat{a}}=\\frac{\\boldsymbol{a}}{\\lvert\\boldsymbol{a}\\rvert} \\] 

\n

In this question,

\n

\\[ \\boldsymbol{a} = \\pmatrix{\\simplify[basic]{{u[1]}*{v[2]}-{u[2]}*{v[1]}}, & \\simplify[basic]{{u[2]}*{v[0]}-{u[0]}*{v[2]}}, & \\simplify[basic]{{u[0]}*{v[1]} - {u[1]}*{v[0]}}} = \\var[rowvector]{a} \\]

\n

and

\n

\\[ \\lvert\\boldsymbol{a}\\rvert = \\sqrt{(\\var{a[0]})^2+(\\var{a[1]})^2+(\\var{a[2]})^2} = \\var{precround(len(a),3)} \\text{ to 3 decimal places.} \\]

\n

The unit vector with positive $x$-component is therefore $\\boldsymbol{\\hat{a}}=\\frac{1}{\\var{precround(len(a),3)}}\\var[rowvector]{apos} = \\pmatrix{\\var{precround(unitapos[0],3)}, & \\var{precround(unitapos[1],3)}, & \\var{precround(unitapos[2],3)}}$ to 3d.p.

", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}