<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>Subspace (reveal example)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>
Let \(W\) be the subset of \(\mathbb{R}^3\) made from the straight line through the origin and \( ({@p1[1]@}, {@p1[2]@}, {@p1[3]@}) \). 
Is \(W\) a subspace of  \(\mathbb{R}^3\)? 
</p>
<p>True or false: \(W\) is a subspace? [[input:ans1]] [[validation:ans1]] [[feedback:prt1]]</p>

[[reveal input="ans1" value="true"]]
<p>If true write the subspace in parametric form:
[[input:ans2]] where the list of parameters [[input:ans3]] \(\in \mathbb{R}\).
<br>[[validation:ans2]] [[validation:ans3]] [[feedback:prt2]]
</p>
[[/reveal]]

[[reveal input="ans1" value="false"]]
<p>If false the give reasons below.</p>
<ul>
<li>True or false: \(W\) does not contain the origin (and so is not a subspace)? [[input:ans0]] [[validation:ans0]] [[feedback:prt3]]</li>
<li>\(W\) is not a subspace because it is not closed under addition. For example, 
\(v_1 = \) [[input:ansv1]] [[validation:ansv1]] and
\(v_2 = \) [[input:ansv2]] [[validation:ansv2]] are in \(W\) but their sum is not. [[feedback:prt4]]</li>
<li>\(W\) is not a subspace because it is not closed under scalar multiplication. 
For example, \(w_1 = \) [[input:answ1]] [[validation:answ1]] is in \(W\) and 
\(\lambda = \) [[input:answ2]] [[validation:answ2]] is a scalar but the scalar multiple \(\lambda w_1\) is not in \(W\). [[feedback:prt5]]</li>
</ul>
[[/reveal]]]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text>A line through the origin is a subspace.  The subspace can be described in parametric form with a single parameter, multiplying the position vector of any non-zero point on the line.</text>
    </generalfeedback>
    <defaultgrade>3</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2023051500</text>
    </stackversion>
    <questionvariables>
      <text>p1:[-1,3,2];
tlv:[t];
issubspace:true;
iszero:true;
/* This is the parametric form of W. */
Ws:transpose(matrix(t*p1));

/* Decide if a vector is in W */
find_point_in_space(W, wx):= linsolve(flatten(args(W))-first(args(transpose(wx))), listofvars(W));
point_in_space(W, wx):=not(emptyp(find_point_in_space(W, wx)));

/* Calculate the canonical form of a column space of a subspace. */
cspace(ex):= ev(transpose(rref(transpose(coefmatrix(flatten(args(ex)), listofvars(ex))))), simp);

/* Is zero in the teacher's answer? */
iszeroreally:not(emptyp(point_in_space(Ws,matrix([0],[0],[0]))));
/* Counter examples to addition */
tav1:transpose(matrix([null,null,null]));
tav2:transpose(matrix([null,null,null]));
/* Counter examples to multiplication */
taw1:transpose(matrix([null,null,null]));
taw2:null;</text>
    </questionvariables>
    <specificfeedback format="html">
      <text/>
    </specificfeedback>
    <questionnote format="html">
      <text>{@Ws@}</text>
    </questionnote>
    <questiondescription format="html">
      <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>ans0</name>
      <type>boolean</type>
      <tans>EMPTYANSWER</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans1</name>
      <type>boolean</type>
      <tans>issubspace</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans2</name>
      <type>matrix</type>
      <tans>Ws</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>5</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options/>
    </input>
    <input>
      <name>ans3</name>
      <type>algebraic</type>
      <tans>tlv</tans>
      <boxsize>5</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>5</insertstars>
      <syntaxhint>[?, ...]</syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options/>
    </input>
    <input>
      <name>ansv1</name>
      <type>matrix</type>
      <tans>tav1</tans>
      <boxsize>2</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>5</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options/>
    </input>
    <input>
      <name>ansv2</name>
      <type>matrix</type>
      <tans>tav1</tans>
      <boxsize>2</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>5</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options/>
    </input>
    <input>
      <name>answ1</name>
      <type>matrix</type>
      <tans>tav1</tans>
      <boxsize>3</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>5</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options/>
    </input>
    <input>
      <name>answ2</name>
      <type>numerical</type>
      <tans>EMPTYANSWER</tans>
      <boxsize>3</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>5</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description>True false check.</description>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>issubspace</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text>You have correctly identified if \(W\) is a subspace.</text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text>You have not correctly identified if \(W\) is a subspace.</text>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt2</name>
      <value>2.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text>lv:listofvars(ans2);
deg:apply(max, maplist(lambda([ex], hipow(ans2, ex)), lv));</text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>true</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt2-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty>0</falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text>You can only answer this part if you think \(W\) is a subspace!</text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>deg</sans>
        <tans>1</tans>
        <testoptions/>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>2</truenextnode>
        <trueanswernote>prt2-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-2-F</falseanswernote>
        <falsefeedback format="html">
          <text>The degree of you system is not equal to 1.</text>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>point_in_space(ans2, matrix([0],[0],[0]))</sans>
        <tans>true</tans>
        <testoptions/>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>3</truenextnode>
        <trueanswernote>prt2-3-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-3-F</falseanswernote>
        <falsefeedback format="html">
          <text>Your system does not pass through the origin, but should do!</text>
        </falsefeedback>
      </node>
      <node>
        <name>3</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>cspace(ans2)</sans>
        <tans>cspace(Ws)</tans>
        <testoptions/>
        <quiet>1</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-4-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-4-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt3</name>
      <value>0.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>false</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt3-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty>0</falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt3-1-F</falseanswernote>
        <falsefeedback format="html">
          <text>You can only answer this part if you think \(W\) is not a subspace!</text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans0</sans>
        <tans>not(point_in_space(Ws,matrix([0],[0],[0])))</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt3-2-T</trueanswernote>
        <truefeedback format="html">
          <text>You have correctly identified whether the origin is in \(W\).</text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt3-2-F</falseanswernote>
        <falsefeedback format="html">
          <text>You have incorrectly identified whether the origin is \(W\).</text>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt4</name>
      <value>0.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>false</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt4-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt4-1-F</falseanswernote>
        <falsefeedback format="html">
          <text>You can only answer this part if you think \(W\) is not a subspace!</text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>point_in_space(Ws,ansv1)</sans>
        <tans>true</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>2</truenextnode>
        <trueanswernote>prt4-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt4-2-F</falseanswernote>
        <falsefeedback format="html">
          <text>You are claiming that \({@ansv1@}\) is in \(W\) but it is not!</text>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>point_in_space(Ws,ansv2)</sans>
        <tans>true</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>3</truenextnode>
        <trueanswernote>prt4-3-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt4-3-F</falseanswernote>
        <falsefeedback format="html">
          <text>You are claiming that \({@ansv2@}\) is in \(W\) but it is not!</text>
        </falsefeedback>
      </node>
      <node>
        <name>3</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>point_in_space(Ws,ansv1+ansv2)</sans>
        <tans>false</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt4-4-T</trueanswernote>
        <truefeedback format="html">
          <text>The point \[ {@ansv1@}+{@ansv2@} = {@ansv1+ansv2@} \not \in W\] as claimed.  Hence \(W\) is not a subspace</text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt4-4-F</falseanswernote>
        <falsefeedback format="html">
          <text>The point \[ {@ansv1@}+{@ansv2@} = {@ansv1+ansv2@} \in W.\]   Hence your points do not contradict closure of \(W\) under addition.</text>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt5</name>
      <value>0.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>false</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt5-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt5-1-F</falseanswernote>
        <falsefeedback format="html">
          <text>You can only answer this part if you think \(W\) is not a subspace!</text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>point_in_space(Ws,answ1)</sans>
        <tans>true</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty/>
        <truenextnode>2</truenextnode>
        <trueanswernote>prt5-2-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt5-2-F</falseanswernote>
        <falsefeedback format="html">
          <text>You are claiming that \({@answ1@}\) is in \(W\) but it is not!</text>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>point_in_space(Ws,answ2*answ1)</sans>
        <tans>false</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt5-3-T</trueanswernote>
        <truefeedback format="html">
          <text>The point \[ {@answ2@}\times{@answ1@} = {@answ2*answ1@} not \in W.\]   Hence your points do contradict closure of \(W\) under scalar multiplication. Hence \(W\) is not a subspace</text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt5-3-F</falseanswernote>
        <falsefeedback format="html">
          <text>The point \[ {@answ2@}\times{@answ1@} = {@answ2*answ1@} \in W.\]   Hence your points to not contradict closure of \(W\) under scalar multiplication.</text>
        </falsefeedback>
      </node>
    </prt>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans0</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans1</name>
        <value>issubspace</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>Ws</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>tlv</value>
      </testinput>
      <testinput>
        <name>ansv1</name>
        <value/>
      </testinput>
      <testinput>
        <name>ansv2</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ1</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ2</name>
        <value/>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-4-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt4</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans0</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans1</name>
        <value>issubspace</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ev(transpose(matrix(-1*s*p1)),simp)</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>[s]</value>
      </testinput>
      <testinput>
        <name>ansv1</name>
        <value/>
      </testinput>
      <testinput>
        <name>ansv2</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ1</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ2</name>
        <value/>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-4-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt4</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description/>
      <testinput>
        <name>ans0</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans1</name>
        <value>issubspace</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ev(transpose(matrix(t*(p1+[1,0,0]))),simp)</value>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>[t]</value>
      </testinput>
      <testinput>
        <name>ansv1</name>
        <value/>
      </testinput>
      <testinput>
        <name>ansv2</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ1</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ2</name>
        <value/>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty/>
        <expectedanswernote>prt2-4-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt4</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>4</testcase>
      <description/>
      <testinput>
        <name>ans0</name>
        <value>true</value>
      </testinput>
      <testinput>
        <name>ans1</name>
        <value>false</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>[?, ...]</value>
      </testinput>
      <testinput>
        <name>ansv1</name>
        <value/>
      </testinput>
      <testinput>
        <name>ansv2</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ1</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ2</name>
        <value/>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt3-2-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt4</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>5</testcase>
      <description/>
      <testinput>
        <name>ans0</name>
        <value>false</value>
      </testinput>
      <testinput>
        <name>ans1</name>
        <value>false</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>[?, ...]</value>
      </testinput>
      <testinput>
        <name>ansv1</name>
        <value/>
      </testinput>
      <testinput>
        <name>ansv2</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ1</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ2</name>
        <value/>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt3-2-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>6</testcase>
      <description/>
      <testinput>
        <name>ans0</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans1</name>
        <value>false</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>[?, ...]</value>
      </testinput>
      <testinput>
        <name>ansv1</name>
        <value>ev(transpose(matrix(p1)),simp)</value>
      </testinput>
      <testinput>
        <name>ansv2</name>
        <value>ev(transpose(matrix(-2*p1)), simp)</value>
      </testinput>
      <testinput>
        <name>answ1</name>
        <value>ev(transpose(matrix(p1)),simp)</value>
      </testinput>
      <testinput>
        <name>answ2</name>
        <value>3</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt4</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt4-4-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt5-3-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>7</testcase>
      <description>Student chooses the wrong answer</description>
      <testinput>
        <name>ans0</name>
        <value>true</value>
      </testinput>
      <testinput>
        <name>ans1</name>
        <value>false</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value/>
      </testinput>
      <testinput>
        <name>ans3</name>
        <value>[?, ...]</value>
      </testinput>
      <testinput>
        <name>ansv1</name>
        <value/>
      </testinput>
      <testinput>
        <name>ansv2</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ1</name>
        <value/>
      </testinput>
      <testinput>
        <name>answ2</name>
        <value/>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty/>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt3</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty/>
        <expectedanswernote>prt3-2-F</expectedanswernote>
      </expected>
      <expected>
        <name>prt4</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
      <expected>
        <name>prt5</name>
        <expectedscore/>
        <expectedpenalty/>
        <expectedanswernote>NULL</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
