If M is the tuple module R^((m)) and N is the tuple module R^((n)), create the module Hom_(R)(M, N) as the (R, R)-bimodule R^((m x n)), represented as the set of all m x n matrices over R. The module is created with the standard basis, {E_(ij) | i = 1 ..., m, j = 1 ..., n}, where E_(ij) is the matrix having a 1 in the (i, j)-th position and zeros elsewhere.
Suppose M is a matrix module over the coefficient ring R whose elements are a by b matrices and have domain D and codomain C. Suppose also that N is a matrix module over the coefficient ring R whose elements are a by c matrices and have domain D and codomain C'. Then the homomorphism module H = Hom(M, N) with right multiplication action exists and consists of all b by c matrices over R which multiply an element of M on the right to yield an element of N. This function constructs H explicitly. The domain of elements of H is then M and the codomain of elements of H is N and the elements are b by c matrices over R which multiply an element of M on the right to yield an element of N. Note that if M and N are proper submodules of their respective generic modules, then H may be a proper submodule of its generic module, and the correct basis of H will be explicitly constructed.
Suppose M is a matrix module over the coefficient ring R whose elements are a by c matrices and have domain D and codomain C. Suppose also that N is a matrix module over the coefficient ring R whose elements are b by c and have domain D' and codomain C. Then the homomorphism module H = Hom(M, N) with left multiplication action exists and consists of all b by a matrices over R which multiply an element of M on the left to yield an element of N. This function constructs H explicitly. The domain of elements of H is then M and the codomain of elements of H is N and the elements are b by a matrices over R which multiply an element of M on the right to yield an element of N. Note that if M and N are proper submodules of their respective generic modules, then H may be a proper submodule of its generic module, and the correct basis of H will be explicitly constructed.
Given a ring R and positive integers m and n, construct H = Hom(M, N), where M = R^((m)) and N = R^((n)), as the free (R, R)-bimodule R^((m x n)), consisting of all m x n matrices over R. The module is created with the standard basis, {E_(ij) | i = 1 ..., m, j = 1 ..., m}. Note that the modules M and N are created by this function and may be accessed as Domain(H) and Codomain(H), respectively.
Given a sequence Q of k independent matrices each lying in a matrix space H = Hom(M, N), where M = R^((m)) and N = R^((n)), construct the subspace of H of dimension k whose basis is Q. The basis is echelonized internally but all functions which depend on the basis of the matrix space (e.g. Coordinates) will use the given basis Q.
Given a sequence Q of k independent matrices each lying in a matrix space H = Hom(M, N), where M = K^((m)) and N = K^((n)), with K a field, construct the subspace of H of dimension k whose basis is Q. The basis is echelonized internally but all functions which depend on the basis of the matrix space (e.g. Coordinates) will use the given basis Q.
If M is the free R-module R^((m)), create the matrix algebra Mat_m(R). The algebra is created with the standard basis, {E_(ij) | i = 1 ..., m, j = 1 ..., m}, where E_(ij) is the matrix having a 1 in the (i, j)-th position and zeros elsewhere.
> F2 := GaloisField(2); > V := VectorSpace(F2, 3); > W := VectorSpace(F2, 4); > M := Hom(V, W); > M; Full KMatrixSpace of 3 by 4 matrices over GF(2)We construct the endomorphism ring of the 4-dimensional vector space over the rational field.
> Q := RationalField(); > R4 := RModule(Q, 4); > M := EndomorphismAlgebra(R4); > M; Full Matrix Algebra of degree 4 over Rational Field
> Q := RationalField(); > H1 := sub<RMatrixSpace(Q, 2, 3) | [1,2,3, 4,5,6], [0,0,1, 1,3,3]>; > H2 := sub<RMatrixSpace(Q, 2, 4) | [6,5,7,1, 15,14,16,4], [0,0,0,0, 1,2,3,4]>; > H := Hom(H1, H2, "right"); > H: Maximal; KMatrixSpace of 3 by 4 matrices and dimension 1 over Rational Field Echelonized basis:
[ 1 2 3 4] [-1/2 -1 -3/2 -2] [ 0 0 0 0]
> H1.1 * H.1; [ 0 0 0 0] [3/2 3 9/2 6] > H1.1 * H.1 in H2; true > Image(H.1): Maximal; KMatrixSpace of 2 by 4 matrices and dimension 1 over Rational Field Echelonized basis:
[0 0 0 0] [1 2 3 4]
> Kernel(H.1): Maximal; KMatrixSpace of 2 by 3 matrices and dimension 1 over Rational Field Echelonized basis:
[ 1 2 6] [ 7 14 15]
> H1 := sub<RMatrixSpace(Q,2,3) | [1,2,3, 4,5,6]>; > H2 := sub<RMatrixSpace(Q,3,3) | [1,2,3, 5,7,9, 4,5,6]>; > H := Hom(H1, H2, "left"); > H: Maximal; KMatrixSpace of 3 by 2 matrices and dimension 1 over Rational Field Echelonized basis:
[1 0] [1 1] [0 1] > Image(H.1); KMatrixSpace of 3 by 3 matrices and dimension 1 over Rational Field > Kernel(H.1); KMatrixSpace of 2 by 3 matrices and dimension 0 over Rational Field
> P := GModule(CyclicGroup(11), GF(3)); > F := Constituents(P); > F; [ GModule of dimension 1 over GF(3), GModule of dimension 5 over GF(3), GModule of dimension 5 over GF(3) ] > H1 := GHom(P, F[2]); > H1; KMatrixSpace of 2 by 3 matrices and dimension 1 over Rational Field > H := Hom(H1, H1, "right"); > H: Maximal; KMatrixSpace of 5 by 5 matrices and dimension 5 over GF(3) Echelonized basis:
[1 0 0 0 0] [0 1 0 0 0] [0 0 1 0 0] [0 0 0 1 0] [0 0 0 0 1]
[0 1 0 0 0] [1 1 1 2 1] [2 0 2 1 1] [2 1 0 0 0] [0 2 1 0 0]
[0 0 1 0 0] [2 0 2 1 1] [2 2 2 2 2] [2 0 1 0 2] [1 0 1 2 1]
[0 0 0 1 0] [2 1 0 0 0] [2 0 1 0 2] [2 2 1 2 2] [2 1 1 0 1]
[0 0 0 0 1] [0 2 1 0 0] [1 0 1 2 1] [2 1 1 0 1] [2 1 0 0 2]