From 7c40a372c641c87a4454b4762fc360713144bbc9 Mon Sep 17 00:00:00 2001 From: Drew Lewis Date: Wed, 13 May 2026 21:33:12 +0000 Subject: [PATCH 1/4] EV1 plot --- source/linear-algebra/source/02-EV/01.ptx | 41 ++++++++++++++----- .../source/02-EV/code/ev1-remark-span1.sage | 9 ++++ ...remark-span.sage => ev1-remark-span2.sage} | 12 ++---- 3 files changed, 43 insertions(+), 19 deletions(-) create mode 100644 source/linear-algebra/source/02-EV/code/ev1-remark-span1.sage rename source/linear-algebra/source/02-EV/code/{ev1-remark-span.sage => ev1-remark-span2.sage} (50%) diff --git a/source/linear-algebra/source/02-EV/01.ptx b/source/linear-algebra/source/02-EV/01.ptx index e09a7399a..9b7974ce5 100644 --- a/source/linear-algebra/source/02-EV/01.ptx +++ b/source/linear-algebra/source/02-EV/01.ptx @@ -525,7 +525,7 @@ It is important to remember that

For example, - +S= \setList { \left[\begin{array}{c} 1 \\ -1 \\ 2 \end{array}\right], @@ -533,7 +533,7 @@ For example, } is a set containing exactly two vectors, while - +\vspan S = \vspan\setList { \left[\begin{array}{c} 1 \\ -1 \\ 2 \end{array}\right], @@ -546,15 +546,34 @@ b\left[\begin{array}{c} 1 \\ 2 \\ 1 \end{array}\right] a,b\in\IR } -is a set containing infinitely-many vectors.

-

See the below -Sage cell for an illustration. -

- - - - - +is a set containing infinitely-many vectors. +

+
+ + + + + +

An interactive 3-D plot showing the two vectors in S

+ + + + + +

An interactive 3-D plot showing the vectors in \vspan S

+ +
+ +

+ Two interactive 3-D plots showing the two vectors in S on the + left and \vspan S on the right. +

+

+ Two plots showing the two vectors in S on the + left and \vspan S on the right. +

+ +
diff --git a/source/linear-algebra/source/02-EV/code/ev1-remark-span1.sage b/source/linear-algebra/source/02-EV/code/ev1-remark-span1.sage new file mode 100644 index 000000000..14627afa9 --- /dev/null +++ b/source/linear-algebra/source/02-EV/code/ev1-remark-span1.sage @@ -0,0 +1,9 @@ +v1 = vector([1,-1,2]) +v2 = vector([1,2,1]) + +# illustrate set of two vectors + +p = plot(v1,thickness=5) +p += plot(v2,thickness=5) +p=p.rotate([1,0,0],3*pi/4) +p \ No newline at end of file diff --git a/source/linear-algebra/source/02-EV/code/ev1-remark-span.sage b/source/linear-algebra/source/02-EV/code/ev1-remark-span2.sage similarity index 50% rename from source/linear-algebra/source/02-EV/code/ev1-remark-span.sage rename to source/linear-algebra/source/02-EV/code/ev1-remark-span2.sage index a4a97e350..5db7278ab 100644 --- a/source/linear-algebra/source/02-EV/code/ev1-remark-span.sage +++ b/source/linear-algebra/source/02-EV/code/ev1-remark-span2.sage @@ -1,17 +1,13 @@ v1 = vector([1,-1,2]) v2 = vector([1,2,1]) -# illustrate set of two vectors -p = plot(v1) -p += plot(v2) -show(p) - -# illustrate the *span* that set +# illustrate the *span* p = plot([]) for _ in range(1000): a = randrange(-99,100) b = randrange(-99,100) - p += plot(a*v1+b*v2) -show(p) + p += plot(a*v1+b*v2, thickness=15) +p=p.rotate([1,0,0],3*pi/4) +p \ No newline at end of file From e3093e72023f478d7a59f5e71ac9ba2123a89628 Mon Sep 17 00:00:00 2001 From: Drew Lewis Date: Wed, 13 May 2026 21:39:55 +0000 Subject: [PATCH 2/4] Merge branch to fix xml:id error --- source/linear-algebra/source/01-LE/01.ptx | 12 ++-- source/linear-algebra/source/02-EV/01.ptx | 39 ++++++------ .../02-EV/doenet/EV1-span-two-vectors.xml | 59 +++++++++++++++++++ 3 files changed, 84 insertions(+), 26 deletions(-) create mode 100644 source/linear-algebra/source/02-EV/doenet/EV1-span-two-vectors.xml diff --git a/source/linear-algebra/source/01-LE/01.ptx b/source/linear-algebra/source/01-LE/01.ptx index a2c54d722..9b0099eed 100644 --- a/source/linear-algebra/source/01-LE/01.ptx +++ b/source/linear-algebra/source/01-LE/01.ptx @@ -508,7 +508,7 @@ system). Otherwise it is inconsistent.inconsistent linear s
Intersection of three planes at one point - + @@ -516,7 +516,7 @@ system). Otherwise it is inconsistent.inconsistent linear s

Three planes are shown to intersect at a single point. An arrow points to the point of intersection at coordinates (1,2,3).

- + @@ -528,7 +528,7 @@ system). Otherwise it is inconsistent.inconsistent linear s
Intersection of three planes at a line - + @@ -536,7 +536,7 @@ system). Otherwise it is inconsistent.inconsistent linear s

Three planes are shown to intersect along a line of points.

- + @@ -548,7 +548,7 @@ system). Otherwise it is inconsistent.inconsistent linear s
Three non-mutually-intersecting planes - + @@ -556,7 +556,7 @@ system). Otherwise it is inconsistent.inconsistent linear s

Three planes are shown to intersect at no common point, although each pair of planes intersects along a line of points.

- + diff --git a/source/linear-algebra/source/02-EV/01.ptx b/source/linear-algebra/source/02-EV/01.ptx index 9b7974ce5..2558410ca 100644 --- a/source/linear-algebra/source/02-EV/01.ptx +++ b/source/linear-algebra/source/02-EV/01.ptx @@ -221,27 +221,26 @@ we refer to this real number as a scalar.

-

- Correct the SageMath code cell below to generate - an illustration of several vectors belonging to - \vspan\left\{\left[\begin{array}{c}1\\2\end{array}\right], - \left[\begin{array}{c}-1\\1\end{array}\right]\right\}= - \setBuilder{a\left[\begin{array}{c}1\\2\end{array}\right]+ - b\left[\begin{array}{c}-1\\1\end{array}\right]}{a, b \in \IR} - in the xy plane. -

- - - - - -

- Based on this illustration, which of these geometrical objects - best describes the span of these two vectors? +

+ In addition to the combinations above, use the interactive below to graph an additional + 5 or more vectors belonging to + \vspan\left\{\left[\begin{array}{c}1\\2\end{array}\right], + \left[\begin{array}{c}-1\\1\end{array}\right]\right\}= + \setBuilder{a\left[\begin{array}{c}1\\2\end{array}\right]+ + b\left[\begin{array}{c}-1\\1\end{array}\right]}{a, b \in \IR} + in the xy plane.

-

- Which of these geometrical objects - best describes the span of these two vectors? + + + + + +

An interactive that graphs linear combinations of the vectors \left[\begin{array}{c}1\\2\end{array}\right] and + \left[\begin{array}{c}-1\\1\end{array}\right].

+ + +

+ Which of these geometrical objects best describes the span of these two vectors?

  1. A line
  2. diff --git a/source/linear-algebra/source/02-EV/doenet/EV1-span-two-vectors.xml b/source/linear-algebra/source/02-EV/doenet/EV1-span-two-vectors.xml new file mode 100644 index 000000000..cfaf9f54e --- /dev/null +++ b/source/linear-algebra/source/02-EV/doenet/EV1-span-two-vectors.xml @@ -0,0 +1,59 @@ +

    + Enter several pairs of coefficients (a,b), separated by commas: + +

    + + + (1,2) + (-1,1) + $in + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Graph of two vectors and linear combinations thereof + + + + + + + From 3bcd39a72a86b7d2ee0bf7a96a3b3c6ae8117b54 Mon Sep 17 00:00:00 2001 From: Drew Lewis Date: Wed, 13 May 2026 21:45:46 +0000 Subject: [PATCH 3/4] EV2 interactive --- source/linear-algebra/source/02-EV/02.ptx | 32 ++++++------------- .../source/02-EV/code/ev2-span-visual.sage | 10 +++--- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/source/linear-algebra/source/02-EV/02.ptx b/source/linear-algebra/source/02-EV/02.ptx index 8e9913244..a134278e7 100644 --- a/source/linear-algebra/source/02-EV/02.ptx +++ b/source/linear-algebra/source/02-EV/02.ptx @@ -262,31 +262,19 @@ The vector does not belong to the span.

    - - -

    -Fix the SageMath code below to visualize + + +

    We can use technology to visualize \vspan\left\{\left[\begin{array}{c}1\\-1\\0\end{array}\right], \left[\begin{array}{c}-2\\0\\1\end{array}\right],\left[\begin{array}{c}-2\\-2\\2\end{array}\right]\right\}. -

    - - +

    + + - -
    -
    - - - -v2 = vector([-2,0,1]) -v3 = vector([-2,-2,2]) -# ... -linear_combo = a*v1 + b*v2 + c*v3 - - - -
    - + +

    An interactive 3-D plot showing the span

    + +

    diff --git a/source/linear-algebra/source/02-EV/code/ev2-span-visual.sage b/source/linear-algebra/source/02-EV/code/ev2-span-visual.sage index 2d87214d2..49a065c29 100644 --- a/source/linear-algebra/source/02-EV/code/ev2-span-visual.sage +++ b/source/linear-algebra/source/02-EV/code/ev2-span-visual.sage @@ -3,8 +3,8 @@ p = plot([]) # define three vectors v1 = vector([1,-1,0]) -v2 = vector(FIXME) -v3 = vector(FIXME) +v2 = vector([-2,0,1]) +v3 = vector([-2,-2,2]) # do this 100 times for _ in range(100): @@ -13,9 +13,9 @@ for _ in range(100): b = randrange(-9,10) c = randrange(-9,10) # create linear combination - linear_combo = a*v1 + b*v2 + FIXME + linear_combo = a*v1 + b*v2 + c*v3 # add it to the plot - p += plot(linear_combo) + p += plot(linear_combo,thickness=5) # show the plot -show(p) +p From fdefe561845f75b8326932341c782fa1d8fb4486 Mon Sep 17 00:00:00 2001 From: Drew Lewis Date: Wed, 13 May 2026 22:25:45 +0000 Subject: [PATCH 4/4] Tweak --- source/linear-algebra/source/02-EV/02.ptx | 2 ++ source/linear-algebra/source/02-EV/code/ev2-span-visual.sage | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/linear-algebra/source/02-EV/02.ptx b/source/linear-algebra/source/02-EV/02.ptx index a134278e7..d8624702a 100644 --- a/source/linear-algebra/source/02-EV/02.ptx +++ b/source/linear-algebra/source/02-EV/02.ptx @@ -274,6 +274,8 @@ The vector does not belong to the span.

    An interactive 3-D plot showing the span

    +

    Rotate the plot to see that the vectors all lie in the same plane.

    +

    Note that the vectors all lie in the same plane.

    diff --git a/source/linear-algebra/source/02-EV/code/ev2-span-visual.sage b/source/linear-algebra/source/02-EV/code/ev2-span-visual.sage index 49a065c29..4d30a1e44 100644 --- a/source/linear-algebra/source/02-EV/code/ev2-span-visual.sage +++ b/source/linear-algebra/source/02-EV/code/ev2-span-visual.sage @@ -15,7 +15,7 @@ for _ in range(100): # create linear combination linear_combo = a*v1 + b*v2 + c*v3 # add it to the plot - p += plot(linear_combo,thickness=5) + p += plot(linear_combo,thickness=2) # show the plot p