diff --git a/source/linear-algebra/exercises/outcomes/MX/MX1/generator.sage b/source/linear-algebra/exercises/outcomes/MX/MX1/generator.sage index 0859ada84..93417aa86 100644 --- a/source/linear-algebra/exercises/outcomes/MX/MX1/generator.sage +++ b/source/linear-algebra/exercises/outcomes/MX/MX1/generator.sage @@ -22,16 +22,17 @@ class Generator(BaseGenerator): productName = letters[indices.index("L")] + letters[indices.index("R")] product = matrices[indices.index("L")] * matrices[indices.index("R")] + + ordinal = randrange(product.ncols()) + ordinal_string = ["first", "second", "third", "fourth"][ordinal] return { "A": matrices[0], "B": matrices[1], "C": matrices[2], -# "leftMatrix": letters[indices.index("L")], -# "rightMatrix": letters[indices.index("R")], -# "leftDim": dims[0], -# "middleDim": dims[1], -# "rightDim": dims[2], "productName": productName, "product": product, + "ord_value": ordinal+1, + "ordinal": ordinal_string, + "ord_col": column_matrix(product.column(ordinal)), } diff --git a/source/linear-algebra/exercises/outcomes/MX/MX1/template.xml b/source/linear-algebra/exercises/outcomes/MX/MX1/template.xml index 597868244..3e764c22a 100644 --- a/source/linear-algebra/exercises/outcomes/MX/MX1/template.xml +++ b/source/linear-algebra/exercises/outcomes/MX/MX1/template.xml @@ -18,22 +18,23 @@ -

Find their product using technology.

+

Show how to find the {{ordinal}} column of this product without technology.

- -

- {{productName}} = {{product}} -

-
+ +

+ +{{productName}}\vec e_{ {{ord_value}} } = {{ord_col}} + +

+
-

Show how to find this product without technology.

+

Find their product using technology.

- Compute each {{productName}}\vec e_i to obtain - each column. + {{productName}} = {{product}}