ID EN
#Math

MUNIT

Excel Functions

Return unit matrix for a given dimension

Syntax

EXCEL
=MUNIT(dimension)

Arguments

Parameter Description
dimension An integer for the size of the unit matrix.

Return Value

Unix matrix of size n x n

Details

The MUNIT function returns a unit matrix for a given dimension, n, with a size of n x n. The unit matrix is also called the identity matrix. The MUNIT function takes just one argument, dimension, which should be a positive integer. The resulting matrix contains ones on the main diagonal and zeros in every other position. The formula in D5 returns a 3 x 3 unit matrix : With 3 given for dimension, the MUNIT function returns a 3 by 3 array like this: The formula in J5 returns a 5 x 5 unit matrix. With 5 given for dimension, the MUNIT function returns a 5 by 5 array like this:

Examples

Examples

The formula in D5 returns a 3 x 3 unit matrix :

EXCEL
=MUNIT(3) // 3 x 3
Examples

The formula in J5 returns a 5 x 5 unit matrix.

EXCEL
=MUNIT(5) // 5 x 5

See Also

MMULT MINVERSE MDETERM