Macaulay2 » Documentation
Packages » Macaulay2Doc » matrices » mutable matrices » row and column operations » rowMult
next | previous | forward | backward | up | index | toc

# rowMult -- multiply a row by a ring element

- Usage:
    `rowMult(m,i,a)`
- Inputs:
  - m, a mutable matrix
  - i, an integer
  - a, a ring element, in the same ring as m
- Consequences:
  - The i th row of m is modified by multiplying it by a

## Description

    i1 : R = ZZ[a..f];

    i2 : m = mutableMatrix genericMatrix(R,a,2,3)

    o2 = | a c e |
         | b d f |

    o2 : MutableMatrix

    i3 : rowMult(m,0,c)

    o3 = | ac c2 ce |
         | b  d  f  |

    o3 : MutableMatrix

    i4 : m

    o4 = | ac c2 ce |
         | b  d  f  |

    o4 : MutableMatrix

## See also

- mutable matrices
- row and column operations

## Ways to use rowMult:

- `rowMult(MutableMatrix,ZZ,Number)`
- `rowMult(MutableMatrix,ZZ,RingElement)`

## For the programmer

The object rowMult is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/doc_mutablematrices.m2:233:0.