MUNIT (Dimension) MUNIT (Dimension)

Dimension

Number Number

The dimension of the matrix that should be returned. Must be a positive number.

Returns

The unit matrix for the given dimension. The returned two-dimensional array has the same size as its constituent arrays, meaning that it is square. The size of the array is equal to the given dimension.

Returns the unit matrix for the given dimension. The unit matrix, also known as the identity matrix, has ones on its diagonal and zeros in all other positions. Multiplying a matrix by it using MMULT returns the same matrix.

Examples

MUNIT (2)
MUNIT (2)

Returns the unit matrix for the given dimension, {{ 1, 0 }, { 0, 1 }}{{ 1; 0 }; { 0; 1 }}.

MUNIT (3)
MUNIT (3)

Returns the unit matrix for the given dimension, {{ 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }}{{ 1; 0; 0 }; { 0; 1; 0 }; { 0; 0; 1 }}.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell