MINVERSE returns the inverse of a square matrix, which is useful for solving systems of linear equations and other matrix operations. It takes an array of numbers and returns an array of the same size.
=MINVERSE(array)What does MINVERSE do?
MINVERSE is an Excel Math & Trig function that calculates the inverse of a square matrix. A matrix is simply a rectangular array of numbers, and its inverse is another matrix that, when multiplied with the original, yields the identity matrix. This operation is fundamental in linear algebra and has practical applications in solving systems of equations, regression analysis, and financial modeling.
For office workers and students, MINVERSE can be a powerful tool when dealing with multiple equations or when you need to reverse a set of linear transformations. For example, if you have a system of equations representing resource allocation or cost structures, MINVERSE helps you find the unknown variables quickly without manual algebraic manipulation.
In Excel, MINVERSE is an array function. In modern versions (Excel 365, Excel 2021), it spills results automatically. In older versions, you must enter it as an array formula (Ctrl+Shift+Enter). The function requires a square matrix (same number of rows and columns) and will return an error if the matrix is not invertible (determinant zero).
When to use MINVERSE
- Solving systems of linear equations in finance or engineering.
- Performing linear regression or multivariate analysis.
- Computing portfolio weights in investment analysis.
- Transforming coordinates in graphics or mapping.
- Solving input-output models in economics.
MINVERSE syntax
=MINVERSE(array)| Argument | Required? | What to enter |
|---|---|---|
array | Required | A numeric array or range of cells representing a square matrix (equal number of rows and columns). The array can be a cell range like A1:C3 or an array constant like {1,2;3,4}. |
What it returns: The inverse of the input matrix as an array of the same dimensions. If the matrix is singular (non-invertible), it returns #NUM! error.
MINVERSE examples
1 Inverse of a 2x2 Matrix
This example shows the inverse of a simple 2x2 matrix. The matrix is in cells A1:B2. The formula =MINVERSE(A1:B2) returns the inverse matrix, which spills into the target range starting at D1. For a 2x2 matrix [[4,7],[2,6]], the inverse is [[0.6,-0.7],[-0.2,0.4]].
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | 4 | 7 | 0.6 | ||
| 2 | 2 | 6 | |||
| 3 |
2 Inverse of a 3x3 Matrix
Here we invert a 3x3 matrix representing coefficients of a system. The matrix is in A1:C3. The formula =MINVERSE(A1:C3) returns a 3x3 inverse matrix. For the given values, the inverse is calculated and displayed starting at E1. This is useful for solving three simultaneous equations.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | 2 | -1 | 0 | 0.75 | ||
| 2 | -1 | 2 | -1 | |||
| 3 | 0 | -1 | 2 | |||
| 4 |
3 Solving a System of Equations
This example demonstrates how to solve a system of linear equations using MINVERSE and MMULT. The coefficients are in A1:B2, and the constants are in D1:D2. The solution is obtained by multiplying the inverse of the coefficient matrix with the constants vector: =MMULT(MINVERSE(A1:B2), D1:D2). The result gives the values of x and y.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | 2 | 1 | 5 | 1 | |||
| 2 | 1 | 3 | 10 | ||||
| 3 |
4 Portfolio Optimization Weights
In finance, MINVERSE can compute optimal portfolio weights. Suppose we have a covariance matrix in A1:B2 and expected excess returns in D1:D2. The formula =MMULT(MINVERSE(A1:B2), D1:D2) gives unnormalized weights, which can be scaled to sum to 1. Here, the inverse of the covariance matrix is multiplied by the returns vector to get raw weights.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | 0.04 | 0.01 | 0.08 | 1.714285714 | |||
| 2 | 0.01 | 0.09 | 0.12 | ||||
| 3 |
5 Input-Output Analysis in Economics
This example uses MINVERSE to compute the Leontief inverse for an input-output model. The matrix in A1:B2 represents technical coefficients. The formula =MINVERSE(A1:B2) returns the inverse, which shows the total output required from each sector to satisfy final demand. This is a common application in economic planning.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | 0.2 | 0.3 | -1 | ||
| 2 | 0.4 | 0.1 | |||
| 3 |
Common MINVERSE errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | The array argument contains non-numeric values or is not a valid array. | Ensure all cells in the range contain numbers and the range is rectangular. |
| #NUM! | The matrix is singular (determinant is zero) and cannot be inverted. | Check that the matrix has a non-zero determinant; modify the values or use a different method. |
| #N/A | The array argument is not square (rows ≠ columns). | Provide a square matrix with equal number of rows and columns. |
| #SPILL! | The output range is blocked by existing data or the formula is not entered as an array in older Excel. | Clear the spill range or enter as array formula (Ctrl+Shift+Enter) in legacy Excel. |
Tips for using MINVERSE
- Use MINVERSE with MMULT to solve systems of equations: =MMULT(MINVERSE(A), b).
- In Excel 365, MINVERSE spills automatically; ensure adjacent cells are empty.
- For large matrices, consider using specialized add-ins or tools for performance.
- Always verify the determinant is non-zero before inverting; use MDETERM to check.
- Combine with TRANSPOSE if you need the inverse of a transposed matrix.
Frequently asked questions
What does MINVERSE do in Excel?
MINVERSE returns the inverse of a square matrix, which is useful for solving linear equations and other matrix calculations.
Why does MINVERSE return #NUM!?
The #NUM! error occurs when the matrix is singular (determinant zero) and thus has no inverse. Check your matrix values.
Can MINVERSE handle non-square matrices?
No, MINVERSE requires a square matrix (same number of rows and columns). For non-square matrices, use MPINV or other methods.
How do I enter MINVERSE in older Excel versions?
In Excel 2019 and earlier, you must select the output range, type the formula, and press Ctrl+Shift+Enter to enter it as an array formula.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. MINVERSE reference