Macaulay2 » Documentation
Packages » Macaulay2Doc :: Matrix _ Sequence
next | previous | forward | backward | up | index | toc

Matrix _ Sequence -- get entry of matrix

Synopsis

Description

All indexing in Macaulay2 is zero-based, so the indices start at zero.
i1 : M = matrix{{1,2,3},{0,5,6}}

o1 = | 1 2 3 |
     | 0 5 6 |

              2       3
o1 : Matrix ZZ  <-- ZZ
i2 : M_(1,2)

o2 = 6
The matrix may be a a mutable matrix too:
i3 : N = mutableMatrix M

o3 = | 1 2 3 |
     | 0 5 6 |

o3 : MutableMatrix
i4 : N_(1,0)

o4 = 0
Entries of mutable matrices can be changed:
i5 : N_(1,0) = 37

o5 = 37
i6 : N

o6 = | 1  2 3 |
     | 37 5 6 |

o6 : MutableMatrix

See also

Ways to use this method: