Singular Manual: unitmat

| #### D.3.1.13 unitmat Procedure from library `matrix.lib` (see matrix_lib). Usage: unitmat(n); n integer >= 0 Return: nxn unit matrix Note: needs a basering, diagonal entries are numbers (=1) in the basering Example:
    LIB "matrix.lib";
    ring r=32003,(x,y,z),lp;
    print(xyz*unitmat(4));
    ==> xyz,0,  0,  0,
    ==> 0,  xyz,0,  0,
    ==> 0,  0,  xyz,0,
    ==> 0,  0,  0,  xyz
    print(unitmat(5));
    ==> 1,0,0,0,0,
    ==> 0,1,0,0,0,
    ==> 0,0,1,0,0,
    ==> 0,0,0,1,0,
    ==> 0,0,0,0,1

User manual for Singular version 4.3.2, 2023, generated by texi2html.