Algosim documentation: IdentityMatrix

IdentityMatrix

The identity matrix.

Syntax

Description

If n is a positive integer, then IdentityMatrix(n) returns the identity matrix of size n.

Examples

IdentityMatrix(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⎠

See also