In this section we define a linear transformation from \(\mathbb{C}^6\) to \(\mathbb{C}^4\text{.}\) The definition is a \(4\times 6\) matrix of rank \(4\) that we will use to multiply input vectors with a matrix-vector product. It is not important if the linear transformation is injective and/or surjective.
︡56e4995e-cbb1-4338-aff7-3752590a2f6a︡
︠3c120ab6-8814-4958-a247-98fea48afba5︠
m, n = 4, 6
A = random_matrix(QQ, m, n, algorithm='echelonizable', rank=m, upper_bound=9)
A
︡5e17021b-8a3a-4fd0-a7f5-f9df874123cd︡
︠92bb9beb-6659-4147-a1c6-6b03b8bf9d26︠
T = linear_transformation(A, side='right')
T
︡ac857215-d7c2-41e7-a804-f6f0aa86a23c︡
︠9e914135-61d3-43e1-ab71-f68f63af942d︠
%auto
%html(hide=True)
And we construct two random bases, one for the domain and one for the codomain, extracted from the columns of unimodular matrices.
︡1bcad0b1-6223-4662-a829-a102176b7009︡
︠d159c3a8-50b7-431e-a590-e32f636dfddf︠
Dmat = random_matrix(QQ, n, n, algorithm='unimodular', upper_bound=9)
D = Dmat.columns()
D
︡7a1d4e0e-65e1-4d22-ab7c-b60d571b4091︡
︠00c1d1fe-f63e-4700-aac7-78d763e7f388︠
Cmat = random_matrix(QQ, m, m, algorithm='unimodular', upper_bound=9)
C = Cmat.columns()
C
︡4991b72b-5118-4f99-af46-7be53491b844︡
︠19dab81d-36f4-4ffe-a9f2-f6ddc0152dd7︠
%auto
%html(hide=True)
We will coordinatize the outputs of the linear transformation, for inputs from the basis of the domain, relative to the basis of the codomain, and pack them in a matrix.
︡ea3738f3-ea87-4a94-a4b7-b2e51e975838︡
︠213596e8-ad32-44db-a817-fd9e2acc1254︠
outputs = [T(b) for b in D]
outputs
︡b76edf4b-7f9a-41d7-ad69-566e49816a3b︡
︠ff35d052-cd15-4833-af1a-9600459d6f8a︠
%auto
%html(hide=True)
We make a vector space for the codomain, with the desired basis.
︡bf3079ea-3baa-4958-a58f-ea73bdbfbdd8︡
︠59799f28-a544-40d9-a832-71cf58c177e5︠
coord = [VC.coordinate_vector(t) for t in outputs]
coord
︡04e8d87f-1255-4653-a0e6-36705c82d09b︡
︠6af52dea-cfc2-4538-a846-e7c6713f410d︠
%auto
%html(hide=True)
OK, coordinatize input, multiply by representation matrix, un-coordinatize (linear combination). This is the fundamental Theorem FTMR at work.
︡1c8285ff-3cac-470c-a773-ee9d6985c0f3︡
︠f0f827e2-71e1-4d62-aad9-dc76aef24c23︠
u = random_vector(QQ, 6)
out = VC.linear_combination_of_basis(rep*VD.coordinate_vector(u))
u, out, T(u) == out
︡f24fb669-8eb7-408e-a22c-b08362265638︡
︠a3ae2659-fe7b-4583-a4b6-0768adbd3146︠
%auto
%html(hide=True)
Now we replace the domain and codomain with new vector spaces, carrying different bases. We are not really “restricting” the domain and codomain, we are replacing them by the same vector space, but each has a different basis.