2×2 Matrix Product Calculator
Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/10/2026
The product of two 2×2 matrices, A × B, is calculated row by column: each element of the result is the sum of the products of the corresponding elements of a row of A and a column of B. For A=[[1,2],[3,4]] and B=[[2,0],[1,2]], the product A×B is [[4,4],[10,8]].
Explanation
Multiplying two matrices does not mean multiplying their elements one by one (unlike adding matrices): each element of the result, at row i and column j, is obtained by combining the entire row i of the first matrix with the entire column j of the second, element by element, then adding these products. For two 2×2 matrices, this gives four distinct calculations, each combining two pairs of numbers. An important consequence of this definition, often surprising to those new to matrices: the matrix product is generally not commutative, that is, A×B differs from B×A in the general case — unlike multiplication of ordinary numbers. Matrix multiplication is at the heart of many applications, from geometric transformations (rotation, scaling) in computer graphics to solving systems of linear equations, and neural networks in machine learning, where most of the computation reduces to products of large matrices. The determinant of a 2×2 matrix, on the other hand, remains a property of a single matrix at a time rather than an operation between two matrices: it does not follow directly from this product, although the determinant of the product A×B always equals, by a remarkable property, the product of the determinants of A and B taken separately.
Example: A=[[1,2],[3,4]], B=[[2,0],[1,2]]
Inputs
A = [[1, 2], [3, 4]]. B = [[2, 0], [1, 2]].
Calculation
c11 = 1×2 + 2×1 = 4. c12 = 1×0 + 2×2 = 4. c21 = 3×2 + 4×1 = 10. c22 = 3×0 + 4×2 = 8.
Result
The product A × B is [[4, 4], [10, 8]].
Frequently asked questions
Why is A×B different from B×A?
Because the definition of the matrix product combines the rows of the first matrix with the columns of the second, in that precise order: reversing the order of the two matrices entirely changes which rows combine with which columns, which generally gives a different result. This lack of commutativity is one of the most striking differences between matrix algebra and ordinary number arithmetic.
Does this method work for matrices of different sizes?
The general principle, yes, but with a condition: the number of columns of the first matrix must equal the number of rows of the second. This calculator deliberately limits itself to two 2×2 matrices, the simplest case where this condition is automatically met, but the same row-by-column logic extends to rectangular matrices of compatible sizes.
What happens when multiplying by the identity matrix?
The result stays unchanged: the identity matrix (1 on the diagonal, 0 elsewhere) plays the same role in matrix multiplication as the number 1 in ordinary multiplication — multiplying any matrix by it leaves it perfectly intact, as this calculator's first test case confirms.