# map(Ring,Ring,Matrix) -- make a ring map

## Synopsis

• Function: map
• Usage:
map(R,S,m)
• Inputs:
• R, a ring, the target ring
• S, a ring, the source ring
• m, , a 1 by n matrix over R, where n is the number of variables in the polynomial ring S, or a matrix over the common coefficient ring of the two rings. If a ring map is used here, (just) its matrix will be used instead.
• Optional inputs:
• DegreeMap => , default value null, the degree map: a (linear) function from the multidegrees of S to the multidegrees of R, to be used in determining homogeneity and in determining degrees in tensor products. If the two rings have the same degree length, then the default degree map is the identity function.
• DegreeLift => , default value null, the degree lift function: a (partial) inverse of the degree map, giving an error when lifting is not possible. If the degree map is the identity, then by default the identity map will be provided. If the degree length of R is 0, then by default a suitable degree lift function will be provided.
• Degree => ..., default value null, specify the degree of a map
• Outputs:
• , the ring homomorphism from S to R which, in case m is a matrix over R, sends the i-th variable of S to the i-th entry in m, or, in case m is a matrix over the common coefficient ring, is the linear change of coordinates corresponding to m

## Description

 i1 : R = ZZ[x,y]; i2 : S = ZZ[a,b,c]; i3 : f = map(R,S,matrix {{x^2,x*y,y^2}}) 2 2 o3 = map(R,S,{x , x*y, y }) o3 : RingMap R <--- S i4 : f(a+b+c^2) 4 2 o4 = y + x + x*y o4 : R i5 : g = map(R,S,matrix {{1,2,3},{4,5,6}}) o5 = map(R,S,{x + 4y, 2x + 5y, 3x + 6y}) o5 : RingMap R <--- S i6 : g(a+b) o6 = 3x + 9y o6 : R
If the coefficient ring of S is itself a polynomial ring, then one may optionally include values to which its variables should be sent: they should appear last in the matrix m.
 i7 : S = ZZ[a][b,c]; i8 : h = map(S,S,matrix {{b,c,2*a}}) o8 = map(S,S,{b, c, 2a}) o8 : RingMap S <--- S i9 : h(a^7 + b^3 + c) 3 7 o9 = b + c + 128a o9 : S i10 : k = map(S,S,matrix {{c,b}}) o10 = map(S,S,{c, b, a}) o10 : RingMap S <--- S i11 : k(a^7 + b^3 + c) 3 7 o11 = c + b + a o11 : S
Specifying a degree map is a useful way to preserve homogeneity, which can speed computation.
 i12 : R = QQ[x,y,z]; i13 : S = QQ[t,u]; i14 : f = map(S,R,{t^2,t*u,u^2},DegreeMap => i -> 2*i) 2 2 o14 = map(S,R,{t , t*u, u }) o14 : RingMap S <--- R i15 : isHomogeneous f o15 = true i16 : M = R^{1,2} 2 o16 = R o16 : R-module, free, degrees {-1, -2} i17 : f M 2 o17 = S o17 : S-module, free, degrees {-2, -4} i18 : f ** M 2 o18 = S o18 : S-module, free, degrees {-2, -4}