|
<< Click to Display Table of Contents >> MUNIT (create unit matrix) |
Syntax:
MUNIT(Dimension)
Description:
Returns a unit matrix with the specified size.
Dimension is an integer value that specifies the dimension (rows x columns) of the unit matrix. This value must be greater than 0, otherwise the #VALUE! error value is returned.
Note:
Formulas using this function have to be entered as an array formula. For more information, see Working with arrays.
Example:
MUNIT(3) returns the following 3x3 unit matrix for cells A1-C3.

This function is relevant for matrix operations in linear algebra. Here, you can use this function to quickly generate neutral matrices without having to manually enter values for ones and zeros.
For example, combine the MUNIT function with the MMULT function to multiply two matrices. Cells A1:C3 contain values from an array. If you enter the formula below in cell E1, you will get the following result:
MMULT(A1:C3, MUNIT(3))

See also:
Section Working with arrays, RANDARRAY, MDETERM, MINVERSE, MMULT, MSOLVE, TRANSPOSE