Free Inverse Matrix Calculator

[
]

Result

Select matrix size and enter all entries to compute the inverse.

What Is a Matrix Inverse?

For a square matrix AA, the inverse (if it exists) is another matrix, denoted A−1A^{-1}, that satisfies

A⋅A−1=A−1⋅A=I,A \cdot A^{-1} = A^{-1} \cdot A = I,

where II is the identity matrix – a diagonal matrix with 1s on the main diagonal and 0s elsewhere. In scalar arithmetic, multiplying a number by its reciprocal yields 1; similarly, multiplying a matrix by its inverse yields the identity matrix.

Singular vs. Nonsingular: When Does an Inverse Exist?

Not every square matrix possesses an inverse. A matrix is called singular (or degenerate) if its determinant equals zero. Such a matrix has no inverse. Conversely, a matrix with a non‑zero determinant is nonsingular and is guaranteed to have an inverse. The inverse matrix calculator acts as a built‑in singular matrix checker: before performing the inversion, it evaluates the determinant and alerts you if the matrix cannot be inverted.

The General Formula for the Matrix Inverse

For an n×nn \times n nonsingular matrix AA, the inverse can be written as

A−1=1det⁡(A)adj⁡(A),A^{-1} = \frac{1}{\det(A)} \operatorname{adj}(A),

where det⁡(A)\det(A) is the determinant and adj⁡(A)\operatorname{adj}(A) is the adjugate (or classical adjoint) of AA. The adjugate is the transpose of the cofactor matrix. Each cofactor CijC_{ij} is defined as (−1)i+j(-1)^{i+j} times the determinant of the submatrix obtained by deleting the ii-th row and jj-th column. This general formula works for any size, though it becomes cumbersome for dimensions larger than 3.

2×2 Matrices: A Simple Closed‑Form Expression

The inverse of a 2×22 \times 2 matrix takes a particularly tidy form. Let

A=(abcd).A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}.

Then

A−1=1ad−bc(d−b−ca).A^{-1} = \frac{1}{ad - bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix}.

The scalar ad−bcad - bc is the determinant of the matrix; if it is zero, the matrix is singular. This formula provides a quick way to compute the 2x2 inverse matrix without having to work through cofactors.

Inverting 3×3 and 4×4 Matrices

For larger matrices, such as 3×33 \times 3 or 4×44 \times 4, the same adjugate‑based formula applies, but the computations become more extensive. One can also use row reduction (Gaussian elimination) by augmenting the matrix with the identity and performing elementary row operations until the original matrix becomes the identity; the inverse then appears on the augmented side. Both approaches are implemented in the inverse matrix calculator, saving you from tedious arithmetic.

Step‑by‑Step Example: A 3×3 Matrix

Let’s apply the adjugate method to a symmetric matrix:

X=(2−10−12−10−12).X = \begin{pmatrix} 2 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 2 \end{pmatrix}.
  1. Determinant

    det⁡(X)=2(2⋅2−(−1)(−1))−(−1)((−1)⋅2−(−1)⋅0)+0(⋯ )=2(4−1)+1(−2)=6−2=4.\det(X) = 2(2\cdot2 - (-1)(-1)) - (-1)((-1)\cdot2 - (-1)\cdot0) + 0(\cdots) = 2(4-1) + 1(-2) = 6 - 2 = 4.

    Since det⁡(X)≠0\det(X) \neq 0, the matrix is nonsingular.

  2. Cofactor matrix
    Compute each cofactor CijC_{ij}. For example:

    C11=+∣2−1−12∣=3,C12=−∣−1−102∣=2,C13=+∣−120−1∣=1.C_{11} = +\begin{vmatrix} 2 & -1 \\ -1 & 2 \end{vmatrix} = 3,\quad C_{12} = -\begin{vmatrix} -1 & -1 \\ 0 & 2 \end{vmatrix} = 2,\quad C_{13} = +\begin{vmatrix} -1 & 2 \\ 0 & -1 \end{vmatrix} = 1.

    Calculating the remaining entries gives

    C=(321242123).C = \begin{pmatrix} 3 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 3 \end{pmatrix}.
  3. Adjugate
    The adjugate is the transpose of the cofactor matrix:

    adj⁡(X)=CT=(321242123).\operatorname{adj}(X) = C^{\mathsf{T}} = \begin{pmatrix} 3 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 3 \end{pmatrix}.
  4. Inverse

    X−1=14(321242123).X^{-1} = \frac{1}{4} \begin{pmatrix} 3 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 3 \end{pmatrix}.

You can verify that X⋅X−1=IX \cdot X^{-1} = I.

Useful Properties of Matrix Inverses

Knowing a few properties can simplify calculations:

  • Inverse of the inverse: (A−1)−1=A(A^{-1})^{-1} = A.
  • Inverse of a product: (AB)−1=B−1A−1(AB)^{-1} = B^{-1} A^{-1} (provided both AA and BB are invertible of the same size).
  • Inverse of a transpose: (AT)−1=(A−1)T(A^{\mathsf{T}})^{-1} = (A^{-1})^{\mathsf{T}}.

These properties show that inversion behaves predictably under common matrix operations.

Why Use the Inverse Matrix Calculator?

This tool combines several functions in one interface: a matrix determinant calculator (to check invertibility), a singular matrix checker (to warn when no inverse exists), and a full‑fledged square matrix inverse solver for sizes up to 4×44 \times 4 and beyond. Whether you need the inverse of a matrix for homework, engineering, or data science, the inverse matrix calculator delivers fast, accurate results with clear intermediate steps.

FAQ

1. How do I calculate the inverse of a 2x2 matrix?

For a 2×2 matrix [[a, b], [c, d]], the inverse is given by 1/(ad−bc) × [[d, −b], [−c, a]]. The denominator ad−bc is the determinant; if it is zero the matrix is singular and cannot be inverted.

2. What does it mean for a matrix to be singular?

A matrix is singular if its determinant equals zero. Singular matrices do not have an inverse, and any attempt to invert them will fail. The calculator automatically detects this condition.

3. Can I find the inverse of a 4×4 matrix using this calculator?

Yes, the inverse matrix calculator supports square matrices of various sizes, including 4×4. It uses the same adjugate method or row reduction to compute the inverse.

4. Why do I need to compute the determinant before finding the inverse?

The determinant appears in the denominator of the inverse formula. If it is zero, the formula breaks down and the inverse does not exist. Therefore checking the determinant is an essential first step.

5. What is the difference between the cofactor matrix and the adjugate?

The cofactor matrix contains the signed minors of the original matrix. The adjugate (or adjoint) is simply the transpose of the cofactor matrix. Both are used in the general inverse formula.

How to Use

  1. Select the size of the square matrix (2x2, 3x3, or 4x4).
  2. Enter all entries of the matrix into the grid.
  3. The inverse matrix and determinant are computed automatically in real time.