Solving a system of equations by hand gets painful fast. Three unknowns already mean a page of substitution. Five unknowns feel impossible. Linear algebra offers a cleaner path: the inverse matrix. If you can invert the coefficient matrix, you can solve the whole system in one move. The MINVERSE function computes that inverse for you. It takes a square matrix and returns its inverse, ready to plug into a solution formula.
This guide explains what an inverse matrix is and when one exists. Then it shows how MINVERSE works with the dynamic array and legacy methods. Six examples cover the classic use of solving equations, plus a full troubleshooting section.
What an Inverse Matrix Is
The inverse of a matrix works like the reciprocal of a number. For a number, 4 times one-quarter equals 1. For a matrix, A times its inverse equals the identity matrix. The identity matrix is the matrix version of the number 1. It has ones down the diagonal and zeros elsewhere. Multiplying by it changes nothing. The infographic below shows this relationship.
This property is what makes inverses useful. Because A times its inverse gives the identity, the inverse can undo what A does. Consequently, it lets you isolate the unknowns in a system of equations.
When an Inverse Exists
Not every matrix has an inverse. Two conditions must hold. First, the matrix must be square, with equal rows and columns. Second, its determinant must not be zero. A matrix with a zero determinant is called singular, and it has no inverse. This mirrors division by zero for plain numbers. You cannot divide by zero, and you cannot invert a singular matrix. Therefore, a quick determinant check is wise before you invert.
The Syntax
MINVERSE needs only one argument. It returns an array of the same size as the input. In Excel 365, that array spills automatically.
Example 1: Invert a 2x2 Matrix
Begin with the simplest case. A 2x2 inverse is easy to verify by eye. Once you trust it here, larger matrices follow the same idea. The steps never change with size. Only the amount of arithmetic grows. That is exactly why MINVERSE is so useful.
Example 2: The Dynamic Array Method
In Excel 365 and 2021, MINVERSE is easy to enter. You type it once and press Enter. The inverse then spills to fill its space. As a result, no pre-selection is needed.
=MINVERSE(A1:C3) and press Enter.Example 3: The Legacy Ctrl+Shift+Enter Method
Older Excel needs array entry. The inverse is the same size as the input. So you select a block of that size first. Then you confirm with three keys.
Example 4: Solve a System of Equations
This is the headline use of MINVERSE. A system of equations can be written as A times x equals b. Here A holds the coefficients, and b holds the answers. The solution is the inverse of A times b. This one formula replaces pages of manual algebra. In Excel, MINVERSE and MMULT do this together. The pair solves the whole system at once.
Example 5: Verify the Inverse Is Correct
It is good practice to check an inverse. The test is simple. Multiply the original matrix by its inverse. The result should be the identity matrix. If it is, your inverse is correct. This quick check catches range or data mistakes early.
Example 6: Guard Against a Singular Matrix
A robust model checks before it inverts. If the determinant is zero, MINVERSE returns an error. You can prevent that with a simple guard. Wrap the logic in an IF that tests the determinant first. This gives a clear message instead of a cryptic error.
Example 7: Solve a Blending Problem
Here is a real business use. Suppose you mix two products to hit a target. Each product contributes a known amount of two ingredients. You want the exact quantities to reach a goal. This is a small system, and MINVERSE solves it cleanly.
Troubleshooting MINVERSE
All three problems below are the most common. Each has a clear cause and a quick fix.
You get a #NUM! error
A #NUM! error means the matrix cannot be inverted. Almost always, its determinant is zero, so the matrix is singular. Check with =MDETERM(range) first. If the result is zero, no inverse exists, and no formula change will fix that. The issue is the data itself. Look for rows or columns that are duplicates or simple multiples of each other, because these force a zero determinant. Adjust the underlying values so the matrix is no longer singular. Then MINVERSE will work.
You get a #VALUE! error
This error points to the shape or the data, not the maths. First, confirm the range is square, because MINVERSE needs equal rows and columns. A non-square block triggers the error at once. Second, check that every cell holds a number. Text, labels, or blank cells inside the range cause a #VALUE! result. Scan the block for stray entries and gaps. Replace blanks with numbers and remove any text. Once the range is square and fully numeric, the inverse calculates correctly.
The inverse shows tiny numbers instead of clean values
Sometimes an inverse contains values like 5E-17 where you expected zero. This is floating-point rounding, and it is completely normal. The calculation carries tiny errors that appear in the output. In most cases these values are harmless. If they bother you or affect a later step, wrap the result with ROUND to a sensible number of decimals. For example, round to ten places to clean up the display. The underlying answer stays correct while the tiny artefacts disappear.
Frequently Asked Questions
- What does the MINVERSE function do in Excel?+MINVERSE calculates the inverse of a square matrix and returns it as an array. The inverse is like a reciprocal for matrices: when you multiply the original matrix by its inverse, you get the identity matrix. This property lets the inverse undo the original transformation, which is what makes it useful for solving equations. You write it as =MINVERSE(range), where the range is a square block of numbers. In Excel 365 the result spills automatically; in older versions you select a same-size block and press Ctrl+Shift+Enter. The matrix must be square with a non-zero determinant.
- Why does MINVERSE return a #NUM! error?+A #NUM! error means the matrix has no inverse because it is singular, which happens when its determinant is zero. Check the determinant first with =MDETERM(range). If it returns zero, the matrix cannot be inverted, and this is a property of the data rather than a formula mistake. Singular matrices often contain a row or column that duplicates another or is a simple multiple of it. To fix the problem, adjust the underlying values so the matrix is no longer singular. Running the determinant check before inverting prevents this error entirely.
- How do I solve equations using MINVERSE?+Write your system in the form A times x equals b, where A holds the coefficients and b holds the answers. The solution is the inverse of A multiplied by b. In Excel, combine the two matrix functions: =MMULT(MINVERSE(A1:C3), E1:E3). MINVERSE inverts the coefficient matrix, and MMULT multiplies that inverse by the answers column. The result spills as a column containing the values of your unknowns. Before solving, confirm that =MDETERM(A1:C3) is not zero, because a singular coefficient matrix has no inverse and the system would have no unique solution.
- Why does my inverse contain tiny numbers like 1E-16?+Those tiny values come from floating-point rounding inside the calculation, and they are normal. Where you expect a clean zero, you may see something like 5E-17 instead. The true value is zero, but small numerical errors accumulate during the matrix operations. In most cases these artefacts are harmless and can be ignored. If they clutter your display or interfere with a later comparison, wrap the result with ROUND to a sensible number of decimal places. This cleans up the appearance while keeping the underlying answer accurate for any further calculations.