\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\)
︡9e7dbd2a-edf2-482f-afa5-9ce4938b8aee︡
︠47db4997-3743-49d5-a8d0-e6cdb60428e0︠
%auto
%html(hide=True)
Sage and Linear Algebra Worksheet: FCLA Section ILT
Robert Beezer
Department of Mathematics and Computer Science
University of Puget Sound
Fall 2019
︡7f373a51-b138-49e2-adf5-f21fdf69ad80︡
︠4007742c-5ee8-4686-a955-e58046fbfa88︠
%auto
%html(hide=True)
Two carefully-crafted linear transformations: T
is injective, S
is not.
︡0dd363bf-9a55-4f5d-a09b-7521ed1a154d︡
︠84b681a3-14e7-49dc-a7e6-25b5792844e9︠
A = matrix(QQ, [[1, 2, 2], [3, 7, 6], [1, 2, 1], [2, 5, 7]])
T = linear_transformation(QQ^3, QQ^4, A, side='right')
︡17ecd6e7-a0b8-4756-a4c4-afa541f7a4b8︡
︠ddfbad29-5c91-4506-ab42-0f2a46c3e68a︠
T.is_injective()
︡f57f12c4-b214-4365-a92a-c39eed5a1319︡
︠d1f5017d-52f6-472d-acc0-683072dccf0d︠
T.kernel()
︡8ef84f9b-deed-4550-a22c-29569d87956a︡
︠3f927d20-90e7-4d3d-ad6f-a99002d897ef︠
B = matrix(QQ, [[0, 1, -2], [-1, 1, 3], [-2, 5, 0], [0, 2, -4]])
S = linear_transformation(QQ^3, QQ^4, B, side='right')
︡11eb4686-6174-4948-a62e-6c7fd71a0b1f︡
︠b21ae506-c683-4b18-a38a-2e7ad42fe3bf︠
S.is_injective()
︡26231091-7580-4932-a17a-b99347767692︡
︠6b98fa98-c1e4-4177-a48f-f4988df0376d︠
K = S.kernel()
K
︡9c8358ee-0a0f-4e26-a66f-654fdccdcf53︡
︠dff625e0-4fb4-4e96-a50d-56295062e323︠
%auto
%html(hide=True)
We create two different inputs, which differ by a random vector from the kernel (which we hope is not simply the zero vector, a distinct possibility). We always get the same output from S
, predictably. If we try this with T
then the kernel vector is always the zero vector and the demonstration is very uninteresting.
︡6f2655b3-6f31-441b-aa6b-7b2a58aca9fc︡
︠d6bfd059-4c97-4dd8-a88f-40b7b1f6d9fc︠
z = K.random_element()
u = random_vector(QQ, 3)
w = u + z
u, w, S(u), S(w), S(u) == S(w)
︡5c30c112-a5e4-4cb2-a54b-59b0071fdf8d︡
︠ce9ff600-8b66-4f22-a287-dd08e0000df8︠
%auto
%html(hide=True)
This work is Copyright 2016–2019 by Robert A. Beezer. It is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
︡b71cde89-61b2-42a8-aa9c-df47b01d3c3c︡
︠1db92a60-2b21-458a-ab4b-0fba88076b8c︠
%auto
%html(hide=True)