Fill in the matrix elements, select the operation and the solving method, and click Calculate. The full solution appears step by step below.
Matrix Calculator
Matrix A:
Matrix B (A+B, A−B, A×B):
How to use
- Choose the size (2×2, 3×3 or 4×4) — the grids adjust automatically.
- Fill in the elements of A (and B or vector b depending on the selected operation).
- Choose the operation and, when available, the solving method.
- Click Calculate — the result and solution appear step by step.
Operations and available methods
| Operation | Methods |
|---|---|
| Determinant | Cofactors, Gaussian Elimination, Sarrus Rule (3×3) |
| Trace (tr A) | Sum of the diagonal |
| Transpose | — |
| Inverse | Gauss-Jordan [A|I], Adjugate Matrix |
| Upper Triangular | Gaussian Elimination with partial pivoting |
| LU Decomposition | Doolittle (L with 1s on diagonal) |
| A², k·A, A+B, A−B, A×B | — |
| Linear system Ax = b | Gauss, Gauss-Jordan, Cramer Rule |
Frequently asked questions
What is LU Decomposition?
LU Decomposition factorises A into L × U: L is lower triangular with 1s on the diagonal (Doolittle Method) and U is upper triangular. It is the foundation of efficient algorithms for solving linear systems and computing determinants in scientific computing.
What is the difference between Gauss and Gauss-Jordan for systems?
Gauss reduces to upper triangular form and uses back substitution. Gauss-Jordan goes further, eliminating above and below the pivot to reach [I|x] — the solution is read directly from the last column, with no extra step.
When can Cramer's Rule not be applied?
Cramer's Rule requires det(A) ≠ 0. If det(A) = 0 the system is singular (no unique solution). Use Gauss or Gauss-Jordan to check for infinite solutions or inconsistency.
What is the trace of a matrix?
The trace (tr A) is the sum of the main diagonal elements. It equals the sum of the eigenvalues and appears in quantum physics, differential geometry and matrix optimisation.
Does Sarrus Rule work for 4×4?
No. Sarrus's Rule is exclusive to 3×3 matrices. For larger dimensions use cofactors or Gaussian elimination, both available in the calculator.
See also…
