|
D.3.1.14 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
|
|