// Numbas version: exam_results_page_options {"name": "Maths Support: Dot and cross product", "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "preventleave": false, "browse": true, "showfrontpage": false, "showresultspage": "never"}, "duration": 0.0, "metadata": {"notes": "\n \t\t \t\t

Three dimensional vectors

\n \t\t \t\t

Dot product / Scalar product

\n \t\t \t\t

Angle between two vectors

\n \t\t \n \t\t", "description": "

5 questions on vectors. Scalar product, angle between vectors, cross product, when are vectors perpendicular, combinations of vectors defined or not.

", "licence": "Creative Commons Attribution 4.0 International"}, "timing": {"timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "shufflequestions": false, "questions": [], "percentpass": 50.0, "allQuestions": true, "pickQuestions": 0, "type": "exam", "feedback": {"showtotalmark": true, "advicethreshold": 0.0, "showanswerstate": true, "showactualmark": true, "allowrevealanswer": true}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "Vectors: angle between vectors 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/"}], "functions": {}, "tags": ["angle between vectors", "angle beween two vectors", "degrees and radians", "dot product", "finding the angle between vectors", "inner product", "radians", "scalar product", "vectors"], "advice": "\n

Use the formula:

\n

$\\boldsymbol{A \\cdot B} = |\\boldsymbol{A}||\\boldsymbol{B}|\\cos(\\theta)$ where $\\theta$ is the angle between the vectors.

\n

Here $|\\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

and

\n

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

\n

So \\[\\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*} \\]
Converting from degrees to radians is simply a matter of multiplying the angle in degrees by $\\displaystyle \\frac{\\pi}{180}$.

\n

Hence $\\displaystyle \\var{angle}\\,^{\\circ}=\\simplify[std]{({angle}*pi)/{180}= {precround(angle*pi/180,4)}}$ radians to 4 decimal places.

\n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n \n \n

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

\n \n \n \n

Angle in radians = [[1]]radians.

\n \n \n \n

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

\n \n \n ", "gaps": [{"minvalue": "{angle}", "type": "numberentry", "maxvalue": "{angle}", "marks": 1.0, "showPrecisionHint": false}, {"checkingaccuracy": 0.0001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "marks": 1.0, "answer": "{precround(angle*pi/180,4)}", "type": "jme"}], "type": "gapfill", "marks": 0.0}], "statement": "\n

Given the vectors:
\\[\\boldsymbol{A}=\\simplify[std]{{s1}v:e_{a}+{s2}v:e_{b}},\\;\\;\\;\\boldsymbol{B}=\\simplify[std]{{s3}v:e_{c}+{s4}v:e_{d}}\\]

\n

Find the angle in degrees and radians between them.

\n

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

\n ", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"a": {"definition": "if(t=1,2,1)", "name": "a"}, "c": {"definition": "if(u=1,2,1)", "name": "c"}, "b": {"definition": "if(t=3,2,3)", "name": "b"}, "angle": {"definition": "precround(180/pi*arccos(g/2),1)", "name": "angle"}, "d": {"definition": "if(u=3,2,3)", "name": "d"}, "g": {"definition": "{fa*fb+sa*sb+ta*tb}", "name": "g"}, "s3": {"definition": "random(1,-1)", "name": "s3"}, "s2": {"definition": "random(1,-1)", "name": "s2"}, "s1": {"definition": "random(1,-1)", "name": "s1"}, "s4": {"definition": "if(s1=s3 ,-s2,random(-1,1))", "name": "s4"}, "fa": {"definition": "if(t=1,0,s1)", "name": "fa"}, "fb": {"definition": "if(u=1,0,s3)", "name": "fb"}, "u": {"definition": "random(1,2,3)", "name": "u"}, "t": {"definition": "random(1,2,3)", "name": "t"}, "sb": {"definition": "if(u=2,0,if(u=1,s3,s4))", "name": "sb"}, "sa": {"definition": "if(t=2,0,if(t=1,s1,s2))", "name": "sa"}, "tb": {"definition": "if(u=3,0,s4)", "name": "tb"}, "ta": {"definition": "if(t=3,0,s2)", "name": "ta"}}, "metadata": {"notes": "

15/07/2012:

\n

Added tags.

\n

16/07/2012:

\n

Added tags.

\n

Question appears to be working correctly.

\n

Moved the \\rightarrow to the correct place in the solution.

\n

 

\n

 

", "description": "

Given vectors  $\\boldsymbol{A,\\;B}$, find the angle between them.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Vectors: Combinations defined or not 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/"}], "functions": {}, "ungrouped_variables": [], "tags": ["cross product", "dot product", "inner product", "scalar product", "scalars", "vector", "vector product", "vectors"], "preamble": {"css": "", "js": ""}, "advice": "\n \n \n

1. $\\boldsymbol{(A\\cdot B)\\cdot C}$ is undefined as $\\boldsymbol{A\\cdot B}$ is a scalar and we cannot take the inner product of a scalar with the vector $\\boldsymbol{C}$.

\n \n \n \n

2. $\\boldsymbol{(A\\cdot B)C}$ is a vector and is a multiple of $\\boldsymbol{C}$ as $\\boldsymbol{A \\cdot B}$ is a scalar.

\n \n \n \n

3. $\\boldsymbol{(A\\cdot B)\\times C}$ is undefined as $\\boldsymbol{A\\cdot B}$ is a scalar and the cross product is only defined between vectors.

\n \n \n \n

4. $\\boldsymbol{(A\\times B)\\times C}$ is a vector as $\\boldsymbol{A \\times B}$ and $\\boldsymbol{C}$ are vectors and the cross product between vectors produces a vector.

\n \n \n \n

5. $\\boldsymbol{(A\\times B)\\cdot C}$ is a scalar as $\\boldsymbol{A \\times B}$ and $\\boldsymbol{C}$ are vectors and the inner or dot product is between vectors and produces a scalar.

\n \n \n \n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"maxAnswers": 0, "shuffleChoices": true, "matrix": [[0, 0, 0.4], [0, 0.4, 0], [0, 0, 0.4], [0, 0.4, 0], [0.4, 0, 0]], "shuffleAnswers": true, "minAnswers": 0, "marks": 0, "answers": ["

Scalar

", "

Vector

", "

Undefined

"], "warningType": "none", "displayType": "radiogroup", "showCorrectAnswer": true, "scripts": {}, "maxMarks": 0, "choices": ["

$\\boldsymbol{(A\\cdot B)\\cdot C}$

", "

$\\boldsymbol{(A\\cdot B)C}$

", "

$\\boldsymbol{(A\\cdot B)\\times C}$

", "

$\\boldsymbol{(A\\times B)\\times C}$

", "

$\\boldsymbol{(A\\times B)\\cdot C}$

"], "type": "m_n_x", "minMarks": 0}], "statement": "

Given the vectors $\\boldsymbol{A},\\;\\;\\boldsymbol{B}$ and $\\boldsymbol{C}$ in $3$ dimensional space, state whether the following quantities are scalars, vectors or undefined.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "metadata": {"notes": "\n \t\t \t\t

15/07/2012:

\n \t\t \t\t

Added tags.

\n \t\t \t\t

16/07/2012:

\n \t\t \t\t

Added tags.

\n \t\t \t\t

 

\n \t\t \t\t

 

\n \t\t \n \t\t", "description": "

Determine if various combinations of vectors are defined or not.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Vectors: cross product 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/"}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s3", "s2", "s1", "s5", "s4", "inner"], "tags": ["3 dimensional vector", "cross product", "three dimensional vectors", "vector", "vector product", "vectors"], "preamble": {"css": "", "js": ""}, "advice": "

\\[ \\begin{eqnarray*} \\boldsymbol{A\\times B}&=& \\begin{vmatrix} \\boldsymbol{e_1} & \\boldsymbol{e_2} &\\boldsymbol{e_3}\\\\ \\var{a} & \\var{b} & \\var{g}\\\\ \\var{c} & \\var{d} & \\var{f} \\end{vmatrix}\\\\ \\\\ &=&\\simplify[]{({b}*{f}-{g}*{d})v:e_1 + ({g}*{c} - {a}*{f})v:e_2+({a}*{d}-{b}*{c})v:e_3}\\\\ \\\\ &=&\\simplify[std]{{b*f-g*d}v:e_1+{g*c-a*f}v:e_2+{a*d-b*c}v:e_3} \\end{eqnarray*} \\]

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "

Find $\\boldsymbol{A\\times B} =$ [[0]]$\\boldsymbol{e_1} + \\;$[[1]]$\\boldsymbol{e_2} + \\;$[[2]]$\\boldsymbol{e_3}$

", "marks": 0, "gaps": [{"allowFractions": false, "marks": 1, "maxValue": "{b*f-g*d}", "minValue": "{b*f-g*d}", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "{g*c-a*f}", "minValue": "{g*c-a*f}", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "marks": 1, "maxValue": "{a*d-b*c}", "minValue": "{a*d-b*c}", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "\n \n \n

Given the vectors:
\\[\\boldsymbol{A}=\\simplify[std]{{a}v:e_1+{b}v:e_2+{g}v:e_3},\\;\\;\\;\\boldsymbol{B}=\\simplify[std]{{c}v:e_1+{d}v:e_2+{f}v:e_3}\\]

\n \n \n \n

answer the following question:

\n \n \n ", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "s1*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "s3*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "s2*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "s4*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "g": {"definition": "s1*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "f": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "s3": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s3", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "s5": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s5", "description": ""}, "s4": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s4", "description": ""}, "inner": {"definition": "{a*c+b*d+f*g}", "templateType": "anything", "group": "Ungrouped variables", "name": "inner", "description": ""}}, "metadata": {"notes": "

16/07/2012:

\n

Added tags.

\n

Question appears to be working correctly.

\n

 26/01/2013:

\n

Correced mistake in Advice working.

", "description": "

Given vectors $\\boldsymbol{A,\\;B}$, find $\\boldsymbol{A\\times B}$

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Vectors: inner or scalar product 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/"}], "functions": {}, "tags": ["dot product", "dot product of two vectors", "inner product", "scalar product", "three dimensional vectors", "vectors"], "advice": "\n \n \n

\\[ \\begin{eqnarray*} \\boldsymbol{A\\cdot B}&=& (\\var{a}, \\var{b},\\var{g}) \\cdot (\\var{c}, \\var{d},\\var{f})\\\\\n \n &=&\\simplify[]{{a}*{c}+{b}*{d}+{g}*{f}}\\\\\n \n &=& \\var{inner}\n \n \\end{eqnarray*} \\]

\n \n \n \n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "

Find $\\boldsymbol{A\\cdot B} =\\;\\;$ [[0]]

", "gaps": [{"minvalue": "{inner}", "type": "numberentry", "maxvalue": "{inner}", "marks": 2.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}], "statement": "\n \n \n

Given the vectors:
\\[\\boldsymbol{A}=\\simplify[std]{{a}v:e_1+{b}v:e_2+{g}v:e_3},\\;\\;\\;\\boldsymbol{B}=\\simplify[std]{{c}v:e_1+{d}v:e_2+{f}v:e_3}\\]

\n \n \n \n

answer the following question:

\n \n \n \n ", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"a": {"definition": "s1*random(2..9)", "name": "a"}, "c": {"definition": "s3*random(2..9)", "name": "c"}, "b": {"definition": "s2*random(2..9)", "name": "b"}, "d": {"definition": "s4*random(2..9)", "name": "d"}, "g": {"definition": "s1*random(2..9)", "name": "g"}, "f": {"definition": "random(2..9)", "name": "f"}, "s3": {"definition": "random(1,-1)", "name": "s3"}, "s2": {"definition": "random(1,-1)", "name": "s2"}, "s1": {"definition": "random(1,-1)", "name": "s1"}, "s5": {"definition": "random(1,-1)", "name": "s5"}, "s4": {"definition": "random(1,-1)", "name": "s4"}, "inner": {"definition": "{a*c+b*d+f*g}", "name": "inner"}}, "metadata": {"notes": "\n \t\t \t\t

15/07/2012:

\n \t\t \t\t

Added tags.

\n \t\t \t\t

16/07/2012:

\n \t\t \t\t

Added tags.

\n \t\t \t\t

Question appears to be working correctly.

\n \t\t \n \t\t", "description": "

Given vectors $\\boldsymbol{A}$ and $\\boldsymbol{B}$, find their inner product.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"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/"}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "s3", "s2", "s1", "s5", "s4"], "tags": ["dot product", "finding perpendicular vectors", "inner product", "perpendicular vectors", "product", "scalar product", "vectors"], "preamble": {"css": "", "js": ""}, "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$.

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "

Find $\\lambda$ such that $\\boldsymbol{A}$ and $\\boldsymbol{B}$ are perpendicular to one another:

\n

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

\n

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

", "marks": 0, "gaps": [{"notallowed": {"message": "

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

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "marks": 1.5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{-a*c-b*d}/{f}", "checkingtype": "absdiff", "checkvariablenames": false, "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Find $\\lambda$ such that $\\boldsymbol{A}$ is in the $xy$ plane:

\n

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

", "marks": 0, "gaps": [{"allowFractions": false, "marks": 0.5, "maxValue": "{0}", "minValue": "{0}", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "

Given the vectors:
\\[\\boldsymbol{A}=\\simplify[std]{{a}v:e_1+{b}v:e_2+lambda*v:e_3},\\;\\;\\;\\boldsymbol{B}=\\simplify[std]{{c}v:e_1+{d}v:e_2+{f}v:e_3}\\]

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "s1*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "s3*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "s2*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "s4*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "g": {"definition": "s1*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "f": {"definition": "random(2,4,5,10)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "s3": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s3", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "s5": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s5", "description": ""}, "s4": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s4", "description": ""}}, "metadata": {"notes": "\n \t\t

15/07/2012:

\n \t\t

Added tags.

\n \t\t

Last part is too easy.

\n \t\t

16/07/2012:

\n \t\t

Added tags.

\n \t\t

Question appears to be working correctly.

\n \t\t

Agree that last part is too easy.

\n \t\t", "description": "

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

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": [], "custom_part_types": [], "resources": []}