MINVERSE function in Excel
If you are working with matrices in Excel, you may need to calculate the inverse of a matrix. The inverse of a matrix is another matrix that, when multiplied by the original matrix, gives the identity matrix. The identity matrix is a square matrix with ones on the main diagonal and zeros in every other position.
The inverse of a matrix can be useful for solving systems of linear equations, finding the determinant of a matrix, or performing other matrix operations. Excel has a built-in function called MINVERSE that can calculate the inverse of a matrix for you. In this blog post, we will explain how to use the MINVERSE function in Excel and show some examples.
The syntax of the MINVERSE function is:
=MINVERSE(array)
The array argument is a square array of numbers that represents the matrix you want to invert. The array can be given as a cell range, such as A1:C3; as an array constant, such as {1,2,3;4,5,6;7,8,9}; or as a name for either of these.
The MINVERSE function returns an array of values that represents the inverse matrix. The inverse matrix will have the same dimensions as the original matrix. To display the result on the worksheet, you need to enter the MINVERSE function as an array formula.
An array formula is a formula that operates on multiple values and returns multiple values. To enter an array formula, you need to select the output range first, then type the formula in the formula bar, and then press Ctrl+Shift+Enter to confirm it. Excel will insert curly brackets at the beginning and end of the formula for you.
For example, suppose you have a 2 x 2 matrix in the range B2:C3.
To calculate the inverse of this matrix, select a 2 x 2 range in your worksheet, such as E2:F3, and enter the following formula:
=MINVERSE(B2:C3)
Remember to press Ctrl+Shift+Enter to enter the formula as an array formula. Excel will calculate the inverse of the matrix and display the result.
You can verify that this is indeed the inverse matrix by multiplying it with the original matrix using the MMULT function. The MMULT function returns the matrix product of two arrays. The syntax of the MMULT function is:
=MMULT(array1,array2)
The array1 and array2 arguments are two arrays that represent the matrices you want to multiply. The number of columns in array1 must match the number of rows in array2. The result will be an array that contains the same number of rows as array1 and the same number of columns as array2.
To multiply the original matrix and its inverse, select a 2 x 2 range in your worksheet, such as H2:I3, and enter the following formula:
=MMULT(B2:C3,E2:F3)
Remember to press Ctrl+Shift+Enter to enter the formula as an array formula. Excel will calculate the matrix product and display the result in the selected range.
As you can see, this is the identity matrix for a 2 x 2 matrix.