Matrix Calculator
Free matrix calculator. Multiply matrices, find determinants, inverses, transpose, RREF, rank, and eigenvalues for 2×2, 3×3, and 4×4 matrices.
Matrix Properties
Derived properties of the result
What Is a Matrix?
Understanding matrices and why they're fundamental to linear algebra
A matrix is a rectangular grid of numbers arranged in rows and columns. Matrices are the core data structure of linear algebra — they represent transformations, encode systems of equations, and describe relationships between variables in machine learning, physics, and engineering.
This matrix calculator handles nine operations on 2×2, 3×3, and 4×4 square matrices. Binary operations (multiply, add, subtract) use both Matrix A and Matrix B; all other operations work on Matrix A alone. Results update as you type — no button needed.
Key Matrix Formulas
Determinant, inverse, eigenvalue, and multiplication formulas with variable definitions
Given A = [[3, 1], [2, 4]]:
Verify: A × A⁻¹ = [[3(0.4)+1(−0.2), 3(−0.1)+1(0.3)], [2(0.4)+4(−0.2), 2(−0.1)+4(0.3)]] = [[1, 0], [0, 1]] = I ✓
Matrix Operations Explained
What each operation does and when to use it
Each cell (i,j) = dot product of row i from A and column j from B. A×B ≠ B×A in general.
Element-wise addition. Matrices must be the same size. (A+B)[i][j] = A[i][j] + B[i][j].
Element-wise subtraction. Matrices must be the same size. (A−B)[i][j] = A[i][j] − B[i][j].
Scalar encoding how A scales space. Zero = singular (no inverse). Computed via cofactor expansion.
Matrix where A × A⁻¹ = I. Only exists when det(A) ≠ 0. Uses Gauss-Jordan elimination.
Swap rows and columns: Aᵀ[i][j] = A[j][i]. Useful in dot products and symmetric matrices.
Standardized form with leading 1s in each pivot row. Used to solve Ax = b systems.
Number of linearly independent rows. Equals the number of non-zero rows in RREF.
Scalars λ where Av = λv for non-zero v. Supported for 2×2 (quadratic) and 3×3 (Cardano).
Solving Real Problems with Matrices
Practical tips for equations, eigenvalues, and matrix powers
Solving Ax = b
To solve a square system, first check det(A) ≠ 0. If it is invertible, use A⁻¹ — the solution is x = A⁻¹b. Alternatively, apply RREF to A to confirm full rank (rank = N means a unique solution exists).
Check invertibility first
Run det(A) before computing A⁻¹. If det = 0, the inverse doesn't exist and you'll get an error.
Complex eigenvalues
If eigenvalues have an imaginary part (shown as ± xi), the matrix represents oscillatory or rotational behaviour in a dynamic system.
Matrix power
To compute A² or A³, multiply A × A successively. Eigenvalues of Aⁿ are the eigenvalues of A raised to the nth power.
Clear and Identity presets
Use the Clear button to zero out a matrix and Identity to reset it to I. Useful as a starting point for constructing custom matrices.
Common Matrix Mistakes
Pitfalls to avoid when calculating with matrices
Matrix Size Reference
Properties by matrix dimension
| Property | 2×2 | 3×3 | 4×4 |
|---|---|---|---|
| Elements | 4 | 9 | 16 |
| Max rank | 2 | 3 | 4 |
| Eigenvalues | Quadratic | Cubic | Not supported |
| Det method | ad−bc | Cofactor | Cofactor |
| Inverse method | Adjugate | Gauss-Jordan | |
Why stop at 4×4? Larger matrices require numerical algorithms (LU decomposition, QR iteration) that are better served by libraries like NumPy or MATLAB. This calculator uses floating-point arithmetic with cofactor expansion, Gauss-Jordan elimination, and Cardano's cubic formula for the supported sizes.
Frequently Asked Questions
Common questions and detailed answers
Embed Matrix Calculator
Add this calculator to your website or blog for free.
You Might Also Like
Related calculators from other categories
Last updated Apr 2, 2026