next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: mutableIdentity(Ring,ZZ)

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