# What is multiplication of matrices?

Dec 4, 2014

Matrix multiplication is an operation performed upon two (or sometimes more) matrices, with the result being another matrix.

This explanation will assume the student is familiar with the basics of matrices, such as matrix notation and vector dot products.

There are certain rules which must be followed in the multiplication process. First, when multiplying any two matrices ${A}_{r s}$ and ${B}_{t u}$, where $r$ and $t$ are the number of rows in matrices A & B respectively and $s$ and $u$ the number of columns in matrices A & B respectively, if $s \ne t$ (that is, the number of rows in $A$ does not equal the number of columns in $B$), the matrix multiplication cannot be carried out.

When multiplying two matrices such as this, the resultant matrix $A B$ will possess $r$ rows and $u$ columns; in other words, the same number of rows as the $A$ matrix and the same number of columns as the $B$ matrix.

Each entry in the $A B$ matrix will be calculated via the dot product of a row from the $A$ matrix and a column from the $B$ matrix. Renaming the $A B$ matrix as $C$ for ease of use, the value of any individual element ${c}_{i} j$ can be found by taking the dot product of row $i$ from $A$ and column $j$ from $B$.

There is currently some difficulty in utilizing Socratic's math code to construct a matrix, so different notation must be used temporarily. Consider the 2x3 matrix $A$, such that ${a}_{11} = 1 , {a}_{12} = 0 , {a}_{13} = 3 , {a}_{21} = 0 , {a}_{22} = 5 , {a}_{23} = - 1$, as well as the 3x2 matrix $B$ such that ${b}_{11} = 4 , {b}_{12} = 5 , {b}_{21} = 0 , {b}_{22} = - 3 , {b}_{31} = - 4 , {b}_{32} = 1$. Then the resultant matrix $A B = C$ is a 2x2 matrix, with
${c}_{11} = \left({a}_{11} \cdot {b}_{11}\right) + \left({a}_{12} \cdot {b}_{21}\right) + \left({a}_{13} \cdot {b}_{31}\right)$,
${c}_{12} = \left({a}_{11} \cdot {b}_{12}\right) + \left({a}_{12} \cdot {b}_{22}\right) + \left({a}_{13} \cdot {b}_{32}\right) ,$
${c}_{21} = \left({a}_{21} \cdot {b}_{11}\right) + \left({a}_{22} \cdot {b}_{21}\right) + \left({a}_{23} \cdot {b}_{31}\right) ,$
${c}_{22} = \left({a}_{21} \cdot {b}_{12}\right) + \left({a}_{22} + {b}_{22}\right) + \left({a}_{23} + {b}_{32}\right)$

Plugging in the respective values, we get ${c}_{11} = - 8 , {c}_{12} = 8 , {c}_{21} = 4 , {c}_{22} = - 16$