


![[top]](top.gif)
Synopsis:
map(M,r) -- construct the map from M to itself which is provided by scalar multiplication by the ring element r.
i1 : R = ZZ/101[x] |
i2 : map(R^2,x) |
See also:
Code:
-- ../../../Macaulay2/m2/matrix.m2:546-552
map(Module,RingElement) := Matrix => options -> (M,r) -> (
R := ring M;
try r = r + R#0
else error "encountered scalar of unrelated ring";
if r == 0 then map(M,M,0)
else if r == 1 then map(M,1)
else r * (map(M,1)))



![[top]](top.gif)