Skip to content

Commit 1d21a40

Browse files
authored
Add technology exploration in AT2 (#943)
* Add technology exploration in AT2 * fix bug in linear combo helper * update AT2 checkit
1 parent c1d233e commit 1d21a40

4 files changed

Lines changed: 229 additions & 45 deletions

File tree

source/common/sagemath/library.sage

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,12 @@ class TBIL:
578578

579579
#Vector equation class
580580
class LinearCombinationFromMatrix(LinearCombination):
581-
def __init__(self,A,vars=None):
581+
def __init__(self,A,coefficients=None):
582582
A=A.subdivision(0,0) # ignores augmented matrices
583-
if vars is None:
583+
if coefficients is None:
584584
self.coefficients=[var(f"x_{i}") for i in range(1,len(A.columns())+1)]
585585
else:
586-
self.coefficients=[vars[:len(A.columns())]]
586+
self.coefficients=coefficients[:len(A.columns())]
587587
self.vectors=[column_matrix(v) for v in A.columns()]
588588
self.length=min(len(self.coefficients),len(self.vectors))
589589
self.parentheses=False

source/linear-algebra/exercises/outcomes/AT/AT2/generator.sage

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Generator(BaseGenerator):
3939
"Tcols": Tcolumns,
4040
"Tstandardmatrix": B,
4141
"vector": v,
42-
"Tvector": B*v
42+
"Tvector": B*v,
43+
"Tcombo": TBIL.LinearCombinationFromMatrix(B,coefficients=list(v))
4344
}
4445

source/linear-algebra/exercises/outcomes/AT/AT2/template.xml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,43 @@
22
<knowl mode="exercise" xmlns="https://spatext.clontz.org" version="0.2">
33
<knowl>
44
<content>
5-
<p>Explain and demonstrate how to compute
6-
the standard matrix for the linear transformation
7-
<m>S:\mathbb{R}^{{Scols}} \to \mathbb{R}^{{Srows}}</m> given by
8-
<me>S\left( {{varvector}} \right) = {{varmap}}</me>
9-
by computing transformations of the standard basic vectors.</p>
5+
<p>
6+
Explain and demonstrate how to compute
7+
the standard matrix for the linear transformation
8+
<m>S:\mathbb{R}^{{Scols}} \to \mathbb{R}^{{Srows}}</m> given by
9+
<me>S\left( {{varvector}} \right) = {{varmap}}</me>
10+
by computing transformations of the standard basic vectors.
11+
</p>
1012
</content>
1113
<outtro>
1214
<p><me>{{Sstandardmatrix}}</me></p>
1315
</outtro>
1416
</knowl>
1517
<knowl>
1618
<content>
17-
<p>Let <m>T:\mathbb{R}^{{Tcols}} \to \mathbb{R}^{{Trows}}</m>
18-
be the linear transformation given by the standard matrix
19-
<me>{{Tstandardmatrix}}.</me>
20-
Explain and demonstrate how to compute
21-
<m>T\left({{vector}}\right)</m> by using the values of
22-
transformed standard basic vectors.</p>
19+
<p>
20+
Let <m>T:\mathbb{R}^{{Tcols}} \to \mathbb{R}^{{Trows}}</m>
21+
be the linear transformation given by the standard matrix
22+
<me>{{Tstandardmatrix}}.</me>
23+
Compute <m>T\left({{vector}}\right)</m> using technology.
24+
</p>
2325
</content>
2426
<outtro>
2527
<p><me>T\left({{vector}}\right)={{Tvector}}</me></p>
2628
</outtro>
2729
</knowl>
30+
<knowl>
31+
<content>
32+
<p>
33+
Now explain and demonstrate how to compute
34+
<m>T\left({{vector}}\right)</m> by using the values of
35+
transformed standard basic vectors.
36+
</p>
37+
</content>
38+
<outtro>
39+
<p><me>
40+
T\left({{vector}}\right)={{Tcombo}}={{Tvector}}
41+
</me></p>
42+
</outtro>
43+
</knowl>
2844
</knowl>

0 commit comments

Comments
 (0)