AI Tools Free

Matrix Inverse Calculator

Enter four real numbers (a, b, c, d) in row order into this matrix inverse calculator to compute the exact 2 × 2 inverse matrix in your browser. As an instant inverse matrix calculator, the tool evaluates the determinant ad - bc, swaps the main diagonal, negates the off-diagonal terms, and displays up to 12 significant digits with automatic singularity detection.

Free to useNo sign-upRuns in your browser
Enter your details

Enter the inputs, then select Calculate result.

Separate values with commas, spaces or new lines. At most 1,000 finite numbers, each with magnitude no greater than 1 billion.

Your result
Enter your details

Result will appear here

How to Calculate the Inverse of a Matrix (2x2 Adjugate Formula)

The Matrix Inverse Calculator evaluates four real numbers entered in row-major order to check whether a square array has a multiplicative inverse. Understanding how to calculate inverse of a matrix starts with the identity condition: a square matrix A is invertible (nonsingular) if and only if there exists an inverse matrix A⁻¹ such that A · A⁻¹ = A⁻¹ · A = I₂.

When learning how to calculate inverse matrix 2x2 arrays with top row (a, b) and bottom row (c, d), the closed-form adjugate rule divides the classical adjoint by the scalar determinant det(A) = ad - bc: A⁻¹ = (1 / (ad - bc)) × [d, -b; -c, a] = [d / (ad - bc), -b / (ad - bc); -c / (ad - bc), a / (ad - bc)].

Three algebraic steps govern this transformation: (1) Main diagonal swap: top-left entry a and bottom-right entry d exchange positions. (2) Off-diagonal sign reversal: top-right entry b and bottom-left entry c stay in their slots but flip signs to -b and -c. (3) Determinant division: every entry in the adjugate matrix is divided by det(A) = ad - bc, which you can inspect separately in the Determinant Calculator. If ad - bc = 0, the rows are linearly dependent and no inverse exists.

Diagram of the 2x2 matrix inverse adjugate formula showing how main diagonal entries swap, off-diagonal entries negate, and all four divide by ad - bc.
2×2 adjugate inversion workflow: swap (a, d), negate (b, c) to (-b, -c), and divide each entry by the scalar determinant ad - bc.

2x2 Inverse Matrix Calculator Reference & Transformation Table

Review the 10 common 2 × 2 matrix classes, their row-order inputs (a, b, c, d), scalar determinants, adjugate matrices, and resulting inverse outputs below.

Matrix Class / TransformationRow-Order Input (a, b, c, d)Determinant (ad - bc)Adjugate (d, -b, -c, a)Inverse Matrix A⁻¹ Output
Preloaded Default Matrix1, 2, 3, 4-24, -2, -3, 1-2 1 / 1.5 -0.5
2×2 Identity Matrix (I₂)1, 0, 0, 111, 0, 0, 11 0 / 0 1
Unimodular Integer Matrix (det = 1)3, 2, 4, 313, -2, -4, 33 -2 / -4 3
Unimodular Reflection (det = -1)2, 3, 3, 4-14, -3, -3, 2-4 3 / 3 -2
Diagonal Axis Scaling Matrix2, 0, 0, 5105, 0, 0, 20.5 0 / 0 0.2
Horizontal Shear (k = 3)1, 3, 0, 111, -3, 0, 11 -3 / 0 1
90° Counterclockwise Rotation0, -1, 1, 010, 1, -1, 00 1 / -1 0
45° Rotation & √2 Scale1, -1, 1, 121, 1, -1, 10.5 0.5 / -0.5 0.5
Symmetric Covariance Matrix4, 2, 2, 383, -2, -2, 40.375 -0.25 / -0.25 0.5
Singular Proportional Matrix2, 4, 3, 606, -4, -3, 2Rejected (Singular matrix)

How to Use the Matrix Inverse Calculator Step by Step

Follow these three steps to format your 2 × 2 entries in row-major order, check invertibility, and export the inverted matrix.

Enter Four Numbers in 2x2 Row Order

Paste four real numbers (a, b, c, d) into the First 2 × 2 matrix, row order text area, separated by commas, spaces, or newlines. The parser assigns the first two numbers to the top row (a, b) and the last two numbers to the bottom row (c, d). The workspace preloads 1, 2, 3, 4 for immediate testing.

Input and settings
Step 1 capture of the Matrix Inverse Calculator input panel showing the preloaded row-order entry 1, 2, 3, 4.
Step 1: Enter four real numbers (a, b, c, d) in 2×2 row-major order separated by commas, spaces, or line breaks.

Verify Non-Zero Determinant and Bounds

Ensure your input contains exactly four finite real numbers within ±1,000,000,000 (10⁹) and a non-zero determinant ad - bc. Before dividing, the runtime checks whether |ad - bc| <= 100 * Number.EPSILON * max(|ad|, |bc|) and stops with a diagnostic prompt if the matrix is singular or ill-conditioned.

Tool result
Step 2 capture of the Matrix Inverse Calculator output panel displaying the two-line inverted matrix -2 1 and 1.5 -0.5.
Step 2: The calculator verifies that det(A) = ad - bc is non-zero and well-conditioned before dividing.

Calculate and Export the Inverse Matrix

Select Calculate result to compute [d/det, -b/det; -c/det, a/det] in your browser. The result panel prints row one on line one and row two on line two, rounded to 12 significant digits with -0 normalized to 0. Click Copy or Download (result.txt) to save the output.

Review the details
Step 3 full workspace view of the Matrix Inverse Calculator showing the input matrix, inverted output, and export buttons.
Step 3: Inspect the two-line 2×2 inverse matrix and copy or download result.txt.

Worked Examples for the 2x2 Inverse Matrix Calculator

Use these three concrete test cases to verify standard fractional inverses, unimodular integer inverses, and singular matrix rejection.

Baseline Inversion with Fractional Entries (1, 2, 3, 4)

For the preloaded matrix with top row (1, 2) and bottom row (3, 4), the determinant is (1)(4) - (2)(3) = 4 - 6 = -2. Swapping the main diagonal gives 4 and 1, while negating the off-diagonal gives -2 and -3. Dividing all four entries by -2 produces row one '-2 1' and row two '1.5 -0.5'.

Worked example 1 illustrating how 1, 2, 3, 4 with determinant -2 inverts to row one -2 1 and row two 1.5 -0.5.
Baseline inversion: [1, 2; 3, 4] has determinant -2 and adjugate [4, -2; -3, 1], yielding [-2, 1; 1.5, -0.5].

Unimodular Encryption & Lattice Matrix (3, 2, 4, 3)

In Hill cipher cryptography and integer lattice problems, an integer matrix has an all-integer inverse over the real numbers only when its determinant is +1 or -1 (a unimodular matrix). Entering 3, 2, 4, 3 gives det(A) = (3)(3) - (2)(4) = 9 - 8 = 1. Dividing the adjugate (3, -2, -4, 3) by 1 returns the exact integer inverse '3 -2' on line one and '-4 3' on line two.

Worked example 2 showing a unimodular integer matrix 3, 2, 4, 3 with determinant 1 producing the all-integer inverse 3 -2 and -4 3.
Unimodular matrix check: because det([3, 2; 4, 3]) = 9 - 8 = 1, the inverse [3, -2; -4, 3] remains purely integer.

Singular Collinear Transformation Check (2, 4, 3, 6)

If you enter 2, 4, 3, 6, the second row is 1.5 times the first row, making the determinant (2)(6) - (4)(3) = 12 - 12 = 0. Similarly, if you enter a nearly collinear matrix where |ad - bc| falls within 100 * Number.EPSILON of the product magnitude, the calculator blocks division and displays: 'The matrix or system is singular or numerically too close to singular.'

Worked example 3 showing singular rejection for proportional rows 2, 4, 3, 6 where ad - bc = 0.
Singularity guard: proportional rows [2, 4; 3, 6] yield det = 0 and trigger an immediate singular-matrix notice.

How to Read and Verify the Inverse Matrix Calculator Output

The output panel prints four space-separated and newline-separated numbers representing row one on the top line and row two on the bottom line.

When an off-diagonal entry is zero (such as in the diagonal scaling matrix 2, 0, 0, 5), negating 0 in IEEE 754 floating-point arithmetic normally produces -0. Our output formatter explicitly checks Object.is(v, -0) and normalizes signed zero to clean 0 while displaying up to 12 significant digits.

To verify any result, paste your original matrix into the first box of the Matrix Multiplication Calculator and your computed inverse into the second box. Multiplying A · A⁻¹ yields the 2 × 2 identity matrix '1 0' on row one and '0 1' on row two (up to minor 12th-digit rounding on repeating decimals like 1/3). If you are inverting a coefficient matrix to solve a linear system Ax = b, you can also verify the solution vector (x, y) directly in the System of Equations Solver.

Identity verification diagram showing how multiplying A by its computed inverse A⁻¹ recovers the 2x2 identity matrix [1, 0; 0, 1].
Identity check: multiplying input matrix A by output A⁻¹ in the Matrix Multiplication Calculator recovers I₂ = [1, 0; 0, 1].

Matrix Inverse Calculator Input Rules, Conditioning & Related Tools

Review these four-entry parsing rules, numeric bounds, and relative conditioning thresholds before applying the inverted matrix to coursework or engineering models.

This workspace is purpose-built for 2 × 2 real matrices and requires exactly four finite numbers in row-major order (a, b, c, d). Supplying fewer or more than four numbers (such as a 9-entry 3 × 3 array) triggers the validation prompt: 'Supply exactly four entries in 2 × 2 row order.' Each entry must be a standard decimal or scientific-notation number (1.5e-4 is accepted; fraction slashes like 1/3 are rejected) with magnitude at most 1,000,000,000.

Need an adjacent algebra solver? You can solve single-variable equations in the Linear Equation Solver or compute real and complex roots in the Quadratic Equation Solver, alongside the 2 × 2 determinant, matrix multiplication, and linear system tools linked below.

Validation rules overview for the 2x2 Matrix Inverse Calculator showing the 4-entry requirement, 10^9 magnitude bound, and epsilon stability check.
Input validation: requires exactly 4 real entries within ±10⁹ and rejects singular or near-singular determinants.

Frequently Asked Questions About Matrix Inverse Calculator

Answers about using Matrix Inverse Calculator and understanding its results.

How do you calculate the inverse of a 2x2 matrix by hand?

First, calculate the determinant D = ad - bc. If D is not zero, form the adjugate matrix by swapping the main diagonal entries (a and d) and changing the signs of the off-diagonal entries (b becomes -b, and c becomes -c). Finally, divide all four entries by D.

Why does the calculator say my matrix is singular or too close to singular?

A matrix is singular when its determinant ad - bc equals zero, which happens whenever one row is a scalar multiple of the other or a row or column consists entirely of zeros. The calculator also blocks matrices where |ad - bc| <= 100 * Number.EPSILON * max(|ad|, |bc|) because floating-point cancellation has destroyed all reliable significant digits.

When does an integer 2x2 matrix have an inverse with only whole numbers?

An integer matrix has an inverse composed solely of integers over the real numbers if and only if its determinant ad - bc equals +1 or -1 (a unimodular matrix). For any other non-zero determinant D, at least some entries in the inverse matrix are divided by |D| > 1 and become fractions.

How can I calculate the inverse of a 3x3 or 4x4 matrix in Excel or a graphing calculator?

This browser tool is scoped strictly to 2 × 2 matrices (4 entries). For 3 × 3 or 4 × 4 matrices, use Gauss-Jordan row reduction [A | I] -> [I | A⁻¹], run =MINVERSE(A1:C3) in Excel or Google Sheets, or enter the matrix under [MATRIX] on a TI-84 calculator and press the x⁻¹ key.

Is this inverse matrix calculator free and does it keep my data private?

Yes. Every calculation runs locally inside your browser using client-side JavaScript. Your numeric inputs and exported result.txt files are never sent to an external server.

Calculate result with your input

Choose another tool for your next calculation, conversion, or text task.

Calculate result