up previous next
IdentityMat

the identity matrix

Syntax
IdentityMat(R: RING, N: INT): MAT

Description
This function returns the NxN identity matrix with entries in R .

Example
/**/ Id := IdentityMat(QQ,3);  Id;
matrix(QQ,
 [[1, 0, 0],
  [0, 1, 0],
  [0, 0, 1]])
/**/ type(Id[1,1]);
RINGELEM
/**/ RingOf(Id[1,1]);
QQ