<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>9.5.3.1 The vector equation of a line, Exercise</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p class="HELM_exercise">Exercise</p>
<h3>The vector equation of a line</h3>
<p>Consider the straight line <span class="math inline">\(APB\)</span> shown in the following figure. This is a line in three-dimensional space.</p>

<figure class="HELM_figure">
<img src="@@PLUGINFILE@@/9-5-Fig3-vector%20equation%20of%20line.svg" alt="A 3D line passing through two points A and B, a point P is marked and the vector connecting the origin to point is given by a vector r." class="img-responsive atto_image_button_text-bottom" width="552" height="236">
</figure>

<p>Points <span class="math inline">\(A\)</span> and <span class="math inline">\(B\)</span> are fixed and known points on the line, and have position vectors <span class="math inline">\(\underline{ a}\)</span> and <span class="math inline">\(\underline{ b}\)</span> respectively. Point <span class="math inline">\(P\)</span> is any other arbitrary point on the line, and has position vector <span class="math inline">\(\underline{ r}\)</span>. Note that because <span class="math inline">\(\overrightarrow{AB}\)</span> and <span class="math inline">\(\overrightarrow{AP}\)</span> are parallel, <span class="math inline">\(\overrightarrow{AP}\)</span> is simply a scalar multiple of <span class="math inline">\(\overrightarrow{AB}\)</span>, that is, <span class="math inline">\(\overrightarrow{AP}=t\overrightarrow{AB}\)</span> where <span class="math inline">\(t\)</span> is a number.</p>

<p>Referring to the figure, write down an expression for the vector \(\overrightarrow{AB}\) in terms of \(\underline{a}\) and \(\underline{b}\). Write \(\underline{a}\) and \(\underline{b}\) as <code>a</code> and <code>b</code>, respectively, ignoring the underline.</p>

<p>\(\overrightarrow{AB}=\) [[input:ansVec]] [[validation:ansVec]] [[feedback:vecQ]]</p>



<p>Referring to the figure, use the triangle law for vector addition to find an expression for <span class="math inline">\(\underline{r}\)</span> in terms of <span class="math inline">\(\underline{a}\)</span>, <span class="math inline">\(\underline{b}\)</span> and <span class="math inline">\(t\)</span>, where <span class="math inline">\(\overrightarrow{AP}=t\overrightarrow{AB}\)</span>. If your answer involves multiplication, please indicate this by use of the <code>*</code> symbol.<br></p>


<p>\(\underline{r}=\) [[input:ansLin]] [[validation:ansLin]] [[feedback:linQ]]</p>]]></text>
<file name="9-5-Fig3-vector equation of line.svg" path="/" encoding="base64">[encoded data, 32488 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>To find the vector \(\overrightarrow{AB}\) we simply subtract the position vector or \(A\) from the position vector of \(B\):</p>
\[\overrightarrow{AB} = \underline{b} - \underline{a}\]
<p>Next, we want to find the position vector \(\underline{r}\) of the point \(P\) on the line. We are given that \(\overrightarrow{AP} = t\overrightarrow{AB}\), so</p>
\[\underline{r} = \overrightarrow{OP} = \overrightarrow{OA} + \overrightarrow{AP} = \underline{a} + t(\underline{b} - \underline{a}).\]]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020120600</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[stackvectortex(ex):= block(sconcat("{ \\underline{", tex1(first(args(ex))), "}}"));]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text/>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:green;"><i class="fa fa-check"></i></span> Correct answer, well done.]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:orange;"><i class="fa fa-adjust"></i></span> Your answer is partially correct.]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:red;"><i class="fa fa-times"></i></span> Incorrect answer.]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>none</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed/>
    <input>
      <name>ansLin</name>
      <type>algebraic</type>
      <tans>a+t*(b-a)</tans>
      <boxsize>7</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <input>
      <name>ansVec</name>
      <type>algebraic</type>
      <tans>b-a</tans>
      <boxsize>3</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>3</showvalidation>
      <options/>
    </input>
    <prt>
      <name>linQ</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ansLin</sans>
        <tans>a+t*(b-a)</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>linQ-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>linQ-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>vecQ</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ansVec</sans>
        <tans>b-a</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>vecQ-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>vecQ-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ansVec</sans>
        <tans>a-b</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>vecQ-2-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>You seem to have given an expression for the vector \(\overrightarrow{BA}\) instead of \(\overrightarrow{AB}\).</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>vecQ-2-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ansLin</name>
        <value>a+t*(b-a)</value>
      </testinput>
      <testinput>
        <name>ansVec</name>
        <value>b-a</value>
      </testinput>
      <expected>
        <name>linQ</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>linQ-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>vecQ</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>vecQ-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ansLin</name>
        <value>b*t-a*t+a</value>
      </testinput>
      <testinput>
        <name>ansVec</name>
        <value>a-b</value>
      </testinput>
      <expected>
        <name>linQ</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>linQ-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>vecQ</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>vecQ-2-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ansLin</name>
        <value>b+t*(b-a)</value>
      </testinput>
      <testinput>
        <name>ansVec</name>
        <value>a</value>
      </testinput>
      <expected>
        <name>linQ</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>linQ-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>vecQ</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>vecQ-2-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
