🔢Matrix Calculator
Full matrix calculator with two editable matrices up to 6×6. Add, subtract, multiply matrices, find determinants, inverses, transposes, and powers with step-by-step results.
Prefer to skip the form? Scroll down and Ask AI Instead. Just describe your situation and let AI handle the math for you in seconds.
Advertisement
728 × 90
✦ Ask AI Instead
Matrix Calculator: Multiply, Add, Determinant, and Inverse
This matrix calculator handles all standard matrix operations in one place: add two matrices, subtract, multiply, find the determinant, compute the inverse, and transpose any matrix. Enter values directly into the editable grid, resize matrices up to 6×6, and use helper buttons (Clear, Random, All 0, All 1) to set up your inputs quickly. The result is displayed as a formatted matrix grid you can copy directly into Matrix A or Matrix B for chained operations.
How to Multiply Two Matrices
Matrix multiplication (AB) is only valid when the number of columns in A equals the number of rows in B. If A is m×n and B is n×p, then AB is m×p. Each entry (AB)ᵢⱼ is the dot product of row i of A with column j of B: (AB)ᵢⱼ = Σₖ Aᵢₖ Bₖⱼ. Note that matrix multiplication is not commutative: AB ≠ BA in general.
How to Calculate the Determinant
For a 2×2 matrix [[a,b],[c,d]], det = ad − bc. For a 3×3 matrix, use cofactor expansion along the first row: det = a₁₁×M₁₁ − a₁₂×M₁₂ + a₁₃×M₁₃, where each M is the 2×2 minor. For larger matrices, the calculator applies recursive cofactor expansion. A non-zero determinant means the matrix is invertible.
Matrix Inverse
A square matrix A has an inverse A⁻¹ if and only if det(A) ≠ 0. For 2×2: A⁻¹ = (1/det) × [[d, −b],[−c, a]]. For larger matrices, the inverse is computed as the adjugate (transposed cofactor matrix) divided by the determinant. The inverse satisfies AA⁻¹ = A⁻¹A = I (identity matrix).
Transpose
The transpose Aᵀ is formed by reflecting the matrix over its main diagonal — rows become columns and columns become rows. If A is m×n, then Aᵀ is n×m, with (Aᵀ)ᵢⱼ = Aⱼᵢ. Symmetric matrices satisfy A = Aᵀ. The transpose appears in projections, least squares solutions, and covariance matrices in statistics.
Frequently Asked Questions
What is matrix multiplication?
Matrix multiplication combines two matrices A (m×n) and B (n×p) to produce C (m×p), where each entry Cᵢⱼ is the dot product of the i-th row of A and the j-th column of B. The number of columns in A must equal the number of rows in B. Matrix multiplication is associative but not commutative — AB ≠ BA in general.
How do I find the determinant of a 3×3 matrix?
Expand along the first row using the cofactor formula: det = a₁₁(a₂₂a₃₃ − a₂₃a₃₂) − a₁₂(a₂₁a₃₃ − a₂₃a₃₁) + a₁₃(a₂₁a₃₂ − a₂₂a₃₁). Each term in parentheses is the 2×2 determinant of the submatrix formed by removing the first row and the column of the element being expanded. The signs alternate +, −, +.
When does a matrix have no inverse?
A matrix has no inverse when its determinant equals zero — it is then called singular or non-invertible. This happens when the rows (or columns) are linearly dependent, meaning at least one row is a linear combination of the others. A singular matrix collapses space into a lower dimension, so its transformation cannot be reversed.
What is the transpose of a matrix?
The transpose Aᵀ is formed by swapping rows and columns: the entry in row i, column j of A moves to row j, column i of Aᵀ. A 3×2 matrix becomes a 2×3 matrix after transposing. Symmetric matrices equal their own transpose. The transpose is used in computing matrix inverses, orthogonal decompositions, and solving least squares problems.