matrix -- convert a list into a matrix |
Syntax |
matrix(LofL: LIST): MAT matrix(R: RING, LofL: LIST): MAT matrix(R: RING, M: MAT): MAT |
Description |
Example |
/**/ L := [[1,2],[3,4]]; /**/ mat(L); matrix(QQ, [[1, 2], [3, 4]]) /**/ mat(ZZ,L); matrix(ZZ, [[1, 2], [3, 4]]) /**/ P ::= QQ[x,y]; /**/ M := mat(P,L); print M; matrix( /*RingWithID(3, "QQ[x,y]")*/ [[1, 2], [3, 4]]) /**/ RingOf(M); RingWithID(3, "QQ[x,y]") /**/ M := IdentityMat(ZZ,2); /**/ matrix(QQ, M); // promotion mapping: ZZ to QQ matrix(QQ, [[1, 0], [0, 1]]) |
See Also |