Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions source/linear-algebra/source/02-EV/05.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,37 @@ Not a basis, because not only does it fail to span <m>\IR^4</m>, it's also linea
</statement>
</fact>

<remark xml:id="EV5-basis-visualization-tool">
<p>
A basis for a Euclidean vector space can be used to create alternative coordinate systems, as can
be visualized by the following tool.
Comment on lines +494 to +495
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A basis for a Euclidean vector space can be used to create alternative coordinate systems, as can
be visualized by the following tool.
A basis for a Euclidean vector space can be used to create alternative coordinate systems. This is visualized in the following interactive. As you drag the vector <m>\vec{v}</m> around the plane, the interactive shows how <m>\vec{v}</m> is expressed as a linear combination of the basis vectors <m>\vec{e}_1</m> and <m>\vec{e}_2</m>. If you click the toggle for the custom basis <m>\{\vec{b}_1,\vec{b}_2\}, the interactive will now show how to express the vector <m>\vec{v}</m> as a linear combination of the vectors <m>\vec{b}_1</m> and <m>\vec{b}_2</m>. You may also drag the vectors <m>\vec{b}_1</m> and <m>\vec{b}_2</m> to see how the results vary with different choices of custom bases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StevenClontz I like the interactive a lot. I think a caption that describes what the interactive does would be helpful. I've provided a suggestion for your review.

</p>
<interactive label="EV5-basis-visualization" platform="doenetml" width="90%" aspect="3:4">
<slate surface="doenetml">
<xi:include parse="text" href="doenet/EV5-basis-visualization.xml"/>
</slate>
</interactive>
</remark>

<activity>
<statement>
<p>
Using the tool from <xref ref="EV5-basis-visualization-tool"/>,
find the unique way to write the vector
<m>\vec v = \left[\begin{array}{c}-7\\3\end{array}\right]</m>
as a linear combination of vectors from the basis <m>\{\vec b_1,\vec b_2\}</m> where
<m>\vec b_1=\left[\begin{array}{c}-2\\2\end{array}\right]</m> and
<m>\vec b_2=\left[\begin{array}{c}3\\1\end{array}\right]</m>.
<ol marker="A." cols="2">
<li><m>\vec v = 2\vec b_1-\vec b_2</m></li>
<li><m>\vec v = -2\vec b_1-2\vec b_2</m></li>
<li><m>\vec v = -\vec b_1+2\vec b_2</m></li>
<li><m>\vec v = \vec b_1-\vec b_2</m></li>
</ol>
</p>
</statement>
</activity>

</subsection>

<subsection>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!-- https://doenet.org/portfolioeditor/_PSDg7v5ugo6RBMxFARE3Z/_8sE7bqhRzNAnb33Xfp54o -->

<setup>
<boolean name="standardBasis">$basisChoice.selectedIndices = 1</boolean>
<point name="v">(-2,-3)
<constraints>
<constrainToGrid/>
</constraints>
</point>
<point name="b2">(-1,3)
<constraints>
<constrainToGrid/>
</constraints>
</point>
<point name="b1">(4,1)
<constraints>
<constrainToGrid/>
</constraints>
</point>
<math name="x" simplify>($v.x*$b2.y-$v.y*$b2.x)/($b1.x*$b2.y-$b2.x*$b1.y)</math>
<math name="y" simplify>(-$v.x*$b1.y+$v.y*$b1.x)/($b1.x*$b2.y-$b2.x*$b1.y)</math>
</setup>

<p>
<choiceInput name="basisChoice" preselectChoice="1">
<choice>Standard basis {e₁,e₂}</choice>
<choice>Custom basis {b₁,b₂}</choice>
</choiceInput>
</p>

<graph xmin="-8" ymin="-8" xmax="8" ymax="8" displayXAxis="$standardBasis" displayYAxis="$standardBasis">
<!-- both views -->
<point coords="$v" styleNumber="1">
<label><m>\vec v</m></label>
</point>
<lineSegment draggable="false" endpoints="(0,0) $v" styleNumber="1"/>
<point coords="$b1" styleNumber="2">
<label><m>\vec b_1</m></label>
</point>
<lineSegment draggable="false" endpoints="(0,0) $b1" styleNumber="2"/>
<point coords="$b2" styleNumber="3">
<label><m>\vec b_2</m></label>
</point>
<lineSegment draggable="false" endpoints="(0,0) $b2" styleNumber="3"/>
<!-- standard basis -->
<point draggable="false" hide="not $standardBasis" coords="($v.x,0)" styleNumber="1">
<label><m>$v.x\vec e_1</m></label>
</point>
<lineSegment draggable="false" hide="not $standardBasis" endpoints="($v.x,0) $v" styleNumber="6"/>
<point draggable="false" hide="not $standardBasis" coords="(0,$v.y)" styleNumber="1">
<label><m>$v.y\vec e_2</m></label>
</point>
<lineSegment draggable="false" hide="not $standardBasis" endpoints="($0,$v.y) $v" styleNumber="6"/>
<!-- nonstandard basis -->
<line draggable="false" through="(0,0) $b1" styleNumber="2" hide="$standardBasis"/>
<line draggable="false" through="(0,0) $b2" styleNumber="3" hide="$standardBasis"/>
<point draggable="false" hide="$standardBasis" coords="$x*$b1" styleNumber="1">
<label><m>$x\vec b_1</m></label>
</point>
<lineSegment draggable="false" hide="$standardBasis" endpoints="$x*$b1 $v" styleNumber="6"/>
<point draggable="false" hide="$standardBasis" coords="$y*$b2" styleNumber="1">
<label><m>$y\vec b_2</m></label>
</point>
<lineSegment draggable="false" hide="$standardBasis" endpoints="$y*$b2 $v" styleNumber="6"/>
</graph>