To calculate the inverse of a square matrix, follow these steps: find the matrix of minors, the matrix of cofactors, its adjoint (transpose of the cofactor matrix), and finally, divide the adjoint by the determinant of the original matrix.
Here's a detailed breakdown of the process:
1. Check for Invertibility
Before you begin, ensure the matrix is square (same number of rows and columns) and its determinant is not zero. A matrix with a determinant of zero is singular and does not have an inverse.
2. Calculate the Matrix of Minors
- For each element in the original matrix, find its minor.
- The minor of an element is the determinant of the submatrix formed by deleting the row and column containing that element.
- Arrange these minors into a new matrix called the "matrix of minors".
3. Calculate the Matrix of Cofactors
- Create the matrix of cofactors from the matrix of minors.
- Apply a "checkerboard" pattern of signs (+ and -) to the matrix of minors. Start with a + in the top-left corner.
- Multiply each element in the matrix of minors by +1 or -1 according to its position in the checkerboard pattern:
+ - + - ... - + - + ... + - + - ... - + - + ... ...
- The resulting matrix is the "matrix of cofactors".
4. Find the Adjoint (or Adjugate)
- The adjoint (or adjugate) of the matrix is the transpose of the matrix of cofactors.
- The transpose is found by swapping the rows and columns of the matrix of cofactors. That is, the element in row i, column j becomes the element in row j, column i.
5. Calculate the Determinant
-
Compute the determinant of the original matrix. Various methods exist, such as cofactor expansion. For a 2x2 matrix:
| a b |
| c d |The determinant is (ad - bc).
6. Calculate the Inverse
-
Divide each element of the adjoint matrix by the determinant you calculated in step 5. This is equivalent to multiplying the adjoint matrix by 1/determinant.
-
The resulting matrix is the inverse of the original matrix.
Formula:
Inverse(A) = (1 / det(A)) * adj(A)
Where:
- A is the original matrix
- det(A) is the determinant of A
- adj(A) is the adjoint of A
Example (2x2 Matrix):
Let's say we have matrix A:
| 4 7 |
| 2 6 |
-
Determinant: (4*6) - (7*2) = 24 - 14 = 10
-
Adjoint:
- Swap the elements on the main diagonal (4 and 6)
- Change the signs of the off-diagonal elements (7 and 2)
Adjoint(A) =
| 6 -7 |
| -2 4 | -
Inverse: Multiply the adjoint by 1/determinant (1/10)
Inverse(A) =
| 6/10 -7/10 |
| -2/10 4/10 |Which simplifies to:
| 0.6 -0.7 |
| -0.2 0.4 |
Important Notes:
- Not all square matrices have inverses. Only invertible (non-singular) matrices have inverses. A matrix is invertible if and only if its determinant is non-zero.
- The inverse of a matrix, when multiplied by the original matrix, results in the identity matrix.