Macaulay2 » Documentation
Packages » Macaulay2Doc :: mutableIdentity(Ring,ZZ)
next | previous | forward | backward | up | index | toc

mutableIdentity(Ring,ZZ) -- make a mutable identity matrix

Synopsis

Description

i1 : m = mutableIdentity(QQ,10)

o1 = | 1 0 0 0 0 0 0 0 0 0 |
     | 0 1 0 0 0 0 0 0 0 0 |
     | 0 0 1 0 0 0 0 0 0 0 |
     | 0 0 0 1 0 0 0 0 0 0 |
     | 0 0 0 0 1 0 0 0 0 0 |
     | 0 0 0 0 0 1 0 0 0 0 |
     | 0 0 0 0 0 0 1 0 0 0 |
     | 0 0 0 0 0 0 0 1 0 0 |
     | 0 0 0 0 0 0 0 0 1 0 |
     | 0 0 0 0 0 0 0 0 0 1 |

o1 : MutableMatrix
i2 : m_(5,5) = 11/13

     11
o2 = --
     13

o2 : QQ
i3 : m

o3 = | 1 0 0 0 0 0     0 0 0 0 |
     | 0 1 0 0 0 0     0 0 0 0 |
     | 0 0 1 0 0 0     0 0 0 0 |
     | 0 0 0 1 0 0     0 0 0 0 |
     | 0 0 0 0 1 0     0 0 0 0 |
     | 0 0 0 0 0 11/13 0 0 0 0 |
     | 0 0 0 0 0 0     1 0 0 0 |
     | 0 0 0 0 0 0     0 1 0 0 |
     | 0 0 0 0 0 0     0 0 1 0 |
     | 0 0 0 0 0 0     0 0 0 1 |

o3 : MutableMatrix

See also

Ways to use this method: