1c Linear Algebra Refresher

Aug 13, 2017 14:01 · 86 words · 1 minute read

Matrix-Vector Multiplication

\[ \begin{bmatrix} a & b \newline c & d \newline e & f \end{bmatrix} * \begin{bmatrix} x \newline y \newline \end{bmatrix} = \begin{bmatrix} a*x + b*y \newline c*x + d*y \newline e*x + f*y \end{bmatrix} \]

The result is a vector. The vector must be the second term of the multiplication. The number of columns in the matrix must equal the number of rows in the vector.

If you're stupid (me), rather than doing $X * \theta$ you can instead do \((\theta^T * X^T)^T\).