[top][index]
search for:

matrix(Ring,{...}) -- make a matrix

Synopsis:

  • Function: matrix -- make a matrix
  • Input:
  • an instance of class Ring.
  • an instance of class List.
  • Output:
  • an instance of class Matrix.
  • Optional arguments :
  • matrix(..., Degree)
  • matrix(..., DegreeMap)
  • matrix(R,v) -- create a matrix over R from a doubly-nested list of ring elements or matrices.

    This is essentially the same as matrix {...} together with the specification of the ring.

    i1 : R = ZZ/101[a..f]

    o1 = R

    o1 : PolynomialRing
    i2 : matrix(R, {{a,b,0},{d,0,f}})

    o2 = | a b 0 |
         | d 0 f |

                 2       3
    o2 : Matrix R  <--- R

    See also:

  • map -- make a map
  • matrix -- make a matrix
  • Code:

         -- ../../../Macaulay2/m2/matrix1.m2:7-10
         matrix(Ring,List) := Matrix => options -> (R,m) -> (
              m = apply(splice m,splice);
              if not isTable m then error "expected a table";
              map(R^#m,,m,options))

    [top][index]
    search for: