Identity matrix

Syntax: m = IDENTITY(n)

The function IDENTITY(n) returns the identity matrix of order n, that is, the n by n matrix with ones on the diagonal and zeros elsewhere.

Example

IDENTITY(4) returns the matrix