identity_matrix( [ ring
, ] n )
The n×n identity matrix in SageMath. A base ring
is inferred if not specified.
Matrix indices are zero based in SageMath.
Examples:
Related operations: matrix
Operation category: matrix operations sagemath-docs