matrix(Ring,List) -- create a matrix from a doubly nested list of ring elements or matrices

Synopsis

• Function: matrix
• Usage:
matrix(R, v)
• Inputs:
• R, a ring
• v, a list, a list of vectors; or a doubly nested list of ring elements and/or matrices
• Optional inputs:
• Degree => ..., default value null, create a matrix from a doubly-nested list of ring elements or matrices
• Outputs:
• , A matrix over R, whose source and target are both free, formed by the elements of v.

Description

All of the vectors, ring elements, or matrices must be defined over the ring R, or a base ring of R.

If a doubly nested list of matrices is given, then ring elements can be used for 1 by 1 blocks, and 0 represents a zero block.

This is essentially the same as matrix(List) together with the specification of the ring.

 i1 : R = QQ[a..d]; i2 : f = matrix{{a,b},{c,0}} o2 = | a b | | c 0 | 2 2 o2 : Matrix R <--- R i3 : h = matrix{{f,f},{f,0}} o3 = | a b a b | | c 0 c 0 | | a b 0 0 | | c 0 0 0 | 4 4 o3 : Matrix R <--- R