diff --git a/source/linear-algebra/exercises/outcomes/AT/AT4/generator.sage b/source/linear-algebra/exercises/outcomes/AT/AT4/generator.sage index 02c4eb1a0..184831a4f 100644 --- a/source/linear-algebra/exercises/outcomes/AT/AT4/generator.sage +++ b/source/linear-algebra/exercises/outcomes/AT/AT4/generator.sage @@ -3,58 +3,75 @@ TBIL.config_matrix_typesetting() class Generator(BaseGenerator): def data(self): - surjective = choice([True,False]) - if surjective: - rank = 4 + flip = choice([True,False]) + # surjection + A=CheckIt.simple_random_matrix_of_rank(4,rows=4,columns=5) + if flip: + scenario = "columns" else: - rank = choice([2,3]) - A=CheckIt.simple_random_matrix_of_rank(rank,rows=4,columns=5) - - tasks = [{ - "injective": False, - "surjective": surjective, - "vecset": TBIL.VectorSet(A.columns()), + scenario = "kerimg" + tasks = [{ + "surj": True, + "value": True, + scenario: True, "matrix": A, "rref": A.rref(), }] - - injective = choice([True,False]) - if injective: - rank = 3 + # non surjection + A=CheckIt.simple_random_matrix_of_rank(choice([2,3]),rows=4,columns=5) + if flip: + scenario = "kerimg" else: - rank = 2 - A=CheckIt.simple_random_matrix_of_rank(rank,rows=4,columns=3) - - tasks += [{ - "injective": injective, - "surjective": False, - "vecset": TBIL.VectorSet(A.columns()), + scenario = "columns" + tasks += [{ + "surj": True, + "value": False, + scenario: True, "matrix": A, "rref": A.rref(), }] - rank = choice([2,3]) - A=CheckIt.simple_random_matrix_of_rank(rank,rows=4,columns=4) - - tasks += [{ - "injective": False, - "surjective": False, - "vecset": TBIL.VectorSet(A.columns()), + + flip = choice([True,False]) + # injection + A=CheckIt.simple_random_matrix_of_rank(3,rows=4,columns=3) + if flip: + scenario = "columns" + else: + scenario = "kerimg" + tasks += [{ + "inj": True, + "value": True, + scenario: True, "matrix": A, "rref": A.rref(), }] - - rank = 4 - A=CheckIt.simple_random_matrix_of_rank(rank,rows=4,columns=4) - - tasks += [{ - "injective": True, - "surjective": True, - "vecset": TBIL.VectorSet(A.columns()), + # non surjection + A=CheckIt.simple_random_matrix_of_rank(2,rows=4,columns=3) + if flip: + scenario = "kerimg" + else: + scenario = "columns" + tasks += [{ + "inj": True, + "value": False, + scenario: True, "matrix": A, "rref": A.rref(), }] shuffle(tasks) - return {"tasks": tasks} + flip = choice([True, False]) + if flip: + rank = 4 + else: + rank = choice([2,3]) + A=CheckIt.simple_random_matrix_of_rank(rank,rows=4,columns=4) + + return { + "tasks": tasks, + "last_value": flip, + "last_matrix": A, + "last_rref": A.rref(), + } diff --git a/source/linear-algebra/exercises/outcomes/AT/AT4/template.xml b/source/linear-algebra/exercises/outcomes/AT/AT4/template.xml index 1f6a61172..a4c8fcd42 100644 --- a/source/linear-algebra/exercises/outcomes/AT/AT4/template.xml +++ b/source/linear-algebra/exercises/outcomes/AT/AT4/template.xml @@ -1,32 +1,31 @@ - - -

- Explain how to determine if a transformation is an injection - and/or surjection in terms of spanning and independence of a particular set. -

-
- -

- Consider the set of vectors taken from the columns of - the transformation's standard matrix. - The transformation is an injection if this set (...) - and the transformation is a surjection if this set (...). -

-
-
- - -

- Determine if the transformation defined by each of the - following standard matrices is an injection and/or surjection. -

-
+ +

+For each of the following standard matrices, discuss the requested property +to determine its transformation's surjectivity and/or injectivity. +

+
-

{{matrix}}

+

+Explain whether the transformation with standard matrix +{{matrix}} is + +surjective + + +injective + +by discussing + +the spanning and/or independence of its column vectors. + + +its kernel and/or image. + +

@@ -35,46 +34,93 @@

- The set of vectors is (...), and thus - the transformation - - is - - - is not - - injective. -

-

- The set of vectors is (...), and thus - the transformation - - is - - - is not - - surjective. -

+ The matrix is + + + surjective + + + not surjective + + + + + injective + + + not injective + + + because + + + + its column vectors span the codomain. + + + its column vectors fail to span the codomain. + + + + + its column vectors are linearly independent. + + + its column vectors are linearly dependent. + + + + + + + its image is its entire codomain. + + + its image is not its entire codomain. + + + + + its kernel contains only the zero vector. + + + its kernel contains more than the zero vector. + + + +

-

-Explain which of the above transformations was bijective. +Explain whether the transformation with standard matrix +{{last_matrix}} is bijective by discussing the pivots of +its reduced row echelon form.

- - - -The transformation with matrix {{matrix}} because... - - - + + \mathrm{RREF}\, {{last_matrix}} = {{last_rref}} + +

+

+The transformation is + +bijective + + +not bijective + +because + +every row and column of its standard matrix's RREF contains a pivot. + + +it has a non-pivot row or column in its standard matrix's RREF. +