Matrix 2x2 Inverse
Computes the inverse of a 2x2 matrix from its 4 elements a, b, c and d when det is non zero.
—
2×2 inverse: A⁻¹ = (1/det) · [[d, -b], [-c, a]]
Take A = [[a, b], [c, d]] with det(A) = ad - bc. The inverse works out to A⁻¹ = (1/det) · [[d, -b], [-c, a]]. In plain terms, you swap the diagonal entries, flip the sign on the off-diagonal ones, and divide the whole thing by the determinant. The matrix is invertible if and only if det ≠ 0. When the determinant is zero, A is singular and there's simply no inverse. Here's a worked example with A = [[1, 2], [3, 4]]: det = 1·4 - 2·3 = -2, which gives A⁻¹ = (-1/2) · [[4, -2], [-3, 1]] = [[-2, 1], [1.5, -0.5]]. You can confirm it by checking that A · A⁻¹ = I. The inverse undoes whatever linear transformation A applied, so it lets you solve systems Ax = b ⇒ x = A⁻¹b and run geometric transformations in reverse.
Applications
It shows up when you solve a 2×2 linear system Ax = b head-on, in computer graphics where you need to undo a rotation, scale or shear, and whenever you switch between 2D coordinate systems. Closed-form linear regression on 2 features relies on it too (β = (XᵀX)⁻¹Xᵀy, the formula sklearn uses), along with 2D Kalman filters and plane physics problems involving forces and accelerations.
FAQ
What if det = 0? Then there's no inverse. The two rows are linearly dependent, meaning one is just a multiple of the other, and the matrix squashes the whole plane down onto a single line.
Does (AB)⁻¹ = A⁻¹B⁻¹? No. The right identity is (AB)⁻¹ = B⁻¹A⁻¹, with the order flipped. A couple of others worth remembering: (A⁻¹)⁻¹ = A and det(A⁻¹) = 1/det(A).
Is solving Ax = b with the inverse a good idea? At 2×2 it's perfectly fine. Once the matrices get large, though, computing A⁻¹ and multiplying tends to accumulate error, so Gaussian elimination or LU decomposition holds up better numerically.
Related Tools
Matrix 2x2 Determinant
Computes the determinant of a 2x2 matrix from its 4 inline elements a, b, c and d.
2x2 Matrix Determinant and Inverse
Calculate the determinant and inverse of a 2x2 matrix from its four entries. See the step-by-step and the exact result in fractions or decimals.
Arccosine Calculator
Calculate the arccosine (arccos) of a value and get the angle in degrees, radians and gradians. Domain: −1 to 1.
Inverse Rule of 72 (yield to double in N periods)
Given N periods to double your capital, compute the required yield using Rule of 72/70/69.3 and compare to the exact discrete rate.
3x3 Matrix Determinant Calculator
Calculate the determinant of a 3x3 matrix using Sarrus' rule from its nine entries. See the worked-out calculation and the result instantly.
Determinant of 4×4 Matrix
Compute determinant of 4×4 matrix by Laplace expansion.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.