How to multiply a vector from the left side with matrix?

So essentially you wish to compute: $$ \begin{pmatrix} \beta_0&\beta_1 \end{pmatrix} \begin{pmatrix} a_{11}&a_{12}\\ a_{21}&a_{22} \end{pmatrix}.$$ This equals the following: $$\begin{pmatrix} a_{11}\beta_0+a_{21}\beta_1&a_{12}\beta_0+a_{22}\beta_1 \end{pmatrix} . $$ Hopefully it is clear how the multiplication works.


Matrix multiplication is defined so that the entry $(i,j)$ of the product is the dot product of the left matrix's row $i$ and the right matrix's column $j$.

If you want to reduce everything to matrices acting on the left, we have the identity $xA = \big(A^Tx^T\big)^T$ where $T$ denotes the transpose. This is because $(AB)^T = B^TA^T$, and the operation that sends a matrix to its transpose is self-inverse.