How to enter a matrix
Type each row as numbers separated by spaces or commas, and separate rows with semicolons. 1 2; 3 4 is the 2×2 matrix with 1, 2 on top and 3, 4 below. 2 0 1; 1 3 2; 1 1 1 is a 3×3 matrix.
The formulas
2×2 determinant: det [a b; c d] = ad − bc
2×2 inverse: (1 ÷ det) × [d −b; −c a]
Product: (AB)ij = Σ Aik × Bkj
Larger determinants use cofactor expansion along the first row, and larger inverses use Gauss-Jordan elimination.
Example
For A = [1 2; 3 4], det(A) = 1×4 − 2×3 = −2, and A⁻¹ = (1 ÷ −2) × [4 −2; −3 1] = [−2 1; 1.5 −0.5]. With B = [5 6; 7 8], A × B = [1×5+2×7, 1×6+2×8; 3×5+4×7, 3×6+4×8] = [19 22; 43 50].
Tips
- Matrix multiplication isn't commutative: A × B is usually different from B × A.
- A matrix with determinant 0 has no inverse.
- Working with fractions in your matrix? Simplify them with the fraction calculator.
Frequently asked questions
When can two matrices be multiplied?
When the number of columns in A equals the number of rows in B. A 2×3 times a 3×2 gives a 2×2.
Why does my matrix have no inverse?
Its determinant is 0 (it's singular), which means its rows are not independent.
What size matrices does this handle?
Any size you can type. Determinant and inverse need a square matrix.
Written and checked by Vijay. Last updated .