Matrix Calculator
Calculate the determinant, transpose, and inverse of any 2×2 or 3×3 matrix. Shows step-by-step working for each operation.
Enter your values above to see the results.
Tips & Notes
- ✓Matrix multiplication: A×B ≠ B×A in general. Order matters — always check dimensions.
- ✓Dimensions check: (m×n) × (n×p) = (m×p). Inner dimensions must match.
- ✓det=0 means the matrix is singular — no inverse exists and the system has no unique solution.
- ✓Identity matrix I: A×I = I×A = A. Like multiplying by 1 in regular arithmetic.
- ✓Transpose: swap rows and columns. (Aᵀ)ᵀ = A. (AB)ᵀ = BᵀAᵀ (order reverses).
Common Mistakes
- ✗Multiplying matrices with incompatible dimensions. A(3×2) × B(3×2) is impossible — inner dims must match.
- ✗Assuming A×B = B×A. Matrix multiplication is generally NOT commutative.
- ✗Adding matrices of different dimensions — only same-size matrices can be added.
- ✗Forgetting to divide by the determinant when computing inverse: (1/det) multiplies the adjugate.
- ✗Row × column order in multiplication: element (i,j) = dot product of row i of A with column j of B.
Matrix Calculator Overview
A matrix is a rectangular array of numbers organized into rows and columns. Matrices are the language of linear transformations — every rotation, reflection, scaling, and projection in geometry is a matrix operation. In data science, a dataset of m observations with n features is an m×n matrix. Neural networks perform layer computations entirely through matrix multiplication. Google's original PageRank algorithm was a matrix eigenvalue problem. Any system of linear equations can be written as a single matrix equation Ax = b.
Matrix addition and subtraction — add corresponding elements (matrices must have identical dimensions):
EX: [[1,2],[3,4]] + [[5,6],[7,8]] = [[1+5, 2+6],[3+7, 4+8]] = [[6,8],[10,12]]Matrix multiplication — row of first matrix dotted with column of second matrix:
EX: [[2,1],[3,4]] × [[5,6],[7,8]] → (2×5+1×7)=17, (2×6+1×8)=20, (3×5+4×7)=43, (3×6+4×8)=50 → [[17,20],[43,50]]Matrix multiplication requires inner dimensions to match: (m×n) × (n×p) = (m×p). Unlike scalar multiplication, AB ≠ BA in general — order always matters. Determinant of a 2×2 matrix — a scalar value encoding area scaling and invertibility:
det[[a,b],[c,d]] = ad − bc
EX: det[[3,2],[1,4]] = 3×4 − 2×1 = 12 − 2 = 10 (nonzero → matrix is invertible)Matrix inverse — only exists when det ≠ 0:
[[a,b],[c,d]]⁻¹ = (1/det) × [[d,−b],[−c,a]]
EX: [[3,2],[1,4]]⁻¹ = (1/10) × [[4,−2],[−1,3]] = [[0.4,−0.2],[−0.1,0.3]] | verify: original × inverse = identity [[1,0],[0,1]] ✓Solving systems of equations with matrices: write Ax=b, then x = A⁻¹b. For the system 3x+2y=8 and x+4y=6: form the matrix equation, invert A, multiply by b. Transpose — swap rows and columns: element (i,j) moves to (j,i). The transpose of an m×n matrix is n×m. A symmetric matrix satisfies Aᵀ = A (common in statistics: covariance matrices are always symmetric). Real-world applications: 3D computer graphics use 4×4 transformation matrices to rotate, scale, and translate every object in a scene. Each frame rendered by a game engine performs millions of matrix multiplications. Principal Component Analysis in data science finds the eigenvectors of a covariance matrix to reduce dimensionality while preserving variance. The power of matrix notation lies in encoding entire systems of relationships into a single object. A 4×4 transformation matrix in 3D graphics simultaneously encodes rotation, scaling, and translation — allowing a rendering engine to move an object with a single multiplication rather than three separate operations.