Skip to main content
返回指南
6 min read5 步骤

How to Calculate the Matrix Inverse: Step-by-Step Guide

Learn to manually calculate the inverse of 2x2 and 3x3 matrices. Step-by-step formulas, worked examples, common pitfalls, and calculator usage.

跳过数学——使用计算器

分步说明

1

Understand Prerequisites and Identify Your Matrix

Before starting, ensure you are comfortable with determinants, minors, cofactors, and matrix transposition. Identify the square matrix (2x2 or 3x3) for which you need to find the inverse.

2

Calculate the Determinant of the Matrix

This is the most critical first step. For a 2x2 matrix `[[a,b],[c,d]]`, `det(A) = ad - bc`. For a 3x3 matrix, use the cofactor expansion method. If the determinant is zero, the matrix is singular, and its inverse does not exist. Stop here if det(A) = 0.

3

Construct the Adjoint Matrix

For a 2x2 matrix `[[a,b],[c,d]]`, the adjoint is simply `[[d,-b],[-c,a]]`. For a 3x3 matrix, this involves two sub-steps: first, find the Minor Matrix (determinant of sub-matrices for each element); second, create the Cofactor Matrix by applying the checkerboard pattern of signs `[[+,-,+], [-,+,-], [+, -,+]]` to the Minor Matrix; finally, transpose the Cofactor Matrix to get the Adjoint Matrix.

4

Apply the Inverse Formula

The general formula for the inverse is `A⁻¹ = (1/det(A)) * adj(A)`. You now have both the determinant (from Step 2) and the adjoint matrix (from Step 3).

5

Perform Final Scalar Multiplication

Multiply every element of the Adjoint Matrix by the scalar value `1/det(A)`. This will yield your final inverse matrix, A⁻¹.

How to Calculate the Matrix Inverse: Step-by-Step Guide

Understanding and calculating the inverse of a matrix is a fundamental skill in linear algebra, crucial for solving systems of linear equations, performing transformations, and more. This guide will walk you through the manual calculation of matrix inverses for 2x2 and 3x3 matrices, providing the necessary formulas, step-by-step instructions, and practical examples.

Prerequisites

Before diving into matrix inversion, ensure you are familiar with the following concepts:

  • Matrix Basics: Understanding rows, columns, and matrix notation.
  • Determinants: How to calculate the determinant of 2x2 and 3x3 matrices.
  • Scalar Multiplication: Multiplying a matrix by a single number.
  • Matrix Transposition: Swapping rows and columns of a matrix.
  • Cofactors and Minors: For 3x3 matrices, understanding how to find these values is essential.

Understanding the Matrix Inverse

For a square matrix A, its inverse, denoted A⁻¹, is another matrix such that when multiplied by A, it yields the identity matrix (I). That is, AA⁻¹ = A⁻¹A = I. The identity matrix is a square matrix with ones on the main diagonal and zeros elsewhere.

Not all square matrices have an inverse. A matrix must be non-singular (its determinant must not be zero) to have an inverse. If det(A) = 0, the matrix is singular and no inverse exists.

Calculating the Inverse of a 2x2 Matrix

The inverse of a 2x2 matrix is the most straightforward to calculate by hand.

Formula for a 2x2 Matrix

Given a 2x2 matrix A:

A = [[a, b], [c, d]]

The determinant is det(A) = ad - bc.

The inverse is given by:

A⁻¹ = (1/det(A)) * [[d, -b], [-c, a]]

Step-by-Step Calculation (2x2)

  1. Calculate the Determinant (ad - bc): If det(A) = 0, stop, the inverse does not exist.
  2. Swap the elements on the main diagonal: a and d switch places.
  3. Change the sign of the off-diagonal elements: b and c become -b and -c.
  4. Multiply the resulting matrix by 1/det(A).

Worked Example (2x2)

Let's find the inverse of matrix A:

A = [[3, 2], [1, 4]]

  1. Calculate the determinant: det(A) = (3 * 4) - (2 * 1) = 12 - 2 = 10 Since det(A) ≠ 0, the inverse exists.

  2. Swap main diagonal elements: [[4, 2], [1, 3]]

  3. Change signs of off-diagonal elements: [[4, -2], [-1, 3]]

  4. Multiply by 1/det(A): A⁻¹ = (1/10) * [[4, -2], [-1, 3]] A⁻¹ = [[4/10, -2/10], [-1/10, 3/10]] A⁻¹ = [[2/5, -1/5], [-1/10, 3/10]]

Calculating the Inverse of a 3x3 Matrix

Calculating the inverse of a 3x3 matrix manually is more involved, requiring the use of the adjoint matrix.

Formula for a 3x3 Matrix (using Adjoint)

For a 3x3 matrix A, its inverse is given by:

A⁻¹ = (1/det(A)) * adj(A)

Where adj(A) is the adjoint of A, which is the transpose of the cofactor matrix of A.

Step-by-Step Calculation (3x3)

  1. Calculate the Determinant of A: If det(A) = 0, the inverse does not exist.
  2. Find the Minor Matrix: For each element aᵢⱼ, calculate the determinant of the 2x2 matrix remaining after removing row i and column j. This is the minor Mᵢⱼ.
  3. Find the Cofactor Matrix: Apply a checkerboard pattern of signs to the minor matrix. The cofactor Cᵢⱼ is (-1)⁽ⁱ⁺ʲ⁾ * Mᵢⱼ. [[+, -, +], [-, +, -], [+, -, +]]
  4. Transpose the Cofactor Matrix: Swap rows and columns of the cofactor matrix to get the Adjoint Matrix, adj(A) = (Cofactor Matrix)ᵀ.
  5. Multiply the Adjoint Matrix by 1/det(A): This gives you A⁻¹.

Worked Example (3x3)

Let's find the inverse of matrix A:

A = [[1, 2, 3], [0, 1, 4], [5, 6, 0]]

  1. Calculate the Determinant: det(A) = 1(0-24) - 2(0-20) + 3(0-5) det(A) = -24 + 40 - 15 = 1 Since det(A) ≠ 0, the inverse exists.

  2. Find the Minor Matrix:

    • M₁₁ = det([[1,4],[6,0]]) = 0-24 = -24
    • M₁₂ = det([[0,4],[5,0]]) = 0-20 = -20
    • M₁₃ = det([[0,1],[5,6]]) = 0-5 = -5
    • M₂₁ = det([[2,3],[6,0]]) = 0-18 = -18
    • M₂₂ = det([[1,3],[5,0]]) = 0-15 = -15
    • M₂₃ = det([[1,2],[5,6]]) = 6-10 = -4
    • M₃₁ = det([[2,3],[1,4]]) = 8-3 = 5
    • M₃₂ = det([[1,3],[0,4]]) = 4-0 = 4
    • M₃₃ = det([[1,2],[0,1]]) = 1-0 = 1

    Minor Matrix: [[ -24, -20, -5], [ -18, -15, -4], [ 5, 4, 1]]

  3. Find the Cofactor Matrix (apply sign changes): C₁₁ = +(-24) = -24 C₁₂ = -(-20) = 20 C₁₃ = +(-5) = -5 C₂₁ = -(-18) = 18 C₂₂ = +(-15) = -15 C₂₃ = -(-4) = 4 C₃₁ = +(5) = 5 C₃₂ = -(4) = -4 C₃₃ = +(1) = 1

    Cofactor Matrix: [[ -24, 20, -5], [ 18, -15, 4], [ 5, -4, 1]]

  4. Transpose the Cofactor Matrix to get the Adjoint Matrix: adj(A) = [[ -24, 18, 5], [ 20, -15, -4], [ -5, 4, 1]]

  5. Multiply by 1/det(A): Since det(A) = 1, 1/det(A) = 1. A⁻¹ = (1/1) * [[ -24, 18, 5], [ 20, -15, -4], [ -5, 4, 1]]

    A⁻¹ = [[ -24, 18, 5], [ 20, -15, -4], [ -5, 4, 1]]

Common Pitfalls and Important Considerations

  • Singular Matrices: Always calculate the determinant first. If it's zero, the inverse does not exist, and further calculations are futile.
  • Sign Errors: For 3x3 matrices, the checkerboard pattern for cofactors is crucial. A single sign error will propagate and invalidate the entire result.
  • Transposition Error: Forgetting to transpose the cofactor matrix to get the adjoint matrix is a common mistake.
  • Arithmetic Mistakes: Manual calculations, especially with larger numbers or fractions, are prone to simple addition, subtraction, or multiplication errors. Double-check your work.
  • Fractions: The inverse matrix often contains fractions. Be meticulous when performing scalar multiplication at the final step.

When to Use a Calculator or Software

While understanding the manual process is vital for conceptual grasp, practical applications often call for efficiency. Consider using a calculator or mathematical software (e.g., Wolfram Alpha, MATLAB, Python with NumPy) when:

  • Dealing with Matrices Larger than 3x3: The manual calculation becomes exceedingly tedious and error-prone for 4x4 matrices and beyond.
  • Ensuring Accuracy: For critical applications, software can provide high precision and eliminate human error.
  • Verifying Manual Work: After performing a manual calculation, a calculator can quickly confirm your result.
  • Working with Complex Numbers or Large Decimals: These can complicate manual arithmetic significantly.

Mastering matrix inversion by hand builds a strong foundation in linear algebra. For routine or complex tasks, leveraging computational tools is a smart and efficient approach.

准备好计算了吗?

跳过手动工作并立即获得结果。

打开计算器

设置

隐私条款关于© 2026 PrimeCalcPro