W3 - Systems of Equations and Matrices

Matrix Multiplication

Dot Product

$\begin{bmatrix} a_1 & \dots & a_n \end{bmatrix} \cdot \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix}= a_1x_1+\dots+a_nx_n$

Example

$\begin{bmatrix} 1 & 2 & 3 \end{bmatrix} \cdot \begin{bmatrix} 11 \\ 12 \\ 14 \end{bmatrix}= 111+212+3*13=74$

Matrix-Vector Multiplication

Column Interpretation

Requires: #col of $A$ = #rows of $\vec{x}$

$\begin{bmatrix} | & & | \\ \vec{c}_1 & \dots & \vec{c}_n\\| & & | \end{bmatrix} \times \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix} = x_1 \vec{c}_1 + \dots + x_n \vec{c}_n$

Example

$\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 5 \\ 6 \end{bmatrix} = 5 \begin{bmatrix} 1 \\ 3 \end{bmatrix} + 6 \begin{bmatrix} 2 \\ 4 \end{bmatrix}=\begin{bmatrix} 17\\39 \end{bmatrix}$

Row Interpretation

Requires: #rows of $A$ = #rows of $\vec{x}$

$\begin{bmatrix} - & \vec{r}_1 & - \\ & \vdots & \\ - & \vec{r}_m & - \end{bmatrix} \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix}=\begin{bmatrix} \vec{r}_1 \cdot x_1 \\ \vdots \\ \vec{r}_n \cdot x_n \end{bmatrix}$

Example

$\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 5 \\ 6 \end{bmatrix} = \begin{bmatrix} 15+26 \\ 35+46 \end{bmatrix}=\begin{bmatrix} 17\\39 \end{bmatrix}$

Matrix-Matrix Multiplication

$C \text{ is } m \times n, A\text{ is } n \times k$

Size change: $CA \text{ is } m\times k$