Free matrix calculator
Perform 2×2 matrix operations including determinant, multiplication, and inverse — enter matrix values to see the result, updated live, as you type.
On this page10 sections
2×2 matrix operations. det(M) = ad − bc.
Results are estimates. Consult a professional.
How the matrix calculator works
A matrix is a rectangular array of numbers arranged in rows and columns. This calculator performs the core operations on 2×2 and larger matrices: addition, subtraction, multiplication, determinant, transpose, and inverse. Each operation follows strict linear algebra rules — matrix multiplication, for example, is not commutative (A×B ≠ B×A).
Worked example: determinant and inverse of a 2×2 matrix
Find the determinant and inverse of matrix A = [[3, 7], [1, −4]].
Common matrix operations and their rules
Use this reference to identify which operations are valid for your matrix dimensions and what each operation produces.
| Operation | Requirement | Result size |
|---|---|---|
| Addition (A + B) | A and B same size (m×n) | m×n matrix |
| Subtraction (A − B) | A and B same size (m×n) | m×n matrix |
| Scalar multiply (kA) | Any matrix | Same size as A |
| Multiply (A × B) | Cols of A = rows of B (m×n and n×p) | m×p matrix |
| Transpose (Aᵀ) | Any matrix (m×n) | n×m matrix |
| Determinant | Square matrix only (n×n) | Single scalar |
| Inverse (A⁻¹) | Square and det ≠ 0 | n×n matrix |
Source: standard linear algebra conventions. Matrix multiplication requires inner dimensions to match.
Tips for working with matrices
Matrix operations appear across engineering, economics, computer graphics, and data science. These tips help you avoid common errors.
- Check dimensions before multiplying — A (m×n) times B (n×p) works; A (m×n) times B (p×n) does not. The inner dimensions must match.
- AB ≠ BA in general — matrix multiplication is not commutative; swapping the order of matrices usually gives a different result.
- Check the determinant first — before computing an inverse, verify det ≠ 0. A zero determinant means the matrix is singular and has no inverse.
- Use the inverse to solve linear systems — if Ax = b, then x = A⁻¹b. For large systems, this is less efficient than row reduction (Gaussian elimination), but conceptually clear.
- Transpose swaps rows and columns — useful in statistics (covariance matrices), physics (rotation transforms), and machine learning (weight matrices in neural networks).
Accuracy and limitations
Calculations are performed using floating-point arithmetic, which introduces rounding errors for irrational or repeating decimals. For very large matrices or ill-conditioned systems (where det is very close to zero), numerical errors can accumulate significantly. Near-singular matrices (|det| close to 0) may produce unstable inverses — small changes in entries produce large changes in the result. For high-precision work or large systems, dedicated linear algebra libraries (LAPACK, NumPy) using stable algorithms such as LU decomposition are recommended.
Key terms
About this calculator
Part of our math calculators suite — explore all calculators.