a
b
c
d
x
y
z
AC
i
Randomize
Formula for the inverse of a 2×2 matrix
Let the matrix A have rows (a, b) and (c, d). First compute its determinant, det(A) = a·d − b·c. If the determinant is zero the matrix has no inverse. Otherwise
A⁻¹ = 1/(a·d − b·c) · [ d −b ; −c a ]
In words: swap the two entries on the main diagonal, change the sign of the other two entries, and divide everything by the determinant. The matrix with the swapped and negated entries is the adjugate of A, so this is the general formula A⁻¹ = adj(A) / det(A) in its smallest case.
Worked example
Take the matrix with rows (4, 7) and (2, 6). Its determinant is 4·6 − 7·2 = 24 − 14 = 10, which is not zero, so the inverse exists.
Swap 4 and 6, and negate 7 and 2. That gives the rows (6, −7) and (−2, 4). Divide by 10: the inverse has rows (3/5, −7/10) and (−1/5, 2/5).
Check by multiplying. The first row of A times the first column of the inverse is 4·(3/5) + 7·(−1/5) = 12/5 − 7/5 = 1, and the first row times the second column is 4·(−7/10) + 7·(2/5) = −14/5 + 14/5 = 0. The second row gives 0 and 1 in the same way, so the product is the identity matrix.
When a 2×2 matrix has no inverse
The formula divides by a·d − b·c, so it breaks down exactly when the determinant is zero. That happens when one row is a multiple of the other, as in rows (2, 4) and (1, 2). Such a matrix is called singular, and a linear system with this coefficient matrix has either no solution or infinitely many.
The calculator above is set to 2×2. It keeps fractions exact instead of rounding, so 3/5 stays 3/5, and it also accepts complex numbers and variables.