What Is a Matrix?
A matrix is a rectangular array of numbers arranged in rows and columns. Matrices are used throughout linear algebra, computer graphics, statistics, physics, and engineering.
How to Use the Matrix Calculator
- Choose an operation (addition, multiplication, inverse, and more).
- Set the number of rows and columns for Matrix A (and Matrix B when needed).
- Enter values in each cell. Arrow keys move between adjacent cells.
- View the live result, dimensions, and calculation steps.
Matrix Multiplication
If A is m × n and B is n × p, then AB is m × p. The columns of A must match the rows of B. Each entry of the product is a dot product of a row of A with a column of B.
Matrix multiplication is not commutative in general: AB ≠ BA.
Matrix Addition and Subtraction
Addition and subtraction require identical dimensions. Each result entry is the sum or difference of the corresponding entries.
Matrix Inverse
Only square matrices can have an inverse. A is invertible when det(A) ≠ 0. Then A × A⁻¹ = A⁻¹ × A = I, the identity matrix. Singular matrices (determinant zero) have no inverse.
How to Find the Determinant
For a 2×2 matrix [[a,b],[c,d]], det = ad − bc. Larger matrices use Gaussian elimination with partial pivoting for numerical stability.
Matrix Transpose
The transpose Aᵀ swaps rows and columns: (Aᵀ)ᵢⱼ = Aⱼᵢ. An m×n matrix becomes n×m.
Matrix Rank
Rank is the number of linearly independent rows (or columns), equal to the number of nonzero pivot rows after row reduction. Rank applies to rectangular matrices as well as square ones.
3 × 3 Matrix Inverse
Enter any invertible 3×3 matrix, choose Matrix Inverse, and review the determinant, inverse, and verification that A × A⁻¹ ≈ I.
4 × 4 Matrix Calculator
All operations support up to 10×10 matrices, including full 4×4 addition, multiplication, determinant, inverse, transpose, trace, and rank.
Common Matrix Calculator Mistakes
- Multiplying matrices with incompatible dimensions (columns of A ≠ rows of B).
- Adding matrices of different sizes.
- Trying to invert a singular matrix.
- Confusing transpose with inverse.
- Assuming matrix multiplication is commutative.