Answer
The two matrices are multiplied by multiplying corresponding elements and then adding them, but only if the number of columns of the first matrix is equal to the number of rows of the second matrix.
Work Step by Step
The product of two matrices is defined as follows:
To find the ${{i}^{th}}$ row and ${{j}^{th}}$ column of the product AB, each element in the ${{i}^{th}}$ row of the matrix A is multiplied by the corresponding element in the ${{j}^{th}}$ column of the matrix B, and then obtained products of corresponding elements are added.
The product matrix AB is an $m\times k$ order matrix, that is, if $A={{\left[ {{a}_{ij}} \right]}_{m\times n}}$ and
$B={{\left[ {{b}_{jk}} \right]}_{n\times k}}$, then:
$\begin{align}
& AB=C \\
& C={{\left[ {{c}_{ik}} \right]}_{m\times k}}
\end{align}$
Here, ${{c}_{ik}}=\sum\limits_{j=1}^{n}{{{a}_{ij}}{{b}_{jk}}}$
Let $A={{\left[ \begin{matrix}
a & b \\
c & d \\
\end{matrix} \right]}_{2\times 2}}$ and $X={{\left[ \begin{matrix}
x \\
y \\
\end{matrix} \right]}_{2\times 1}}$
Then,
$\begin{align}
& AX={{\left[ \begin{matrix}
a & b \\
c & d \\
\end{matrix} \right]}_{2\times 2}}{{\left[ \begin{matrix}
x \\
y \\
\end{matrix} \right]}_{2\times 1}} \\
& \text{ }={{\left[ \begin{matrix}
ax+by \\
cx+dy \\
\end{matrix} \right]}_{2\times 1}} \\
\end{align}$
Therefore, the two matrices are multiplied by multiplying corresponding elements and then adding them, but only if the number of columns of the first matrix is equivalent to the number of rows of the second matrix.
Example:
Take two matrices $B=\left[ \begin{matrix}
1 & 2 \\
5 & 4 \\
\end{matrix} \right]$ and $C=\left[ \begin{matrix}
1 & 0 \\
1 & 5 \\
\end{matrix} \right]$
Calculate the product of B and C as follows:
$\begin{align}
& B\times C={{\left[ \begin{matrix}
1 & 2 \\
5 & 4 \\
\end{matrix} \right]}_{2\times 2}}{{\left[ \begin{matrix}
1 & 0 \\
1 & 5 \\
\end{matrix} \right]}_{2\times 2}} \\
& ={{\left[ \begin{matrix}
1\left( 1 \right)+2\left( 2 \right) & 1\left( 0 \right)+2\left( 5 \right) \\
5\left( 1 \right)+4\left( 1 \right) & 5\left( 0 \right)+4\left( 5 \right) \\
\end{matrix} \right]}_{2\times 2}} \\
& ={{\left[ \begin{matrix}
1+4 & 0+10 \\
5+4 & 0+20 \\
\end{matrix} \right]}_{2\times 2}} \\
& ={{\left[ \begin{matrix}
5 & 10 \\
9 & 20 \\
\end{matrix} \right]}_{2\times 2}}
\end{align}$