# MUNIT function

This article describes the formula syntax and usage of the MUNIT function (function: A prewritten formula that takes a value or values, performs an operation, and returns a value or values. Use functions to simplify and shorten formulas on a worksheet, especially those that perform lengthy or complex calculations.) in Microsoft Excel.

## Description

Returns the unit matrix for the specified dimension.

## Syntax

`MUNIT(dimension)`

The MUNIT function syntax has the following arguments.

Dimension    Required. Dimension is an integer specifying the dimension of the unit matrix that you want to return. It returns an array. The dimension has to be greater than zero.

MUNIT uses the following equation:

## Remarks

• If dimension is a value that’s equal to or smaller than zero (0), MUNIT returns the #VALUE! error value.

## Example

The workbook below shows examples of this function. Inspect them, change existing formulas, or enter your own formulas to learn how the function works.

To work more in-depth with the example data in Excel, download the embedded workbook to your computer, and then open it in Excel.

Applies to:
Excel 2013, Excel Online