2×2 Matrix Multiplication Calculator

·

Solution comments
Without description (answer only)

a

b

c

d

x

y

z

AC

i

ab
x2
xn

Randomize

Number format
3131313131351515151515≈52188552198585858586
Round to
Digits after decimal point
10
=Solve

  Formula for multiplying two 2×2 matrices

Let A have rows (a, b) and (c, d), and let B have rows (e, f) and (g, h). The product AB is again a 2×2 matrix, and each of its entries is a row of A times a column of B:

AB = [ a·e + b·g a·f + b·h ; c·e + d·g c·f + d·h ]

The entry in row i and column j uses row i of A and column j of B. Multiply the first entries together, multiply the second entries together, and add the two products. A 2×2 product therefore takes eight multiplications and four additions.

  Worked example

Let A have rows (1, 2) and (3, 4), and let B have rows (5, 6) and (7, 8).

Top left: 1·5 + 2·7 = 19. Top right: 1·6 + 2·8 = 22. Bottom left: 3·5 + 4·7 = 43. Bottom right: 3·6 + 4·8 = 50.

So AB has rows (19, 22) and (43, 50).

  The order matters

Matrix multiplication is not commutative. Multiply the same two matrices in the other order and the rows of B meet the columns of A: BA has rows (5·1 + 6·3, 5·2 + 6·4) = (23, 34) and (7·1 + 8·3, 7·2 + 8·4) = (31, 46). That is a different matrix from AB.

Two things do carry over from ordinary numbers. Multiplying by the identity matrix, with rows (1, 0) and (0, 1), changes nothing. And the determinant of a product is the product of the determinants: here det(A) = −2, det(B) = −2 and det(AB) = 19·50 − 22·43 = 4.

The calculator above is set to two 2×2 matrices. Use the swap button between them to exchange A and B and see how the product changes.

  2×2 matrix multiplication worked example

Write the initial matrix
A
:
A
=
1
3
2
4
Write the initial matrix
B
:
B
=
5
7
6
8
The result of multiplying two matrices (
A
and
B
) will be a matrix (
C
) with the same number of rows as in matrix
A
and with the same number of columns as in matrix
B
;
Write the initial matrix
C
and mark the elements that we need to find as unknown:
C
=
××
××
To find all the elements of the matrix
C
, need to calculate all possible combinations of scalar products of row-vectors of matrix
A
by column-vectors of matrix
B
;
To find an element of the matrix
C
with indices
i
and
j
, need to multiply each element of the
i
-th row of the matrix
A
by the corresponding element of the
j
-th column of the matrix
B
and add the resulting products;
c
0
i,j
=
m
k
= 1
a
0
i,k
·
b
0
k,j
// where
i
i is the row number;
j
j is the column number;
a
a is an element of matrix A;
b
b is an element of matrix B;
c
c is an element of matrix C;
k
k is a variable counter, which for each element c_{i,j} will start with a value of 1, increase by 1 at each iteration, and end at a value of m;
m
m is the number of columns of the matrix A or the number of rows of the matrix B;
C
=
A
·
B
=
1
3
2
4
·
5
7
6
8
=
19
43
22
50
Answer
c = a · b
19
43
22
50
SIZE2×2OPS12

  Calculators by size and method

  Sources