Part of Linear Algebra.
dot product
If x=(x_1, x_2, …, x_n), y = y_1,y_2,…,y_n) the dot product of x and y is the product
marix multiplication let A be an mn size matrix. Let B be an nk matrix. The product matrix
AB is the matrix whose ij entry is the dot product of Ai . Bj
The resulting size will be an m*k matrix.
example
Compute AB if and
= \begin{bmatrix} 67 & 29 \\ 78 & 24 \\ 55 & 10 \\ \end{bmatrix} $$ ### example $$ A= \begin{bmatrix}1,3,2\end{bmatrix} B=\begin{bmatrix}[5], [6], [4]\end{bmatrix} $$ Compute AB and BA $$ AB = \begin{bmatrix} 1 \cdot 5+3 \cdot 6+2 \cdot 4\end{bmatrix} = \begin{bmatrix}31\end{bmatrix} $$ -- BA is 3x3 b/c they're 3x1 and 1x3 and we do m*k size $$ \begin{bmatrix} 3 \cdot 1 & 5 \cdot 3 & 5 \cdot 2 \\ 6 \cdot 1 & 6 \cdot 3 & 6 \cdot 2 \\ 4 \cdot 1 & 4 \cdot 3 & 4 \cdot 2 \\ \end{bmatrix} = \begin{bmatrix} 5 & 15 & 10 \\ 6 & 18 & 12 \\ 4 & 12 & 8 \\ \end{bmatrix} $$