MUNIT
Returns the unit (identity) matrix of the specified dimension — a square matrix with 1s on the diagonal and 0s elsewhere.
MUNIT(dimension)Arguments
dimensionAn integer specifying the dimension of the unit matrix.
=MUNIT(3)3×3 identity matrix
=MUNIT(2)2×2 identity matrix
- •Available since Excel 2013
- •Useful as a starting point for matrix algebra operations
- •Modern Excel spills the result automatically; legacy versions need Ctrl+Shift+Enter
- •Passing a non-positive integer as the dimension argument, which raises an error since a unit matrix must have a positive whole-number size
- •Forgetting to enter MUNIT as an array formula in older Excel versions (Ctrl+Shift+Enter), which can cause it to return only a single value instead of the full identity matrix
- •Confusing MUNIT's output with a matrix of all 1s - the identity matrix has 1s only along the diagonal and 0s everywhere else, not 1s throughout
MMULTMultiplying any square matrix by the appropriately sized MUNIT result leaves the original matrix unchanged, a useful property for verifying matrix algebra.MINVERSEMultiplying a matrix by its own inverse should produce the same identity matrix that MUNIT generates directly.MDETERMThe determinant of any identity matrix generated by MUNIT is always 1, a useful fact for sanity-checking determinant calculations.What does MUNIT actually produce?
A square identity matrix of the specified size - 1s along the diagonal from top-left to bottom-right, and 0s everywhere else.
Why does MUNIT show an error for my dimension value?
The dimension argument needs to be a positive whole number - zero, negative numbers, or non-integer values aren't valid sizes for a unit matrix.
What's a practical use for MUNIT?
It's often used as a known reference point or starting matrix in linear algebra formulas, such as verifying that MMULT(matrix, MINVERSE(matrix)) correctly returns the identity matrix.
Need to translate a formula using MUNIT?
Use our translator to convert your complete formula
