Matrix multiplication
- Matrix multiplication is a bit more complicated than scalar multiplication.
- First of all we must check if the number of columns of the first matrix is equal to the number of rows of the second matrix.
- Therefore the answer matrix will have the number of rows of the first matrix and the number of columns of the second matrix.
- For example when considering the orders of the matrices where the first matrix has an order of (2 x 3) and the second matrix has an order of (3 x 3 )
- Order of the answer matrix is: (2 x
3) x (3x 2) = (2 x 2)
The rows and columns of the matrices are multiplied as follows:
- To start the multiplication, we have to separate the first matrix into rows, and the second matrix into columns:
\[\Large
A =
\begin{bmatrix}
\color{red}{A} & \color{red}{B} & \color{red}{C}\\
\color{blue}{D} & \color{blue}{E} & \color{blue}{F}
\end{bmatrix} *
\begin{bmatrix}
\color{red}{U} & \color{blue}{V} \\
\color{red}{W} & \color{blue}{X} \\
\color{red}{Y} & \color{blue}{Z}
\end{bmatrix}
\]