Skip to content
Merged
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
6 changes: 3 additions & 3 deletions source/common/sagemath/library.sage
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,12 @@ class TBIL:

#Vector equation class
class LinearCombinationFromMatrix(LinearCombination):
def __init__(self,A,vars=None):
def __init__(self,A,coefficients=None):
A=A.subdivision(0,0) # ignores augmented matrices
if vars is None:
if coefficients is None:
self.coefficients=[var(f"x_{i}") for i in range(1,len(A.columns())+1)]
else:
self.coefficients=[vars[:len(A.columns())]]
self.coefficients=coefficients[:len(A.columns())]
self.vectors=[column_matrix(v) for v in A.columns()]
self.length=min(len(self.coefficients),len(self.vectors))
self.parentheses=False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Generator(BaseGenerator):
"Tcols": Tcolumns,
"Tstandardmatrix": B,
"vector": v,
"Tvector": B*v
"Tvector": B*v,
"Tcombo": TBIL.LinearCombinationFromMatrix(B,coefficients=list(v))
}

38 changes: 27 additions & 11 deletions source/linear-algebra/exercises/outcomes/AT/AT2/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,43 @@
<knowl mode="exercise" xmlns="https://spatext.clontz.org" version="0.2">
<knowl>
<content>
<p>Explain and demonstrate how to compute
the standard matrix for the linear transformation
<m>S:\mathbb{R}^{{Scols}} \to \mathbb{R}^{{Srows}}</m> given by
<me>S\left( {{varvector}} \right) = {{varmap}}</me>
by computing transformations of the standard basic vectors.</p>
<p>
Explain and demonstrate how to compute
the standard matrix for the linear transformation
<m>S:\mathbb{R}^{{Scols}} \to \mathbb{R}^{{Srows}}</m> given by
<me>S\left( {{varvector}} \right) = {{varmap}}</me>
by computing transformations of the standard basic vectors.
</p>
</content>
<outtro>
<p><me>{{Sstandardmatrix}}</me></p>
</outtro>
</knowl>
<knowl>
<content>
<p>Let <m>T:\mathbb{R}^{{Tcols}} \to \mathbb{R}^{{Trows}}</m>
be the linear transformation given by the standard matrix
<me>{{Tstandardmatrix}}.</me>
Explain and demonstrate how to compute
<m>T\left({{vector}}\right)</m> by using the values of
transformed standard basic vectors.</p>
<p>
Let <m>T:\mathbb{R}^{{Tcols}} \to \mathbb{R}^{{Trows}}</m>
be the linear transformation given by the standard matrix
<me>{{Tstandardmatrix}}.</me>
Compute <m>T\left({{vector}}\right)</m> using technology.
</p>
</content>
<outtro>
<p><me>T\left({{vector}}\right)={{Tvector}}</me></p>
</outtro>
</knowl>
<knowl>
<content>
<p>
Now explain and demonstrate how to compute
<m>T\left({{vector}}\right)</m> by using the values of
transformed standard basic vectors.
</p>
</content>
<outtro>
<p><me>
T\left({{vector}}\right)={{Tcombo}}={{Tvector}}
</me></p>
</outtro>
</knowl>
</knowl>
Loading