A matrix has a one-line inverse: swap the two diagonal entries, change the sign of the other two, and divide everything by the determinant . If the determinant is zero, there is no inverse.
| Step | On | |
|---|---|---|
| 1 | Compute the determinant. : main diagonal product minus the other product (2×2 determinant). | |
| 2 | Stop if the determinant is zero. A zero determinant means the matrix is singular: no inverse exists. | : the inverse exists |
| 3 | Swap a and d, change the signs of b and c. This matrix is the adjugate of . | |
| 4 | Multiply by 1 over the determinant. Every entry is divided by the same number.Scalar multiplication ↗ | |
| 5 | Check that A times the inverse is I. One matrix product catches any sign slip. | ✓ |