Ihsabha
AREN
IhsabhaMathematics › Matrix Calculator

▦ Matrix Calculator

Add, subtract, multiply, transpose, or find the determinant and inverse of 2×2 or 3×3 matrices.

📖 Standard Matrix Algebra (Cofactor Expansion)
🛡️ Reviewed by: Ihsabha editorial team · Method: Linear algebra for matrices (cofactor expansion method) and the exponential decay equation (half-life) · Last updated: August 2, 2026

Matrix A

Matrix B

How to use this tool

Fill in the fields on the left with your information, then press Calculate to see your result instantly. No sign-up required, and no data is sent anywhere — everything is calculated right in your browser.

About this calculator

The matrix calculator combines the most important algebraic operations on matrices in one tool, for square matrices of size 2×2 or 3×3. Addition and subtraction are done by adding or subtracting corresponding elements in the two matrices directly. Multiplication uses the "row by column" rule: each element in the resulting matrix equals the product of a row from the first matrix and a column from the second matrix, with the results summed. The determinant is a single number that summarizes important properties of the matrix, calculated with a direct formula for 2×2 matrices, and using "cofactor expansion" for 3×3 matrices. The inverse is the matrix that, when multiplied by the original matrix, produces the identity matrix, and it's calculated only if the determinant doesn't equal zero. The transpose flips the matrix by swapping its rows with its columns. Matrices are widely used in 3D graphics, solving linear systems, and artificial intelligence. A determinant of exactly zero signals a matrix with no inverse at all, a case known as a "singular" matrix, which corresponds to a linear transformation that collapses space into a lower dimension.

Matrix Multiplication Is Not What Most People Expect

Matrix addition and subtraction behave exactly as intuition suggests — combine corresponding elements directly, position by position, no surprises. Matrix multiplication, by contrast, is where most people's initial intuition goes wrong, since it is not simply multiplying corresponding elements together the way addition works.

Matrix multiplication instead follows a 'row by column' rule: each element of the result comes from taking an entire row of the first matrix, an entire column of the second matrix, multiplying corresponding entries together, and summing those products into a single number. This process is repeated for every row-column combination to build the complete result matrix. One consequence of this rule that frequently surprises students: matrix multiplication is not commutative — multiplying matrix A by matrix B generally gives a completely different result than multiplying B by A, unlike ordinary number multiplication where order never matters.

The determinant condenses an entire matrix down into a single revealing number. For a 2×2 matrix, it is calculated directly as ad−bc from the matrix [[a,b],[c,d]] — the product of the main diagonal minus the product of the other diagonal. For a 3×3 matrix, the calculation extends through 'cofactor expansion', which breaks the larger determinant down into a combination of smaller 2×2 determinants, reusing the same basic formula recursively.

A matrix's inverse exists only when its determinant is nonzero — a matrix with a zero determinant is called 'singular' and has no inverse at all, mirroring how division by zero is undefined for ordinary numbers. Geometrically, a singular matrix represents a transformation that collapses space into a lower dimension (squashing a plane down into a line, for instance), an operation that cannot meaningfully be undone, which is exactly why no inverse can exist for it.

Matrices are foundational well beyond pure linear algebra homework: solving systems of multiple linear equations simultaneously is most efficiently expressed and solved in matrix form; every 3D graphics engine and video game uses matrices constantly to rotate, scale, and reposition objects in a virtual scene; and modern machine learning and artificial intelligence systems represent both data and the learned parameters of a model as matrices, with matrix multiplication forming the core computational operation performed billions of times during training.

Frequently asked questions

What does it mean if a matrix has no inverse?

It means the matrix is 'singular' — its determinant equals zero, so there's no matrix that can multiply with it to produce the identity matrix.

Why does matrix multiplication use 'row times column'?

That's the defining rule of matrix multiplication: each entry in the result comes from multiplying corresponding elements of a row and a column, then summing them.

Can I multiply a 2×2 matrix with a 3×3 matrix?

No, this calculator requires both matrices to share the same size, since regular matrix addition, subtraction, and multiplication all need compatible dimensions.