Returns a unit (identity) matrix of a given size.
MUNIT(size)
returns the unit matrix, also known as the identity matrix I, of size size (an integer greater than zero).The identity matrix has ones on the leading diagonal, and zeroes elsewhere.
Imagine a system used by a logistics company to manage the transfer of goods between its five regional distribution centers (A, B, C, D, E). The company wants to set up a baseline transfer model where each center is designated to exclusively serve itself for certain internal stock movements. This is a one-to-one relationship where a product originating from a center is expected to stay at that center.
To represent this perfect, one-to-one self-transfer relationship in their data system, they need to create a matrix. The system uses a function called MUNIT to quickly generate this baseline matrix.
How MUNIT is Used:
The MUNIT function is called with the size of the matrix needed. In this case, since there are five distribution centers, a 5x5 matrix is required. The command would be something like MUNIT(5).
This function generates a matrix where the value is 1 when a center is transferring goods to itself, and 0 for any transfer to a different center.
Table: Baseline Transfer Matrix Generated by MUNIT(5)
From / To | Center A | Center B | Center C | Center D | Center E | ||
|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | ||
1 | Center A | 1 | 0 | 0 | 0 | 0 | |
2 | Center B | 0 | 1 | 0 | 0 | 0 | |
3 | Center C | 0 | 0 | 1 | 0 | 0 | |
4 | Center D | 0 | 0 | 0 | 1 | 0 | |
5 | Center E | 0 | 0 | 0 | 0 | 1 |
Explanation:
In this matrix, the number 1 indicates a direct, self-transfer relationship. For example, the 1 in the first row and first column shows that Center A is designated to transfer goods to itself. All the 0s represent the absence of a direct transfer relationship from one center to another in this baseline model.
The MUNIT function is useful because it provides a quick and accurate way to generate this fundamental identity matrix, which serves as a starting point or a "null state" in various data processing and modeling tasks, such as calculating deviations from this ideal self-transfer model or setting up a system of linear equations for more complex logistics operations.
PRODUCT & FEATURES
RESOURCES
Terms | Privacy | Spam Policy
© 2026 Zapof