IdentityMatrix
The identity matrix.
Syntax
-
IdentityMatrix(n)
-
n
is a positive integer
-
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⎠