Apple Numbers MUNIT: Identity Matrices and Dimension Checks
Create an identity matrix in Numbers, inspect each MUNIT entry with INDEX and verify left and right identities for a rectangular matrix.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =MUNIT(3) returns a 3×3 identity matrix: ones on the main diagonal and zeros elsewhere. The argument is the number of rows and columns, not the total number of entries.
Availability and version history
- Introduced: Original release and introduction date are not established by the checked references.
- Availability: Currently documented in Apple’s Functions Help 15.4 documentation edition; no final supported-version endpoint is established.
- Scope: Shared iWork reference. Function-specific historical availability across Mac, iPad, iPhone and iCloud is unverified.
- Checked: October 14, 2026, against the official MUNIT reference. Independent exact matrix calculations; no native Numbers test.
Syntax and a valid dimension
=MUNIT(matrix-size)
The dimension is required and must be greater than zero. The worked examples here use positive whole numbers. Apple’s short entry does not explain fractional dimensions, a maximum size or the exact error for an invalid value, so this guide does not borrow truncation or error rules from another spreadsheet.
An identity matrix acts like one under compatible matrix multiplication. A 3×3 identity has nine entries but only three ones. It is not a matrix filled entirely with ones.
These examples use INDEX to read one row/column position from an array. Apple’s INDEX reference explicitly supports arrays returned by other functions. Each displayed result therefore has its own scalar formula; the instructions do not depend on a particular app build spilling an entire matrix into adjacent cells.
Display every entry of a 3×3 identity
Create IdentityEntries, a Numbers table with eight columns A:H and six rows, including a header row. Enter 3 in F2 as the dimension. Use A2:C4 for the results:
| Cell | Formula | Expected result |
|---|---|---|
| A2 | =INDEX(MUNIT($F$2),1,1) |
1 |
| B2 | =INDEX(MUNIT($F$2),1,2) |
0 |
| C2 | =INDEX(MUNIT($F$2),1,3) |
0 |
| A3 | =INDEX(MUNIT($F$2),2,1) |
0 |
| B3 | =INDEX(MUNIT($F$2),2,2) |
1 |
| C3 | =INDEX(MUNIT($F$2),2,3) |
0 |
| A4 | =INDEX(MUNIT($F$2),3,1) |
0 |
| B4 | =INDEX(MUNIT($F$2),3,2) |
0 |
| C4 | =INDEX(MUNIT($F$2),3,3) |
1 |
Enter all nine formulas individually. The literal row/column positions do not advance merely because you copy a formula. The resulting grid matches Apple’s MUNIT(3) example.
In H2 enter =A2+B3+C4; expect 3. In H3 enter =A2+B2+C2; expect 1 for the first row’s total. In H4 enter =B2+B3+B4; expect 1 for the second column’s total. The diagonal count and row/column totals answer different questions.
Keep F2 at 3 for these formulas. Changing it to 2 while leaving formulas that request row or column 3 would request positions outside the new matrix. A changed dimension requires a matching output layout.
Size-one and size-two controls
Create SmallIdentities, with five columns and five rows. Put =INDEX(MUNIT(1),1,1) in A2; expect 1. This is a valid 1×1 identity.
Use C2:D3 for the four size-two entries, with formulas =INDEX(MUNIT(2),1,1), =INDEX(MUNIT(2),1,2), =INDEX(MUNIT(2),2,1) and =INDEX(MUNIT(2),2,2) in row order. Expect rows 1,0 and 0,1, matching Apple’s second documented example.
Neither 0 nor a negative number satisfies the stated dimension requirement. Do not use a guessed native error label as a substitute for checking the argument.
Advanced: left and right identities for a rectangular array
Create IdentityProducts, with eleven columns A:K and five rows, including a header row. Enter the two rows 4,−1,2 and 0,3,5 in A2:C3. This source has two rows and three columns.
For a right-side identity, its three columns must match the identity’s three rows. Read MMULT($A$2:$C$3,MUNIT(3)) into E2:G3:
| Cell | Formula | Expected result |
|---|---|---|
| E2 | =INDEX(MMULT($A$2:$C$3,MUNIT(3)),1,1) |
4 |
| F2 | =INDEX(MMULT($A$2:$C$3,MUNIT(3)),1,2) |
-1 |
| G2 | =INDEX(MMULT($A$2:$C$3,MUNIT(3)),1,3) |
2 |
| E3 | =INDEX(MMULT($A$2:$C$3,MUNIT(3)),2,1) |
0 |
| F3 | =INDEX(MMULT($A$2:$C$3,MUNIT(3)),2,2) |
3 |
| G3 | =INDEX(MMULT($A$2:$C$3,MUNIT(3)),2,3) |
5 |
For a left-side identity, use size 2, matching the source’s two rows. Enter the same six position pairs in I2:K3, but use MMULT(MUNIT(2),$A$2:$C$3) inside INDEX. Expect the same six numbers.
A 2×2 identity belongs on the left of this 2×3 source, and a 3×3 identity on its right. Replacing the right identity with MUNIT(2) would violate MMULT’s inner-dimension rule. Identity size depends on the side of multiplication, not simply the label “identity.”
Why zero entries matter
The first row of the right-side product is obtained by pairing 4,−1,2 with identity columns 1,0,0; 0,1,0; and 0,0,1. Each column selects one original component. That is why the product preserves every entry.
If all nine identity entries were replaced by one, every output in the first row would instead become 4−1+2=5, and every output in the second row would become 0+3+5=8. A grid of ones is not a no-change transformation.
The documentation establishes the numeric identity pattern; it does not establish every client’s array-display, resource or precision limit. Keep the example dimensions small, and check target-version behavior before transferring a workbook.
MMULT explains the product rule. MINVERSE uses the identity to verify an inverse, while MDETERM returns one for the determinant of an identity matrix.