Macaulay2 » Documentation
Packages » DeterminantalRepresentations :: randomUnipotent
next | previous | forward | backward | up | index | toc

randomUnipotent -- constructs a random unipotent matrix

Description

This method returns a random unipotent matrix of a given size $n$, which is upper triangular with all diagonal entries equal to $1$. if a ring $R$ is provided, then the output is a matrix over $R$ - by default, the output is a matrix over QQ.

i1 : randomUnipotent 5

o1 = | 1 9/2 9/4 3/4  7/4  |
     | 0 1   7/9 7/10 7/10 |
     | 0 0   1   7/3  7    |
     | 0 0   0   1    3/7  |
     | 0 0   0   0    1    |

              5       5
o1 : Matrix QQ  <-- QQ
i2 : randomUnipotent(3, CC)

o2 = | 1 .424521+.641878ii .267055+.0430999ii |
     | 0 1                 .500492+.387244ii  |
     | 0 0                 1                  |

                3         3
o2 : Matrix CC    <-- CC
              53        53
i3 : randomUnipotent(3, RR[x,y])

o3 = | 1 .98071 .65684  |
     | 0 1      .215998 |
     | 0 0      1       |

                        3                 3
o3 : Matrix (RR  [x..y])  <-- (RR  [x..y])
               53                53

Ways to use randomUnipotent:

  • randomUnipotent(ZZ)
  • randomUnipotent(ZZ,Thing)

For the programmer

The object randomUnipotent is a method function.


The source of this document is in DeterminantalRepresentations.m2:1090:0.