code: def _representing_matrices(basis, G, ring):
      r"""
      Compute the matrices corresponding to the linear maps `m \mapsto
      x_i m` for all variables `x_i`.
      """
      domain = ring.domain
      u = ring.ngens - 1
  
      def var(i):
          return tuple([0] * i + [1] + [0] * (u - i))
  
      def representing_matrix(m):
          M = [[domain.zero] * len(basis) for _ in range(len(basis))]
  
          for i, v in enumerate(basis):
              r = ring.term_new(monomial_mul(m, v), domain.one).rem(G)
  
              for monom, coeff in r.terms():
                  j = basis.index(monom)
                  M[j][i] = coeff
  
          return M
  
      return [representing_matrix(var(i)) for i in range(u + 1)]
  
file_path: sympy/sympy/polys/fglmtools.py
imports: from sympy.polys.monomials import monomial_mul, monomial_div
label_desc: Use image node_id 6 for calling a global function with example usage: _representing_matrices(basis, G, ring) and returns: unknown, tuple, M