I Function

I (dim) ;

The I function creates an identity matrix with dim rows and columns. The diagonal elements of an identity matrix are ones; all other elements are zeros. The value of dim must be an integer greater than or equal to 1. Noninteger operands are truncated to their integer part.

For example, the following statements compute a $3 \times 3$ identity matrix:

a = I(3);
print a;

Figure 24.162: An Identity Matrix

a
1 0 0
0 1 0
0 0 1