
Matrix Inverse Calculator
Use this matrix inverse calculator to find the inverse matrix of any nonsingular 2x2 array in row order using the 1/(ad-bc) adjugate formula in your browser.
Open toolEnter two 2 × 2 arrays in row-major order (a, b, c, d) into this matrix multiplication calculator to compute their exact matrix product C = A · B in your browser. Whether you need a quick multiply matrices calculator for linear algebra homework or a multiplying matrices calculator to compose 2D transformations, the workspace evaluates all four row-by-column dot products to 12 significant digits.
Enter the inputs, then select Calculate result.
Result will appear here
The Matrix Multiplication Calculator parses four real numbers from the first input box as A = [a₁₁, a₁₂; a₂₁, a₂₂] and four real numbers from the second input box as B = [b₁₁, b₁₂; b₂₁, b₂₂]. Understanding how to multiply matrices requires pairing each row of the left matrix with each column of the right matrix rather than multiplying matching positions directly.
When learning how to multiply 2x2 matrices, each entry c_ij in row i and column j of the product C = A · B equals the dot product of row i of A with column j of B: C = [a₁₁b₁₁ + a₁₂b₂₁, a₁₁b₁₂ + a₁₂b₂₂; a₂₁b₁₁ + a₂₂b₂₁, a₂₁b₁₂ + a₂₂b₂₂].
In the zero-indexed array notation used by our JavaScript engine (a = [a0, a1, a2, a3] and b = [b0, b1, b2, b3]), the top row of C combines row 1 of A (a0, a1) with column 1 (b0, b2) to get c₁₁ = a0*b0 + a1*b2 and with column 2 (b1, b3) to get c₁₂ = a0*b1 + a1*b3. Similarly, the bottom row of C pairs row 2 of A (a2, a3) with both columns of B to produce c₂₁ = a2*b0 + a3*b2 and c₂₂ = a2*b1 + a3*b3.
Compare these 10 standard 2 × 2 matrix products to see how order reversal (AB vs. BA), identity multiplication, inverse verification, matrix squaring, and geometric composition behave.
| Operation / Scenario | Matrix A (a, b, c, d) | Matrix B (e, f, g, h) | Product C = A · B Output | Algebraic / Geometric Note |
|---|---|---|---|---|
| Preloaded Baseline (A · B) | 1, 2, 3, 4 | 5, 6, 7, 8 | 19 22 / 43 50 | c₁₁ = 1(5)+2(7) = 19, c₂₂ = 3(6)+4(8) = 50 |
| Reversed Order (B · A) | 5, 6, 7, 8 | 1, 2, 3, 4 | 23 34 / 31 46 | Proves non-commutativity: A · B ≠ B · A |
| Identity Multiplication (A · I₂) | 1, 2, 3, 4 | 1, 0, 0, 1 | 1 2 / 3 4 | Multiplying by I₂ leaves every entry unchanged |
| Inverse Check (A · A⁻¹ = I₂) | 1, 2, 3, 4 | -2, 1, 1.5, -0.5 | 1 0 / 0 1 | Confirms [-2, 1; 1.5, -0.5] is the exact inverse |
| Matrix Square (A² = A · A) | 1, 2, 3, 4 | 1, 2, 3, 4 | 7 10 / 15 22 | Not equal to squaring entries (1, 4, 9, 16) |
| Two 90° Rotations (→ 180°) | 0, -1, 1, 0 | 0, -1, 1, 0 | -1 0 / 0 -1 | Composing two 90° turns yields -I₂ (180°) |
| Horizontal Shear × Scaling | 1, 2, 0, 1 | 3, 0, 0, 4 | 3 8 / 0 4 | Scales x by 3 and shears y by 2 × 4 = 8 |
| Fibonacci Q-Matrix Square (Q²) | 1, 1, 1, 0 | 1, 1, 1, 0 | 2 1 / 1 1 | Encodes [F₃, F₂; F₂, F₁] = [2, 1; 1, 1] |
| 2-Step Markov Transition (P²) | 0.8, 0.2, 0.3, 0.7 | 0.8, 0.2, 0.3, 0.7 | 0.7 0.3 / 0.45 0.55 | Row probabilities continue to sum to 1.0 |
| Non-Zero Matrices → Zero Matrix | 1, -1, 1, -1 | 1, 1, 1, 1 | 0 0 / 0 0 | Singular zero divisors can multiply to 0 |
Follow these three steps to enter both 2 × 2 matrices in row order, run the dot-product calculation, and export the result.
Paste four real numbers (a, b, c, d) into First 2 × 2 matrix, row order, separated by commas, spaces, or newlines. The first two numbers form row 1 and the last two form row 2. The box preloads 1, 2, 3, 4.
Fill Second 2 × 2 matrix, row order with the four entries of your right-hand multiplier (e, f, g, h), keeping every value finite and within ±1,000,000,000 (10⁹). The second box preloads 5, 6, 7, 8.
Click Calculate result to evaluate all four row-by-column dot products in your browser, then select Copy or Download (result.txt) to save the two-line output matrix.
Run these three examples in the workspace to verify row-by-column arithmetic, observe why order matters (AB ≠ BA), and check an inverse matrix.
With 1, 2, 3, 4 in the first box and 5, 6, 7, 8 in the second box, row 1 of A is (1, 2) and row 2 of A is (3, 4), while column 1 of B is (5, 7) and column 2 of B is (6, 8). Computing the four inner products gives c₁₁ = 1(5) + 2(7) = 19, c₁₂ = 1(6) + 2(8) = 22, c₂₁ = 3(5) + 4(7) = 43, and c₂₂ = 3(6) + 4(8) = 50, printed as '19 22' on line one and '43 50' on line two.
![Worked example 1 illustrating how [1, 2; 3, 4] multiplied by [5, 6; 7, 8] yields [19, 22; 43, 50].](/tools/assets/detail-illustrations/families/math/use-case-1-v1.webp)
Unlike scalar multiplication where 3 × 5 = 5 × 3, matrix multiplication is not commutative. Swap the two boxes so 5, 6, 7, 8 is the first matrix and 1, 2, 3, 4 is the second matrix. Now row 1 (5, 6) dots with column 1 (1, 3) to give 5(1) + 6(3) = 23, producing '23 34' on line one and '31 46' on line two. Even though AB ≠ BA, notice that the trace tr(AB) = 19 + 50 = 69 equals tr(BA) = 23 + 46 = 69.
![Worked example 2 comparing AB = [19, 22; 43, 50] against reversed BA = [23, 34; 31, 46] to demonstrate non-commutativity.](/tools/assets/detail-illustrations/families/math/use-case-2-v1.webp)
After finding A⁻¹ = [-2, 1; 1.5, -0.5] for A = [1, 2; 3, 4] in the Matrix Inverse Calculator, keep 1, 2, 3, 4 in the first box and paste -2, 1, 1.5, -0.5 into the second box. Selecting Calculate result evaluates 1(-2)+2(1.5) = 1, 1(1)+2(-0.5) = 0, 3(-2)+4(1.5) = 0, and 3(1)+4(-0.5) = 1, returning the 2 × 2 identity matrix '1 0' on line one and '0 1' on line two.
![Worked example 3 multiplying [1, 2; 3, 4] by its inverse [-2, 1; 1.5, -0.5] to obtain the identity matrix [1, 0; 0, 1].](/tools/assets/detail-illustrations/families/math/use-case-3-v1.webp)
The result panel displays your 2 × 2 product as two lines of space-separated numbers: line one contains c₁₁ and c₁₂, and line two contains c₂₁ and c₂₂.
Each output number is formatted up to 12 significant digits (toPrecision(12)), and IEEE 754 negative zero (-0) is converted to 0. Two algebraic invariants let you double-check any 2 × 2 product in seconds: the determinant product rule det(AB) = det(A)det(B) and the cyclic trace rule tr(AB) = tr(BA).
For the preloaded example, det(A) = 1(4) - 2(3) = -2 and det(B) = 5(8) - 6(7) = -2, so det(AB) must equal (-2)(-2) = 4. Checking the output [19, 22; 43, 50] in the Determinant Calculator confirms 19(50) - 22(43) = 950 - 946 = 4.

Review the four-entry parsing rules and numeric bounds enforced by the workspace before applying the product matrix to graphics shaders, Markov models, or coursework.
Both First 2 × 2 matrix, row order and Second 2 × 2 matrix, row order call matrix4(), which requires exactly 4 numeric tokens per box. Entering fewer or more than 4 values triggers 'Supply exactly four entries in 2 × 2 row order.' Separate numbers with commas, spaces, or line breaks; standard decimals (0.75), negative values (-1.5), and scientific notation (2.5e3) within ±1,000,000,000 are accepted, whereas fraction slashes (1/2) or brackets ([1, 2]) are rejected.
Chain your linear algebra calculations with our related tools: solve a 2 × 2 linear system Ax = b in the System of Equations Solver, or compute 3D vector inner and outer products in the Dot Product Calculator and Cross Product Calculator.


Use this matrix inverse calculator to find the inverse matrix of any nonsingular 2x2 array in row order using the 1/(ad-bc) adjugate formula in your browser.
Open tool
Use this determinant calculator to evaluate any 2x2 matrix in your browser with det(A) = ad - bc. Check invertibility, area scaling, and 10 worked examples.
Open tool
Use this free system of equations solver to solve two linear equations (ax + by = c, dx + ey = f) for x and y using Cramer's rule, elimination, and matrices.
Open toolChoose another tool for your next calculation, conversion, or text task.

Use this dot product calculator and vector dot product calculator to compute the scalar product of two 3D or 2D vectors (x·u + y·v + z·w) in your browser.
Open tool
Use this free cross product calculator to find the right-handed 3D vector product a × b = (yw - zv, zu - xw, xv - yu) for physics torque and surface normals.
Open tool
Use this free linear equation solver to solve a*x + b = c for x over the real numbers. Handles unique roots, no solution, and infinitely many solutions.
Open toolUse this free quadratic equation solver to solve ax² + bx + c = 0 for real, repeated, or complex roots (a ± bi) and discriminant Δ = b² − 4ac in one click.
Open toolAnswers about using Matrix Multiplication Calculator and understanding its results.
Write the first matrix on the left and the second matrix on the right. Multiply across each row of the first matrix and down each column of the second matrix: top-left is a11*b11 + a12*b21, top-right is a11*b12 + a12*b22, bottom-left is a21*b11 + a22*b21, and bottom-right is a21*b12 + a22*b22.
Matrix multiplication composes linear transformations in sequence, and row-by-column dot products pair the rows of the left matrix with the columns of the right matrix. When you swap A and B, you pair the rows of B with the columns of A instead, which produces different inner products unless the two matrices commute (such as diagonal matrices or A and its inverse A⁻¹).
In general linear algebra, an m × n matrix can multiply an r × p matrix if and only if the inner dimensions match (n = r), producing an m × p result. Because this browser tool is built specifically for 2 × 2 square matrices (4 entries per box), the inner dimensions (2 = 2) always match and the product is always 2 × 2.
Paste the exact same four row-order numbers into both First 2 × 2 matrix, row order and Second 2 × 2 matrix, row order, then click Calculate result. Remember that A² = A · A uses row-by-column dot products, not squaring the four entries individually.
For 3 × 3 or larger matrices, use the array formula =MMULT(array1, array2) in Excel or Google Sheets, or enter the matrices into [A] and [B] under the [MATRIX] menu on a TI-84 calculator and evaluate [A]*[B] on the home screen.
Choose another tool for your next calculation, conversion, or text task.