[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Construction of Matrix Algebras and their Elements

Construction of Matrix Algebras and their Elements

Subsections

Construction of the Complete Matrix Algebra

MatrixAlgebra(S, n) : Rng, RngIntElt -> AlgMat
MatrixRing(S, n) : Rng, RngIntElt -> AlgMat
Given a positive integer n and a ring S, create the complete matrix algebra M_n(S), consisting of all n x n matrices with coefficients in the ring S.

Construction of a Matrix

elt< R | L > : AlgMat, RngElt -> AlgMatElt
Given a matrix algebra defined as a subalgebra of M_n(S), create the element of R defined by the list L of n^2 elements from S.
R ! Q : AlgMat, [ RngElt ] -> AlgMatElt
Given a matrix algebra R defined as a subalgebra of M_n(S). and a sequence Q=[a_(11), ..., a_(1n), a_(21), ..., a_(2n), ..., a_(n1), ..., a_(nn)] of n^2 elements of S, return the matrix
   [ a_11 a_12 ... a_1n ]
   [ a_21 a_22 ... a_2n ]
   [         ...        ]
   [ a_n1 a_n2 ... a_nn ]
as an element of R. Note that the algebra R must exist before an attempt is made to create matrices.
CambridgeMatrix(t, K, n, Q) : RngIntElt, FldFint, RngIntElt, [ ] -> AlgMatElt
This function creates a n by n matrix over the finite field K of cardinality q specified in a "Cambridge" format in the general matrix algebra of degree n over K. The parameter t specifies the type of the format. If t is 1, then q is assumed to be less than 10 and the sequence Q must consist of n strings which give the n rows---each string must have length n and contain the entries of that row (each entry is a digit in the range [0, q - 1]). If t is 3 then Q must consist of n^2 integers in the range [0, q - 1] which give the entries in row-major order. In either format, if q=p^e, where p is prime and e>1, then an entry x is written as a vector using the base-p representation of length e of x and the corresponding element in K is used (see the Finite Fields chapter for details). This function is principally provided for the reading in of large matrices.
CompanionMatrix(p) : RngPolElt -> AlgMatElt
Given a monic polynomial p of degree n over a ring R, create the companion matrix C for p as an element of M_n(R). The minimal and characteristic polynomial of C is then p.
DiagonalMatrix(R, Q) : AlgMat, [ RngElt ] -> AlgMatElt
If R is a subalgebra of M_n(S) and Q is a sequence of n elements of S, create the diagonal matrix diag( Q[1], Q[2], ..., Q[n] ).
MatrixUnit(R, i, j) : AlgMat, RngIntElt, RngIntElt -> AlgMatElt
Create the matrix unit E(i, j) in the matrix algebra R, i.e. the matrix having the one of the coefficient ring of R in position (i, j) and zeros elsewhere.
Random(R) : AlgMat -> AlgMatElt
Create a random matrix of the matrix algebra R.
ScalarMatrix(R, t) : AlgMat, RngElt -> AlgMatElt
If R is a subalgebra of M_n(S) and t is an element of the ring S, create the scalar matrix t * I in R.
R ! 1 : AlgMat, RngIntElt -> AlgMatElt
Create the identity matrix I_n of the matrix algebra R.
R ! 0 : AlgMat, RngIntElt -> AlgMatElt
Create the zero matrix of the matrix algebra R.
R ! t : AlgMat, RngIntElt -> AlgMatElt
Create the scalar matrix t * I of the matrix algebra R.

Constructing a General Matrix Algebra

MatrixAlgebra<S, n | L> : Rng, RngIntElt, List -> AlgMat
MatrixRing<S, n | L> : Rng, RngIntElt, List -> AlgMat
Given a commutative ring S and a positive integer n, create the S-algebra R consisting of the n x n matrices over the ring S generated by the elements defined in the list L. Let F denote the algebra M_n(S). Each term L_i of the list L must be an expression defining an object of one of the following types: The generators stored for R consist of the elements specified by terms L_i together with the stored generators for subalgebras specified by terms of L_i. Repetitions of an element and occurrences of scalar matrices are removed.

Example AlgMat_Creation (H51E1)

We demonstrate the use of the matrix algebra constructor by creating an algebra of 3 x 3 lower-triangular matrices over the rational field.

> Q := RationalField();
> A := MatrixAlgebra< Q, 3 | [ 1/3,0,0, 3/2,3,0, -1/2,4,3],
>        [ 3,0,0, 1/2,-5,0, 8,-1/2,4] >;
> A:Maximal;
Matrix Algebra of degree 3 with 2 generators over Rational Field
Generators:
[ 1/3    0    0]
[ 3/2    3    0]
[-1/2    4    3]

[ 3 0 0] [ 1/2 -5 0] [ 8 -1/2 4] > Dimension(A); 6


Example AlgMat_Cambridge (H51E2)

We construct a 4 by 4 matrix over the finite field with 5 elements using the CambridgeMatrix function.

> K := FiniteField(5);
> x := CambridgeMatrix(1, K, 4, [ "1234", "0111", "4321", "1211" ]);
> x;
[1 2 3 4]
[0 1 1 1]
[4 3 2 1]
[1 2 1 1]

The Invariants of a Matrix Algebra

R . i : AlgMat, RngIntElt -> AlgMatElt
The i-th defining generator for the matrix algebra R.
BaseRing(R) : AlgMat -> Rng
CoefficientRing(R) : AlgMat -> Rng
The coefficient ring S for the matrix algebra R.
Degree(R) : AlgMat -> RngIntElt
Given a matrix algebra R, return the degree n of R.
Generators(R) : AlgMat -> { AlgMatElt }
The set consisting of the defining generators for the matrix algebra R.
Generic(R) : AlgMat -> AlgMat
The complete matrix algebra M_n(S) in which R is naturally embedded.
BaseModule(R, S) : AlgMat, Rng -> ModTup
If R is a subring of the matrix algebra M_n(S), then R is considered to act on the free S-module of rank n, consisting of n-tuples over S. The function BaseModule returns this S-module.
NumberOfGenerators(R) : AlgMat -> { AlgMatElt }
Ngens(R) : AlgMat -> { AlgMatElt }
The number of defining generators for the matrix algebra R.
Parent(a) : AlgMatElt -> AlgMat
Given an element a belonging to the matrix algebra R, return R, i.e. the parent structure for a.

Example AlgMat_Invariants (H51E3)

We illustrate the use of these functions by applying them to the algebra of 3 x 3 lower-triangular matrices over the rational field constructed above.

> Q := RationalField();
> A := MatrixAlgebra< Q, 3 | [ 1/3,0,0, 3/2,3,0, -1/2,4,3],
>        [ 3,0,0, 1/2,-5,0, 8,-1/2,4] >;
> CoefficientRing(A);
Rational Field
> Degree(A);
3
> Ngens(A);
2
> Generators(A);
{
    [ 1/3    0    0]
    [ 3/2    3    0]
    [-1/2    4    3],

[ 3 0 0] [ 1/2 -5 0] [ 8 -1/2 4] } > Generic(A); Full Matrix Algebra of degree 3 over Rational Field > Dimension(A); 6


[Next] [Prev] [Right] [Left] [Up] [Index] [Root]