# Compatible Matrices

Compatible matrices are matrices which can be multiplied. For this to be possible, the number of columns in the first matrix must be equal to the number of rows in the second matrix. The product of an $a×b$ matrix and a $b×c$ matrix has dimensions $a×c$ .

Example 1:

You can multiply a $2×3$ matrix by a $3×5$ matrix. The product will be a $2×5$ matrix.

$\left[\begin{array}{rrr}1& 0& 1\\ 0& 1& 0\end{array}\right]\cdot \left[\begin{array}{rrrrr}1& 0& 0& 2& 3\\ 0& 1& 1& 0& -1\\ 1& 0& 0& 1& 0\end{array}\right]=\left[\begin{array}{rrrrr}2& 0& 0& 3& 3\\ 0& 1& 1& 0& -1\end{array}\right]$

Click here for more about matrix multiplication .

Example 2:

You cannot multiply a $2×3$ matrix by a $2×2$ matrix. The number of columns in the first matrix ( $3$ ) is not the same as the number of rows in the second matrix ( $2$ ).

$\left[\begin{array}{rrr}1& 0& 1\\ 0& 1& 0\end{array}\right]\cdot \left[\begin{array}{rr}2& 0\\ 0& 3\end{array}\right]:\text{UNDEFINED}$