# Compatible Matrices

## Compatible Matrices

Two matrices are said to be compatible if the number of columns in the first is equal to the number of rows in the second.

In other words, two matrices are compatible if they can be multiplied by each other.

### Examples

• A 2 × 4 matrix can be multiplied by a 3 × 2 matrix. The product is a 3 × 4 matrix :
Consider the matrix : $$\textrm{A} = \left(\begin{matrix} 3 & -3\\5 & 1\\2 & -2\\6 & 9\end{matrix}\right)$$ and the matrix $$\textrm{B}= \left(\begin{matrix} -5 & 7 & -6\\0 & -2 & 8\end{matrix}\right)$$.
Then : $$\textrm{A · B = }\begin{pmatrix} -15 & 27 & -42 \\-25 & 33 & -22 \\-10 & 18 & -28 \\-30 & 24 & 36 \end{pmatrix}$$.
• A 2 × 5 matrix cannot be multiplied by a 3 × 4 matrix, since the number of columns in the first matrix is not equal to the number of rows in the second matrix.