##### Related Content

# Inverse Matrix Calculator

## Lesson on Inverse Matrices

#### Lesson Contents

### Rules for an Inverse Matrix

**A square matrix A is invertible if there exists an inverse matrix A^{-1} such that:**

*A×A*^{-1}= A^{-1}×A = IWhere

*I*is the identity matrix of

*A*and

*A×A*denotes matrix multiplication of the original and inverse matrix.

^{-1}The inverse matrix is not a result of dividing 1 by the matrix (such as 5^{-1} = ^{1}⁄_{5}), rather, calculating it is a process that requires several steps and depends on the size of the matrix. Sometimes we will not even know if *A* is invertible until we have performed several calculation steps.

### How to Calculate the Inverse Matrix

Hand calculating the inverse matrix is a process that depends on the size of the matrix. For a 2×2 matrix, we may follow a simple formula that is shown below. For a 3×3 matrix, we may use the much larger and more complex formula that is also shown below.

However, anything larger than a 3×3 matrix is very complex to solve by hand. For 4×4 and larger matrices, finding the inverse is best done by using a calculator. It is unlikely that we will be tested on our ability to invert a 4×4 or larger matrix by hand and calculators can perform inversion very quickly.

## How the Calculator Works

The calculator on this page is written in the programming language JavaScript (JS) and utilizes a JS native computer algebra system (CAS). Your device’s internet browser contains a built-in JS engine that runs the calculator’s code, allowing for near-instant solutions at the click of a button.

When the calculate button is clicked, your inputted matrix is built into a two-dimensional JS array using a nested for loop. Then, the array is fed to the CAS which performs symbolic operations to convert the input matrix to its inverse matrix. The inverse matrix is formatted into LaTeX (a math rendering language) and displayed in the answer area of the calculator.

Many matrices are not invertible because they do not meet the requirements for having an inverse. When the inputted matrix is not invertible or an error occurs during calculations, the calculator displays an error message in the answer area.