Matrix Operations Calculator
Perform addition, subtraction, multiplication, determinant, transpose, and inverse operations on 2x2 and 3x3 matrices.
Matrix Operations Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: Det 2x2: ad-bc | Det 3x3: cofactor expansion | Inverse: adj(A)/det(A)
Worked example — det(A) = -2
Formula
Det 2x2: ad-bc | Det 3x3: cofactor expansion | Inverse: adj(A)/det(A)
Matrix operations on 2x2 and 3x3 matrices. Determinant: ad-bc for 2x2, Sarrus/cofactor for 3x3. Inverse exists only if det ≠ 0. Multiplication: (AB)ᵢⱼ = Σ aᵢₖ × bₖⱼ.
Worked Examples
Example 1: 2x2 determinant
Problem:A = [[1,2],[3,4]]
Solution:det = 1×4 - 2×3 = -2
Result:det(A) = -2
Example 2: 2x2 matrix multiplication
Problem:A = [[1,2],[3,4]], B = [[5,6],[7,8]], find A × B
Solution:Row 1: (1×5+2×7, 1×6+2×8) = (19, 22). Row 2: (3×5+4×7, 3×6+4×8) = (43, 50).
Result:A × B = [[19,22],[43,50]]
Frequently Asked Questions
When is a matrix invertible?
A square matrix is invertible if and only if its determinant is non-zero. Equivalently, all rows/columns are linearly independent. Singular matrices (det=0) have no inverse.
How do I enter a matrix?
Use commas for columns and semicolons for rows. Example: "1,2;3,4" represents [[1,2],[3,4]]. For 3x3: "1,2,3;4,5,6;7,8,9".
Is matrix multiplication commutative? Does A × B = B × A?
No, matrix multiplication is generally not commutative. A × B and B × A usually produce different results, and sometimes only one order is even defined (if the matrices have incompatible dimensions). Matrix multiplication is, however, associative: (A × B) × C = A × (B × C). This non-commutativity is fundamental in quantum mechanics and computer graphics.
What are real-world uses of matrix operations?
Matrices are used everywhere: computer graphics (rotation, scaling, translation in 3D), machine learning (neural network weight matrices), cryptography (Hill cipher uses matrix multiplication), physics (quantum state transformations), economics (Leontief input-output models), and network analysis. Every 3D game engine uses matrix multiplication thousands of times per frame.
What conditions must be met for two matrices to be added, subtracted, or multiplied?
Addition and subtraction require both matrices to have identical dimensions (same number of rows and columns), since the operation combines corresponding entries. Multiplication A × B instead requires the number of columns in A to equal the number of rows in B — the resulting matrix takes its row count from A and column count from B. Two matrices of otherwise mismatched sizes simply cannot be combined with these operations.
How do I interpret a negative or fractional determinant?
A negative determinant indicates the linear transformation represented by the matrix reverses orientation (flips the plane or space, like a mirror reflection) in addition to scaling area/volume by the absolute value of the determinant. A fractional determinant (between -1 and 1, excluding 0) means the transformation shrinks areas or volumes; a determinant with |det| > 1 means it expands them.
Why does computing the inverse require the determinant to be nonzero?
The inverse formula A⁻¹ = adj(A)/det(A) explicitly divides by the determinant, so a zero determinant would require dividing by zero — undefined. Geometrically, a zero determinant means the matrix collapses space into a lower dimension (for example, projecting a 2D plane onto a single line), which destroys information and cannot be reversed, so no inverse can exist.
What is the transpose of a matrix and when is it useful?
The transpose A-transpose swaps rows and columns, so the entry at row i, column j moves to row j, column i. It reverses the order of products, (AB)-transpose = B-transpose A-transpose, and leaves the determinant unchanged. It appears whenever you need a dot product written as a matrix product, in least-squares normal equations, and in identifying symmetric matrices, which satisfy A = A-transpose.
What is the identity matrix and how does it behave in matrix multiplication?
The identity matrix I has ones on the main diagonal and zeros elsewhere. It is the multiplicative identity: I times A equals A and A times I equals A for any conformable A, which makes it the matrix analogue of the number 1. It also defines the inverse — A-inverse is precisely the matrix satisfying A times A-inverse = I — so inversion routines check their answer by multiplying back and comparing to I.
Which method should I use to solve a linear system: matrix inversion or elimination?
Computing A-inverse and multiplying by b is convenient on paper for 2x2 systems, but it does more arithmetic than necessary and amplifies rounding error. Gaussian elimination, or an LU decomposition reused across several right-hand sides, solves Ax = b faster and more stably. Reserve explicit inversion for cases where you genuinely need the inverse matrix itself, such as covariance analysis, rather than just one solution vector.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator · Editorial policy
Related Calculators
🧮Matrix Exponential Calculator
Calculate matrix exponential with inputs, formulas, and instant results.
🧮Matrix Addition and Subtraction Calculator
Calculate matrix addition and subtraction with inputs, formulas, and instant results.
🧮Matrix by Scalar Calculator
Calculate matrix by scalar with inputs, formulas, and instant results.
🧮Matrix Determinant Calculator
Calculate matrix determinant with inputs, formulas, and instant results.
🧮Matrix Multiplication Calculator
Calculate matrix multiplication with inputs, formulas, and instant results.
🧮Matrix Norm Calculator
Calculate matrix norm with inputs, formulas, and instant results.
🧮Matrix Power Calculator
Calculate matrix power with inputs, formulas, and instant results.
🧮Matrix Rank Calculator
Calculate matrix rank with inputs, formulas, and instant results.