Math Tools
Matrix Calculator
Perform operations on 2×2 matrices: addition, subtraction, multiplication, determinant, inverse, and transpose.
Matrix A
Matrix B
Result Matrix
Math Tools
Perform operations on 2×2 matrices: addition, subtraction, multiplication, determinant, inverse, and transpose.
Matrix A
Matrix B
Result Matrix
A matrix is a rectangular grid of numbers arranged in rows and columns. A 2×2 matrix has 2 rows and 2 columns. Matrix operations are used in linear algebra, computer graphics, physics, and engineering. Common operations include addition, subtraction, multiplication, finding the determinant (a scalar value that tells you if a matrix is invertible), computing the inverse (the matrix equivalent of division), and transposing (flipping rows and columns).
Enter all 4 elements of Matrix A and all 4 elements of Matrix B. Select your operation from the dropdown. The calculator instantly performs the computation—whether adding/subtracting element-wise, multiplying according to the row-by-column rule, computing the determinant (ad − bc), finding the inverse (if the determinant is non-zero), or transposing (swapping rows with columns).
For a 2×2 matrix [[a, b], [c, d]]: Determinant = ad − bc. Inverse = (1 / det) × [[d, −b], [−c, a]]. Transpose swaps rows and columns.Determinant is calculated as (top-left × bottom-right) − (top-right × bottom-left). Inverse exists only if determinant is non-zero; multiply each element by 1/determinant and swap diagonal elements (with sign changes on off-diagonals). Transpose simply flips the matrix along the main diagonal.
| Input | Result | Notes |
|---|---|---|
| A = [[1, 2], [3, 4]], B = [[5, 6], [7, 8]], multiply | [[19, 22], [43, 50]] | (1×5 + 2×7) = 19, (1×6 + 2×8) = 22, etc. |
| A = [[2, 0], [0, 2]], determinant | 4 | (2 × 2) − (0 × 0) = 4 |
| A = [[4, 7], [2, 6]], inverse | [[0.6, −0.7], [−0.2, 0.4]] | Determinant = 24 − 14 = 10, then multiply [[6, −7], [−2, 4]] by 1/10 |
The determinant is a single number that encodes information about a matrix. If det = 0, the matrix is singular (non-invertible) and cannot be used to solve certain systems. If det ≠ 0, the matrix is invertible and reversible.
Matrix multiplication is used in computer graphics (transformations), physics (linear systems), machine learning (neural networks), and anywhere linear relationships need to be composed or chained together.
The transpose flips a matrix along its main diagonal (swaps rows and columns). It's used in data layout conversions, computing correlations, and solving optimization problems.
This calculator is designed for 2×2 matrices. For larger matrices, you would need a more advanced tool or linear algebra software like NumPy or MATLAB.
Matrices with very small (near-zero) determinants are called ill-conditioned and are numerically unstable. The inverse may have large errors. This tool alerts you when the determinant is too close to zero to safely invert.
Yes. This is a client-side tool—all calculations happen in your browser. Your matrices are never sent to a server, so they remain completely private.