Skip to main content
Home / Matrices / Matrix Inverse
Calculating...
Matrix Operation

Matrix Inverse Calculator

Calculate the inverse of a square matrix with detailed step-by-step explanations. The inverse A⁻¹ satisfies A × A⁻¹ = A⁻¹ × A = I.

Home Matrix Operations Matrix Inverse
Square matrix required

Enter Matrix A

Enter the entries of your square matrix (4×4 max). The inverse exists only if det(A) ≠ 0.

Matrix A
×
Square
r1
r2
r3
r4
c1
c2
c3
c4
(max size)
Note: If the matrix is singular (det = 0), the inverse does not exist. The calculator will show an error with explanation.

Learn About Matrix Inverse

Understanding the concepts behind the calculations.


What is Matrix Inverse?

Matrix inverse is the matrix equivalent of a reciprocal in regular arithmetic. Just as 5 × 1/5 = 1, the inverse of a matrix A, denoted A⁻¹, satisfies:

$$ A \cdot A^{-1} = A^{-1} \cdot A = I $$

where I is the identity matrix (1s on diagonal, 0s elsewhere).

Key Insight: The inverse "undoes" the transformation of the original matrix. If A transforms vector x to b, then A⁻¹ transforms b back to x.

Analogy: In regular numbers, 5 × 0.2 = 1, so 0.2 is the inverse of 5. For matrices, we find A⁻¹ such that multiplying gives the identity matrix.


The Definition

For a square matrix A of size n×n, its inverse A⁻¹ is another n×n matrix such that:

$$ \boxed{A A^{-1} = A^{-1} A = I_n} $$

where Iₙ is the n×n identity matrix:

$$ I_2 = \begin{bmatrix} 1 & 0 \\\\ 0 & 1 \end{bmatrix}, \quad I_3 = \begin{bmatrix} 1 & 0 & 0 \\\\ 0 & 1 & 0 \\\\ 0 & 0 & 1 \end{bmatrix} $$

⚠️ Not all matrices have inverses! Only square, invertible (non-singular) matrices have inverses. A matrix without an inverse is called singular or non-invertible.


Which Matrices Have Inverses?

✅ Matrices with Inverses

  • Square matrices (n×n)
  • Determinant ≠ 0
  • Full rank (rank = n)
  • All eigenvalues non-zero
  • Rows/columns are linearly independent

Example: [[2, 0], [0, 3]] has inverse [[1/2, 0], [0, 1/3]]

❌ Matrices WITHOUT Inverses

  • Non-square matrices (no inverse exists)
  • Determinant = 0 (singular)
  • Rank deficient (rank < n)
  • Has zero eigenvalues
  • Rows/columns are linearly dependent

Example: [[1, 2], [2, 4]] has determinant 0 → NO inverse

💡 Quick Test: If you can find a non-zero vector v such that A v = 0, then A has no inverse (singular).


How to Find the Inverse

Method 1: For 2×2 Matrices (Formula)

For a 2×2 matrix:

$$ A = \begin{bmatrix} a & b \\\\ c & d \end{bmatrix}, \quad A^{-1} = \frac{1}{ad - bc} \begin{bmatrix} d & -b \\\\ -c & a \end{bmatrix} $$

The term ad - bc is the determinant. If determinant = 0, the inverse does NOT exist.

Method 2: Gauss-Jordan Elimination (For Any Size)

  1. Write augmented matrix [A | I] (A on left, identity on right)
  2. Use row operations to transform left side into identity
  3. The right side becomes A⁻¹

Method 3: Adjugate Formula (For 3×3)

$$ A^{-1} = \frac{1}{\det(A)} \cdot \text{adj}(A) $$

where adj(A) is the adjugate (transpose of cofactor matrix).

📐 Our calculator uses: Gauss-Jordan elimination for exact results up to 6×6, with step-by-step row operations displayed!


Properties of Matrix Inverse

1. Inverse of Inverse

$$ (A^{-1})^{-1} = A $$

2. Inverse of Product

$$ (AB)^{-1} = B^{-1} A^{-1} $$

(Note: Order reverses!)

3. Inverse of Transpose

$$ (A^T)^{-1} = (A^{-1})^T $$

4. Scalar Multiple

$$ (kA)^{-1} = \frac{1}{k} A^{-1}, \quad k \neq 0 $$

5. Determinant of Inverse

$$ \det(A^{-1}) = \frac{1}{\det(A)} $$

6. Inverse of Identity

$$ I^{-1} = I $$

💡 Useful Identity: A A^{-1} = I means you can "cancel" matrices when multiplying, but ONLY in the correct order!


Step-by-Step Examples

Example 1: 2×2 Inverse (Formula Method)

Problem: Find the inverse of A = [[2, 1], [1, 2]]

Step 1: Identify a, b, c, d

$$ a = 2,\ b = 1,\ c = 1,\ d = 2 $$

Step 2: Compute determinant det = ad - bc

$$ \det = (2)(2) - (1)(1) = 4 - 1 = 3 \neq 0 $$

Step 3: Apply 2×2 inverse formula

$$ A^{-1} = \frac{1}{3} \begin{bmatrix} 2 & -1 \\\\ -1 & 2 \end{bmatrix} = \begin{bmatrix} \frac{2}{3} & -\frac{1}{3} \\\\ -\frac{1}{3} & \frac{2}{3} \end{bmatrix} $$

Step 4: Verify: A × A⁻¹ = I

$$ \begin{bmatrix} 2 & 1 \\\\ 1 & 2 \end{bmatrix} \begin{bmatrix} \frac{2}{3} & -\frac{1}{3} \\\\ -\frac{1}{3} & \frac{2}{3} \end{bmatrix} = \begin{bmatrix} 1 & 0 \\\\ 0 & 1 \end{bmatrix} $$

✓ Solution: A⁻¹ = [[2/3, -1/3], [-1/3, 2/3]]

Example 2: 2×2 with No Inverse (Singular)

Problem: Check if A = [[1, 2], [2, 4]] has an inverse.

Step 1: Compute determinant

$$ \det = (1)(4) - (2)(2) = 4 - 4 = 0 $$

Conclusion: Since det(A) = 0, the inverse does NOT exist. This matrix is singular.

Notice that row 2 = 2 × row 1 (rows are linearly dependent).

Example 3: 3×3 Inverse (Gauss-Jordan Method)

Problem: Find inverse of A = [[1, 2, 3], [0, 1, 4], [0, 0, 1]] (upper triangular).

Step 1: Write augmented matrix [A | I]

$$ \left[\begin{array}{ccc|ccc} 1 & 2 & 3 & 1 & 0 & 0 \\\\ 0 & 1 & 4 & 0 & 1 & 0 \\\\ 0 & 0 & 1 & 0 & 0 & 1 \end{array}\right] $$

Step 2: Eliminate above from bottom up

  • Row 2: R₂ ← R₂ - 4R₃
  • Row 1: R₁ ← R₁ - 3R₃
  • Row 1: R₁ ← R₁ - 2R₂

Step 3: Result after elimination:

$$ \left[\begin{array}{ccc|ccc} 1 & 0 & 0 & 1 & -2 & 5 \\\\ 0 & 1 & 0 & 0 & 1 & -4 \\\\ 0 & 0 & 1 & 0 & 0 & 1 \end{array}\right] $$

✓ Solution: A⁻¹ = [[1, -2, 5], [0, 1, -4], [0, 0, 1]]

Example 4: Diagonal Matrix Inverse

Problem: Find inverse of D = [[3, 0, 0], [0, 2, 0], [0, 0, 5]]

For a diagonal matrix, the inverse is simply the reciprocal of each diagonal entry:

$$ D^{-1} = \begin{bmatrix} \frac{1}{3} & 0 & 0 \\\\ 0 & \frac{1}{2} & 0 \\\\ 0 & 0 & \frac{1}{5} \end{bmatrix} $$

💡 Insight: Diagonal matrices are the easiest to invert—just take reciprocals of diagonal entries!


Real-World Applications

📊 Solving Linear Systems

The most common use: solving Ax = b by computing x = A⁻¹ b.

$$ x = A^{-1}b $$

However, for large systems, Gaussian elimination is more efficient!

🎮 Computer Graphics

  • Transformations: Inverse of rotation/scale matrices undo those transformations
  • Camera View: Inverse view matrix converts world coordinates to camera space
  • 3D Animation: Reversing skeletal transformations

🔧 Control Systems

  • State-space models: Inverting system matrices
  • Kalman Filters: Computing matrix inverses for state estimation
  • Feedback control: Solving for controller gains

📈 Economics & Finance

  • Leontief Input-Output: (I - A)⁻¹ gives total output needed for demand
  • Portfolio Optimization: Inverse of covariance matrix for optimal weights

🤖 Machine Learning

  • Linear Regression: Normal equation θ = (XᵀX)⁻¹ Xᵀ y
  • Principal Component Analysis: Whitening transformation uses inverse square root

📡 Signal Processing

  • Channel Equalization: Inverse of channel matrix recovers original signal
  • MIMO Systems: Decoding transmitted signals

Common Mistakes to Avoid

  1. Assuming all matrices have inverses → Only square matrices with non-zero determinant!
  2. Forgetting order reversal: (AB)⁻¹ = B⁻¹ A⁻¹ (reverse order!)
  3. Misplacing signs in 2×2 formula: The formula is [[d, -b], [-c, a]] / det, not [[d, b], [c, a]]
  4. Dividing by zero: If determinant = 0, stop—inverse does not exist
  5. Confusing inverse with transpose: A⁻¹ ≠ Aᵀ (except for orthogonal matrices)
  6. Applying inverse to non-square matrices: Only square matrices can have inverses

Frequently Asked Questions

Q: Does every square matrix have an inverse?

A: No! Only matrices with non-zero determinant (called invertible or non-singular). If determinant = 0, the matrix is singular and has no inverse.

Q: What is the inverse of the identity matrix?

A: The identity matrix is its own inverse: I⁻¹ = I.

Q: Is (A + B)⁻¹ = A⁻¹ + B⁻¹?

A: No! This is false. The inverse of a sum has no simple formula. You must actually compute (A+B)⁻¹ directly.

Q: Why does order matter in (AB)⁻¹?

A: Because matrix multiplication is not commutative. When you reverse the product, you must reverse the order: (AB)⁻¹ = B⁻¹ A⁻¹.

Q: What's the relationship between inverse and determinant?

A: det(A⁻¹) = 1 / det(A). If det(A) is small, det(A⁻¹) is large, causing numerical instability.

Q: Can I find the inverse of a 1×1 matrix?

A: Yes! A 1×1 matrix [a] has inverse [1/a] when a ≠ 0. This is just the reciprocal.


Practice Problems

Beginner

  1. Find the inverse of A = [[4, 1], [2, 3]] using the 2×2 formula.

  2. Does B = [[2, 4], [1, 2]] have an inverse? Why or why not?

  3. Find the inverse of D = [[5, 0], [0, 3]] (diagonal matrix).

Intermediate

  1. Find inverse of C = \begin{bmatrix} 1 & 2 \\\\ 3 & 7 \end{bmatrix} and verify C · C⁻¹ = I.

  2. For A = [[1, 1], [2, 1]], compute A⁻¹ and then verify (A²)⁻¹ = (A⁻¹)².

Advanced

  1. Find the inverse of A = \begin{bmatrix} 1 & 0 & 1 \\\\ 2 & 1 & 0 \\\\ 1 & 1 & 1 \end{bmatrix} using Gauss-Jordan elimination.

  2. If A = [[4, 7], [2, 6]] and B = [[3, 5], [1, 2]], verify that (AB)⁻¹ = B⁻¹ A⁻¹.

Click to reveal solutions

1. A⁻¹ = [[3/10, -1/10], [-1/5, 2/5]] (det = 10)

2. No, det = 2·2 - 4·1 = 4 - 4 = 0 → singular

3. D⁻¹ = [[1/5, 0], [0, 1/3]]

4. C⁻¹ = [[7, -2], [-3, 1]] (det = 1)

5. A⁻¹ = [[-1, 1], [2, -1]], both equal [[3, -2], [-4, 3]]

6. A⁻¹ = [[1, -1, 1], [2, 0, -2], [-1, 1, -1]]

7. Verify by direct multiplication



Summary

🎯 Key Takeaways

  • Inverse definition: A·A⁻¹ = A⁻¹·A = I
  • Requirements: Square matrix + det(A) ≠ 0
  • 2×2 formula: [[d, -b], [-c, a]] / det
  • Properties: (AB)⁻¹ = B⁻¹ A⁻¹, det(A⁻¹) = 1/det(A)
  • Applications: Solving systems, graphics, control theory, regression
  • No inverse if: det=0, linearly dependent rows/columns, zero eigenvalue

💡 Quick Test: A matrix is invertible if and only if its determinant is non-zero. Use our determinant calculator first!

Try It Yourself!

Use the calculator above to find matrix inverses:

  1. Enter your square matrix (2×2 to 6×6)
  2. Click "Calculate" to see:
    • Determinant check (inverse exists only if det ≠ 0)
    • Step-by-step Gauss-Jordan elimination
    • The inverse matrix A⁻¹
    • Verification: A × A⁻¹ = I

📐 Test these examples:

  • 2×2: [[4, 7], [2, 6]] (det = 10, inverse exists)
  • 2×2 singular: [[1, 2], [2, 4]] (det = 0, no inverse)
  • 3×3: [[1, 2, 3], [0, 1, 4], [0, 0, 1]] (upper triangular)
  • Diagonal: [[3, 0], [0, 5]] (inverse = reciprocal of diagonals)

📐 Pro Tip: For 2×2 matrices, memorize the formula! For larger matrices, let our calculator do the work with step-by-step explanations.

Press / to search operations