Matrix A
Matrix B
Result Matrix
Use this mathcalcs matrix multiplication calculator to find the product of two matrices. Use the tool above to multiply two matrices and get the product matrix.
To use the matrix multiplication calculator, follow these steps:
Matrix multiplication is a matrix operation that takes two matrices and produces a new matrix. The new matrix is called the product of the two matrices. The new matrix's elements are calculated by using the elements of the original matrices according to a specific formula.
For two matrices A and B to be multiplied (A * B), the number of columns in the Matrix A should be equal to number of rows in the Matrix B. The resulting matrix will have the row count of Matrix A and the column count of the Matrix B
To perform matrix multiplication of two matrices M and N, follow these steps:
If this condition is met ✅, proceed to the next step.
Let M and N be matrices with following elements
\(M = \begin{bmatrix}
a & b \\
c & d
\end{bmatrix}
N = \begin{bmatrix}
e & f \\
g & h
\end{bmatrix}
\)
The product of M and N (M * N ) will be a matrix P with following elements
\(P = \begin{bmatrix}
a \cdot e + b \cdot g & a \cdot f + b \cdot h \\
c \cdot e + d \cdot g & c \cdot f + d \cdot h
\end{bmatrix}
\)
What we did is to form the element of the resulting matrix P and index (1,1)
Similarly, we can calculate the element at index (1,2) of the resulting matrix P
This is how we calculate the elements of the resulting matrix P
The formula for matrix multiplication is as follows:
\(P_{ij} = \sum_{k} (M_{ik} \cdot N_{kj})
\)
Where:
Matrix Multiplication is not commutative.
It means M * N is not equal to N * M
Sometimes, M * N is defined and N * M may not be defined (because of the dimensions of the matrices)
Let's multiply the following 2 x 2 matrices
\(K = \begin{bmatrix}
24 & 56 \\
12 & 34
\end{bmatrix}
L = \begin{bmatrix}
23 & 45 \\
67 & 89
\end{bmatrix}
\)
\(
K \cdot L = \begin{bmatrix}
24 \times 23 + 56 \times 67 & 24 \times 45 + 56 \times 89 \\
12 \times 23 + 34 \times 67 & 12 \times 45 + 34 \times 89
\end{bmatrix}
= \begin{bmatrix}
4304 & 6064 \\
2554 & 3566
\end{bmatrix}
\)
Let's multiply the following 2 x 3 matrix with a 3 x 2 matrix
\(M = \begin{bmatrix}
34 & 78 & 32 \\
42 & 87 & 32
\end{bmatrix}
N = \begin{bmatrix}
88 & 45 \\
23 & -34 \\
12 & 35
\end{bmatrix}
\)
M * N = ?
\(
M \cdot N = \begin{bmatrix}
34 \times 88 + 78 \times 23 + 32 \times 12 & 34 \times 45 + 78 \times (-34) + 32 \times 35 \\
42 \times 88 + 87 \times 23 + 32 \times 12 & 42 \times 45 + 87 \times (-34) + 32 \times 35
\end{bmatrix}
= \begin{bmatrix}
5202 & -2 \\
6113 & 52
\end{bmatrix}
\)
M 2 x 3 * N 3 x 2 = P 2 x 2