HomeMath › Matrix

Matrix Calculator

Matrix A

Matrix B

Result
Show the math
Enter values to see the worked formula.

What Your Result Means

How This Calculator Works

You choose a matrix size (2×2 or 3×3), pick an operation (add, subtract, or multiply), and fill in the entries for Matrix A and Matrix B. For addition and subtraction, the calculator computes each result entry as A[i][j] ± B[i][j]. For multiplication, it uses the standard row-by-column dot product. Results update live as you type. The calculator assumes square matrices and does not handle determinants, inverses, or non-square dimensions.

Quick Questions

Why is matrix multiplication order-dependent?

Matrix multiplication is not commutative: A × B usually gives a different result than B × A. This is because each entry depends on specific row-column pairings, which change when you swap the operands. Always check which matrix is first.

Can I multiply non-square matrices?

In general yes — the rule is that the number of columns in A must equal the number of rows in B. This calculator only supports square 2×2 and 3×3 matrices for simplicity.

What is the identity matrix?

The identity matrix has 1s on the diagonal and 0s everywhere else. Multiplying any matrix by the identity returns the original matrix, similar to multiplying a number by 1.

When do I use matrix operations in real life?

Matrix operations are used extensively in computer graphics (transformations, rotations), machine learning (neural networks), physics (quantum mechanics, systems of equations), engineering (structural analysis), and economics (input-output models).

Sources

Method & review

MethodologyHow we calculate this Reviewed & Updated2026-04 Next review2027-04

Estimate only. Results reflect your inputs and standard formulas. Double-check important decisions independently.