Matrix Calculator
Perform operations on custom matrices up to 5x5, including transposes, determinants, inverses, and scalars.
Operation
Matrix A Size
×
Matrix B Size
×
Matrix A (3 × 3)
Matrix B (3 × 3)
Calculation Output
223
024
561
Step-by-Step Matrix Arithmetic
Step 1: Add corresponding elements of A and B:
Result[0,0] = 1 + 1 = 2
Dimension Verification
Matrix A:3 × 3
Matrix B:3 × 3
Understanding Matrix Algebra
Matrices compose linear equation networks. Matrix multiplication requires matching inner dimensions: the columns of A must match the rows of B.
Inverting matrices divides transposed cofactor (adjugate) values by the determinant. If determinants resolve to zero, the matrix is singular and cannot be inverted.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Multiplying two matrices without doing it by hand.
- Finding a determinant or an inverse for a linear algebra problem.
- Transposing a matrix so its dimensions line up for a multiplication.
- Solving a small linear system by inverting its coefficient matrix.
- Checking whether a transformation matrix is invertible before relying on it.
Frequently Asked Questions
- Why is matrix multiplication not commutative?
- Because it composes transformations, and order matters in the real world: rotating then scaling is not the same as scaling then rotating. AB and BA are usually different matrices, and for non-square shapes only one of the two products even exists.
- What does the determinant tell me?
- How the transformation scales area (2D) or volume (3D), and its sign says whether orientation is flipped. A determinant of zero means the transformation collapses space onto a lower dimension — and that is exactly when no inverse exists.
- When can a matrix not be inverted?
- When it is singular — determinant zero — or not square. Numerically there is a middle ground that bites harder: a matrix with a very small determinant is invertible in theory and unstable in practice, so tiny input errors produce enormous output errors.
- What does transposing do?
- Reflects across the main diagonal, turning rows into columns. It is how a row vector becomes a column vector, and it appears throughout linear algebra — (AB)ᵀ = BᵀAᵀ, note the reversal, which is the identity people most often get backwards.
- Which dimensions can be multiplied?
- The inner ones must match: an m×n times an n×p gives an m×p. If they do not agree, the product is undefined — no padding, no broadcasting. Checking that pair before anything else resolves most "why is this an error" moments.
- Why does matrix multiplication not commute?
- Because it composes transformations, and order matters — rotating then scaling is not scaling then rotating. That is a property of the operations themselves, not a limitation of the notation.
Common errors and gotchas
- Multiplying in the wrong order, since matrix multiplication is not commutative.
- Expecting an inverse when the determinant is zero, which is exactly when there is none.
- Mismatching dimensions, where the inner dimensions must agree for multiplication.
- Confusing element-wise multiplication with matrix multiplication.
- Trusting a computed inverse of a near-singular matrix, which is numerically unstable.
Related Calculators tools
Percentage Calculator
Solve percentage, increase, and change calculations.
Age Calculator
Calculate exact age in years, months, and days.
Unix Timestamp Converter
Convert Unix epoch timestamps to and from human dates.
Tip Calculator
Calculate tip and split the bill between people.
Aspect Ratio Calculator
Solve width or height for a target aspect ratio.
Temperature Converter
Convert between Celsius, Fahrenheit, and Kelvin.
Data Storage Converter
Convert between bytes, KB, MB, GB, TB, and more.
Discount Calculator
Calculate sale price and savings from a discount.