What is 2×2 matrix multiplication?
Matrix multiplication combines two matrices into a single product matrix. For two 2×2 matrices A and B, the product \(C = A \cdot B\) is also a 2×2 matrix. Each entry of C is found by taking a row of A and a column of B, multiplying corresponding elements, and adding the results — a "row times column" dot product. This calculator computes all four entries of C from the eight numbers you enter.
How to use this calculator
Enter the four entries of matrix A (A₁₁, A₁₂, A₂₁, A₂₂) and the four entries of matrix B in the same row-by-row order. Click calculate and the tool returns the product matrix C laid out in a 2×2 grid, along with each individual entry. Values can be positive, negative, or decimals.
The formula explained
For 2×2 matrices the rule is:
$$c_{11} = a_{11}\cdot b_{11} + a_{12}\cdot b_{21}$$$$c_{12} = a_{11}\cdot b_{12} + a_{12}\cdot b_{22}$$$$c_{21} = a_{21}\cdot b_{11} + a_{22}\cdot b_{21}$$$$c_{22} = a_{21}\cdot b_{12} + a_{22}\cdot b_{22}$$In general, the entry \(c_{ij}\) is the sum over \(k\) of \(a_{ik}\cdot b_{kj}\):
$$c_{ij} = \sum_{k} a_{ik} b_{kj}$$Note that matrix multiplication is not commutative: \(A\cdot B\) is usually different from \(B\cdot A\).
Worked example
Let A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]]. Then:
$$c_{11} = 1\cdot 5 + 2\cdot 7 = 19$$$$c_{12} = 1\cdot 6 + 2\cdot 8 = 22$$$$c_{21} = 3\cdot 5 + 4\cdot 7 = 43$$$$c_{22} = 3\cdot 6 + 4\cdot 8 = 50$$So C = [[19, 22], [43, 50]].
More Worked Examples
Each product \(C = A \cdot B\) is found by taking the dot product of a row of \(A\) with a column of \(B\). The entry \(C_{ij}\) uses row \(i\) of \(A\) and column \(j\) of \(B\): \(C_{ij} = A_{i1}B_{1j} + A_{i2}B_{2j}\).
Example 1 — Negative and decimal entries
Let \(A = \begin{bmatrix} -2 & 1.5 \\ 0.5 & -3 \end{bmatrix}\) and \(B = \begin{bmatrix} 4 & -1 \\ 2 & 0.5 \end{bmatrix}\).
- \(C_{11} = (-2)(4) + (1.5)(2) = -8 + 3 = -5\)
- \(C_{12} = (-2)(-1) + (1.5)(0.5) = 2 + 0.75 = 2.75\)
- \(C_{21} = (0.5)(4) + (-3)(2) = 2 - 6 = -4\)
- \(C_{22} = (0.5)(-1) + (-3)(0.5) = -0.5 - 1.5 = -2\)
So \(C = \begin{bmatrix} -5 & 2.75 \\ -4 & -2 \end{bmatrix}\). The top-left entry is -5.
Example 2 — Multiplying by the identity matrix
Let \(A = \begin{bmatrix} 7 & -2 \\ 3 & 5 \end{bmatrix}\) and \(I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\). Multiplying any matrix by the identity returns the original matrix.
- \(C_{11} = (7)(1) + (-2)(0) = 7 + 0 = 7\)
- \(C_{12} = (7)(0) + (-2)(1) = 0 - 2 = -2\)
- \(C_{21} = (3)(1) + (5)(0) = 3 + 0 = 3\)
- \(C_{22} = (3)(0) + (5)(1) = 0 + 5 = 5\)
So \(A \cdot I = \begin{bmatrix} 7 & -2 \\ 3 & 5 \end{bmatrix} = A\), confirming \(I\) acts as the multiplicative identity.
Example 3 — Showing \(A \cdot B \neq B \cdot A\)
Let \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\) and \(B = \begin{bmatrix} 0 & 1 \\ 5 & 6 \end{bmatrix}\).
First, \(A \cdot B\):
- \(C_{11} = (1)(0) + (2)(5) = 0 + 10 = 10\)
- \(C_{12} = (1)(1) + (2)(6) = 1 + 12 = 13\)
- \(C_{21} = (3)(0) + (4)(5) = 0 + 20 = 20\)
- \(C_{22} = (3)(1) + (4)(6) = 3 + 24 = 27\)
\(A \cdot B = \begin{bmatrix} 10 & 13 \\ 20 & 27 \end{bmatrix}\); the top-left entry is 10.
Now reverse the order, \(B \cdot A\):
- \(C_{11} = (0)(1) + (1)(3) = 0 + 3 = 3\)
- \(C_{12} = (0)(2) + (1)(4) = 0 + 4 = 4\)
- \(C_{21} = (5)(1) + (6)(3) = 5 + 18 = 23\)
- \(C_{22} = (5)(2) + (6)(4) = 10 + 24 = 34\)
\(B \cdot A = \begin{bmatrix} 3 & 4 \\ 23 & 34 \end{bmatrix}\); the top-left entry is 3.
Since \(\begin{bmatrix} 10 & 13 \\ 20 & 27 \end{bmatrix} \neq \begin{bmatrix} 3 & 4 \\ 23 & 34 \end{bmatrix}\), matrix multiplication is not commutative: the order of the factors matters.
Definitions & Glossary
- Matrix
- A rectangular array of numbers arranged in rows and columns, written between brackets. Its size is given as (rows) × (columns).
- 2×2 matrix
- A square matrix with two rows and two columns, containing exactly four entries: \(\begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}\).
- Entry / element (\(a_{ij}\))
- A single number inside the matrix. The subscript notation \(a_{ij}\) identifies its position: \(i\) is the row number and \(j\) is the column number. For example, \(a_{21}\) is the entry in row 2, column 1.
- Row
- A horizontal line of entries. In a 2×2 matrix, row 1 is \([a_{11}\ \ a_{12}]\) and row 2 is \([a_{21}\ \ a_{22}]\).
- Column
- A vertical line of entries. In a 2×2 matrix, column 1 is \(\begin{bmatrix} a_{11} \\ a_{21} \end{bmatrix}\) and column 2 is \(\begin{bmatrix} a_{12} \\ a_{22} \end{bmatrix}\).
- Dot product
- The sum of the pairwise products of corresponding entries of a row and a column. Each entry of the product matrix is the dot product of a row of \(A\) with a column of \(B\), e.g. \(C_{11} = A_{11}B_{11} + A_{12}B_{21}\).
- Product matrix \(C\)
- The result of multiplying two matrices, \(C = A \cdot B\). For 2×2 matrices, \(C\) is also 2×2, with each entry \(C_{ij}\) formed from row \(i\) of \(A\) and column \(j\) of \(B\).
- Identity matrix (\(I\))
- The square matrix with 1's on the main diagonal and 0's elsewhere. The 2×2 identity is \(I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\). It satisfies \(A \cdot I = I \cdot A = A\), acting like the number 1 in multiplication.
- Commutativity
- A property where the order of operands does not change the result (e.g. \(2 \times 3 = 3 \times 2\)). Matrix multiplication is not commutative in general: usually \(A \cdot B \neq B \cdot A\), so the left and right factors must be kept in their stated order.
FAQ
Is \(A\cdot B\) the same as \(B\cdot A\)? No. Matrix multiplication is generally not commutative, so the order matters.
Can I multiply matrices of different sizes? Two matrices can be multiplied only when the number of columns in the first equals the number of rows in the second. Two 2×2 matrices always satisfy this.
What is the identity matrix? The 2×2 identity is [[1, 0], [0, 1]]. Multiplying any matrix by it leaves the matrix unchanged.