CalcWorldHub
Math · CalcWorldHub

How to Invert a 2×2 Matrix and Check the Result

For A = [[1, 2], [3, 4]], det(A) = −2, so the inverse exists: A⁻¹ = [[−2, 1], [1.5, −0.5]]. Multiplying A by this matrix returns the identity. The operation is undefined when the determinant is zero.

Open calculator
Two coordinate grids connected by forward and reverse transformation arrows

Share this article

A 2 by 2 matrix is checked for nonzero determinant, transformed by the adjugate pattern, divided by its determinant, and verified by multiplication.
The determinant check comes before division.

Formula and example

For A = [[a, b], [c, d]], first calculate det(A) = ad − bc. If it is nonzero, A⁻¹ = 1/(ad − bc) × [[d, −b], [−c, a]]. Swap the diagonal entries, change the signs of the off-diagonal entries, then divide every entry by the determinant.

The second matrix [[4, 7], [2, 6]] has determinant 10 and inverse [[0.6, −0.7], [−0.2, 0.4]]. Both examples use the same row and column ordering as the determinant formula.

The inverse of the matrix with rows one, two and three, four is a matrix with rows negative two, one and one point five, negative zero point five.
Multiplication by the original matrix checks the inverse.

Worked examples

Example 1 · inverse with negative determinant

Inputs: A = [[1, 2], [3, 4]].

Calculation: det(A) = 1 × 4 − 2 × 3 = −2. A⁻¹ = (1/−2) × [[4, −2], [−3, 1]] = [[−2, 1], [1.5, −0.5]].

Multiplying A by this inverse gives the identity matrix.

Example 2 · integer determinant

Inputs: A = [[4, 7], [2, 6]].

Calculation: det(A) = 4 × 6 − 7 × 2 = 10. A⁻¹ = (1/10) × [[6, −7], [−2, 4]] = [[0.6, −0.7], [−0.2, 0.4]].

The nonzero determinant permits an inverse; A·A⁻¹ is the identity.

Verify by multiplying back

For an exact inverse, A·A⁻¹ = I = [[1, 0], [0, 1]]. Multiply each row of A by each column of the candidate inverse: diagonal entries should be one and off-diagonal entries zero.

The displayed decimals are rounded, so a multiplication using only those displayed values can leave small residuals. Preserve more precision in intermediate arithmetic when it matters.

Know the limit of the result

A zero determinant means no inverse exists. A determinant close to zero can produce large entries and numerical sensitivity even when the mathematical inverse exists; this calculator checks exact zero in its computed value and does not estimate a condition number.

OpenStax connects the 2×2 inverse formula with matrix multiplication. Larger computational systems may be better solved with methods chosen for their numerical stability and structure.

Use the inverse as an operator

In a two-equation system A x = b, the inverse provides x = A⁻¹b when A is nonsingular. The entries of b must use the same equation order as the rows of A. The calculator returns the matrix inverse itself; substituting a right-hand side and solving the system are additional steps.

The product check uses order deliberately: A·A⁻¹ should equal the identity, and A⁻¹·A should also equal the identity for an exact square inverse. With rounded displayed entries, small residuals can appear. Check with unrounded values or adequate precision before treating a display-level discrepancy as an algebraic failure.

A determinant close to zero can make inverse entries large because every entry is divided by that determinant. This can amplify small errors in measured or rounded coefficients. The calculator’s exact-zero guard only identifies a zero determinant; it does not report condition number or certify numerical stability.

Keep the matrix layout visible when entering values: top row first, then bottom row. A transpose or row-order mistake can produce a mathematically valid inverse for a different matrix. For hand checking, compute the determinant, swap the diagonal entries, negate the off-diagonal entries, and divide all four values by the determinant.

For larger systems or measured data, numerical libraries commonly solve the system directly using methods chosen for the matrix rather than explicitly forming an inverse. The 2×2 formula remains useful for learning and small exact cases, but the best computational method depends on dimension, precision, and structure.

For a coordinate transformation, applying the inverse maps the transformed vector back to the original coordinates, provided the determinant is nonzero. This interpretation depends on the same coordinate bases and entry order used to define the original matrix; it does not supply missing unit conversions.

An inverse may exist mathematically yet be a poor practical tool when the matrix is nearly singular. If inputs represent measurements, carry enough precision through the calculation and validate the residual against the application’s tolerance. The page’s displayed result is a formula demonstration, not a numerical-quality assessment.

Sources and further reading

Share this article

Browse all articles · Calculator: 2×2 matrix inverse calculator