Table of Contents
Matrix multiplication is the process of multiplying two matrices together, resulting in a new matrix. To multiply two matrices, the number of columns in the first matrix must match the number of rows in the second matrix. The result of the multiplication is a matrix with the same number of rows as the first matrix and the same number of columns as the second matrix. The individual values of the resulting matrix are determined by multiplying each row of the first matrix by each column of the second matrix and then adding the products.
Introduction
Suppose we have a 2×2 matrix A, which has 2 rows and 2 columns:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.super_short2 {
max-width: 180px;
margin: 5px auto;
color: blue;
}
A = |
|
Suppose we also have a 2×3 matrix B, which has 2 rows and 3 columns:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.short2 {
max-width: 250px;
margin: 5px auto;
color: red;
}
B = |
|
To multiply matrix A by matrix B, we use the following formula:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.long{
margin: 5px auto;
color: #000000;
}
.red {
color: red;
}
.blue {
color: blue;
}
A x B = |
|
This results in a 2×3 matrix.
The following examples illustrate how to multiply a 2×2 matrix with a 2×3 matrix using real numbers.
Example 1
Suppose we have a 2×2 matrix C, which has 2 rows and 2 columns:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.super_short {
max-width: 150px;
margin: 5px auto;
color: #000000;
}
C = |
|
Suppose we also have a 2×3 matrix D, which has 2 rows and 3 columns:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.short {
max-width: 250px;
margin: 5px auto;
color: #000000;
}
D = |
|
Here is how to multiply matrix C by matrix D:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.medium {
max-width: 500px;
margin: 5px auto;
color: #000000;
}
.red {
color: red;
}
.blue {
color: blue;
}
C x D = |
|
This results in the following matrix:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.short {
max-width: 250px;
margin: 5px auto;
color: #000000;
}
C x D = |
|
Example 2
Suppose we have a 2×2 matrix E, which has 2 rows and 2 columns:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.super_short {
max-width: 150px;
margin: 5px auto;
color: #000000;
}
E = |
|
Suppose we also have a 2×3 matrix F, which has 2 rows and 3 columns:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.short {
max-width: 250px;
margin: 5px auto;
color: #000000;
}
F = |
|
Here is how to multiply matrix E by matrix F:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.medium {
max-width: 500px;
margin: 5px auto;
color: #000000;
}
.red {
color: red;
}
.blue {
color: blue;
}
E x F = |
|
This results in the following matrix:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.short {
max-width: 250px;
margin: 5px auto;
color: #000000;
}
E x F = |
|
Example 3
Suppose we have a 2×2 matrix G, which has 2 rows and 2 columns:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.super_short {
max-width: 150px;
margin: 5px auto;
color: #000000;
}
G = |
|
Suppose we also have a 2×3 matrix H, which has 2 rows and 3 columns:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.short {
max-width: 250px;
margin: 5px auto;
color: #000000;
}
H = |
|
Here is how to multiply matrix G by matrix H:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.medium {
max-width: 500px;
margin: 5px auto;
color: #000000;
}
.red {
color: red;
}
.blue {
color: blue;
}
G x H = |
|
This results in the following matrix:
table {
border-collapse: collapse;
border-spacing: 0;
padding: 0;
}
td.tdleft {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-left: solid 1px #000;
width: 5px;
padding: 0;
}
td.tdreg {
padding: 2px 1px;
text-align: center;
border-bottom: solid 1px #fff;
}
td.tdright {
border-top: solid 1px #000;
border-bottom: solid 1px #000;
border-right: solid 1px #000;
width: 5px;
padding: 0;
}
.short {
max-width: 250px;
margin: 5px auto;
color: #000000;
}
G x H = |
|
Matrix Calculator
The examples above illustrated how to multiply 2×2 matrices by hand. A good way to double check your work if you’re multiplying matrices by hand is to confirm your answers with a matrix calculator. While there are many matrix calculators online, the simplest one to use that I have come across is this one by Math is Fun.