MINVERSE function
The MINVERSE function in Excel is used to calculate the inverse of a square matrix.
Syntax
=MINVERSE(array)
Parameters
array: This is the range of cells that contains the square matrix for which you want to calculate the inverse. The matrix must be square, meaning the number of rows is equal to the number of columns.
Return Value
The function returns the inverse of the matrix. If the matrix is singular (i.e., it doesn’t have an inverse, such as a matrix with a determinant of 0), Excel will return the #NUM! error.
How It Works
The inverse of a matrix A is denoted as A⁻¹, and it is the matrix that, when multiplied by A, results in the identity matrix.
For example, for a 2×2 matrix:
The inverse is calculated using the formula:
For larger matrices (3×3 or more), the formula becomes more complex, involving determinants and minors, but the MINVERSE function handles this calculation for you.
Example Usage
Example 1: 2×2 Matrix
Suppose you have the following 2×2 matrix:
| 4 | 7 |
|---|---|
| 2 | 6 |
To calculate its inverse, you can use the MINVERSE function:
=MINVERSE(A1:B2)
This would return the inverse matrix:
| 0.6 | -0.7 |
|---|---|
| -0.2 | 0.4 |
Explanation:
- The determinant of the matrix is .
- The inverse is calculated using the formula for a 2×2 matrix and multiplying by .
Example 2: 3×3 Matrix
For a 3×3 matrix in range A1:C3, suppose the matrix is:
| 1 | 2 | 3 |
|---|---|---|
| 0 | 4 | 5 |
| 1 | 0 | 6 |
You can calculate the inverse using:
=MINVERSE(A1:C3)
The result will be the 3×3 inverse matrix (if it exists).
Important Notes
- Square Matrix Requirement: The matrix must be square (same number of rows and columns). If the matrix is not square, Excel will return the
#VALUE!error. - Singular Matrix: If the matrix is singular (its determinant is zero), Excel will return the
#NUM!error because a singular matrix does not have an inverse. - Array Formula: In older versions of Excel (pre-365), you may need to enter the MINVERSE function as an array formula. After typing the formula, press Ctrl+Shift+Enter instead of just Enter. In newer versions, Excel automatically handles array formulas.
This function is useful in linear algebra for solving systems of equations and performing matrix operations.