Result Matrix: The output matrix after performing the selected operation. For addition and subtraction, each entry is computed independently. For multiplication, each entry is a dot product of a row and column.
Addition (A + B): Each cell in the result is the sum of the corresponding cells in A and B. Both matrices must be the same size.
Subtraction (A − B): Each cell in the result is A's value minus B's value at the same position. Order matters — A − B is not the same as B − A.
Multiplication (A × B): Uses the standard matrix product. Entry C[i][j] is the dot product of row i of A with column j of B. Matrix multiplication is not commutative — A × B generally differs from B × A.
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).