A 2x2 matrix calculator for students and anyone working through introductory linear algebra. Enter the four numbers of one or two two-by-two matrices and add, subtract or multiply them, or find the determinant and inverse of a single matrix — all instantly and in your browser.
How it works
Writing a matrix as [a b; c d], the five operations are:
- Add / subtract — element by element:
[a₁±a₂ b₁±b₂; c₁±c₂ d₁±d₂]. - Multiply — row-by-column dot products.
A × B = [ae+bg, af+bh; ce+dg, cf+dh], where B =[e f; g h]. - Determinant —
det = ad − bc, a single number. - Inverse —
1 ÷ (ad − bc) × [d −b; −c a]. If the determinant is zero the matrix is singular and has no inverse; the tool reports this instead of dividing by zero.
Example
For A = [1 2; 3 4]:
- Determinant =
(1×4) − (2×3) = 4 − 6 = −2. - Inverse =
1/(−2) × [4 −2; −3 1] = [−2 1; 1.5 −0.5].
Multiplying A by B = [5 6; 7 8]:
[1×5+2×7, 1×6+2×8; 3×5+4×7, 3×6+4×8] = [19 22; 43 50].
| Operation | Formula |
|---|---|
| Determinant | ad − bc |
| Inverse | 1/(ad−bc) × [d −b; −c a] |
| Multiply (A×B) | [ae+bg, af+bh; ce+dg, cf+dh] |
Nothing is uploaded — all the matrix algebra happens locally on your device.