Row space and Column space and product of matrices question The theorems state that the $\operatorname{ColumnSpace}(A \cdot B) \subseteq \operatorname{ColumnSpace}(A)$ and the $\operatorname{RowSpace}(A \cdot B) \subseteq \operatorname{RowSpace}(B)$.
When doing $A \cdot B$, it's the dot product of the rows of $A$ by the columns of $B$. If its the rows of $A$ by the columns of $B$, why is it that $\operatorname{RowSpace}(A \cdot B) \subseteq \operatorname{RowSpace}(B)$ and not $\operatorname{RowSpace}(A)$?
Also, If its the rows of $A$ by the columns of $B$, why is it that $\operatorname{ColumnSpace}(A \cdot B) \subseteq \operatorname{ColumnSpace}(A)$ and not $\operatorname{ColumnSpace}(B)$?
 A: You can view matrix multiplication by a vector on the right as a linear combination of the columns, and on the left - as a linear combination of the rows.
$$
\pmatrix{\vec{a}_1 & \vec{a}_2 & \cdots & \vec{a}_n} \pmatrix{x_1 \\ \vdots \\ x_n}
   = \sum_{k=1}^n x_k \vec{a}_k,
$$
and the other way is just a transpose of this.
So the result of multiplying matrices is either a set of linear combinations of the columns of the left one, or a set of linear combinations of the rows of the right one
A: If you've read anything about linear transformations, then the following may be enlightening.
To every $m \times n$ matrix $A$ we may associate a linear transformation $T_A:\Bbb R^n\to\Bbb R^m$ by the formula $T_A(\vec x)=A \vec x$. This allows us to define the column space of $A$ as the image of $T_A$ and the row space as the image of $T_{A^\top}$.
Moreover, if $B$ is an $n \times k$ matrix, then we have the formula
$$
T_{AB}(\vec x)=AB\vec x = A \, T_B(\vec x)= T_A \, \bigl(T_B (\vec x) \bigr)=(T_A \circ T_B)(\vec x)
$$
Now, showing that $\DeclareMathOperator{Col}{Col}\Col(AB) \subset \Col(A)$ is equivalent to showing that $$\DeclareMathOperator{Image}{Image}\Image(T_{A}\circ T_B)\subset\Image(T_A)$$ which is trivial.
To show that $\DeclareMathOperator{Row}{Row}\Row(AB)\subset\Row(B)$ note that
$$
\Image\left(T_{(AB)^\top}\right)=\Image(T_{B^\top A^\top})=\Image(T_{B^\top}\circ T_{A^\top})
$$
Then $\Row(AB)\subset\Row(B)$ if and only if
$$
\Image(T_{B^\top}\circ T_{A^\top})\subset\Image(T_{B^\top})
$$
which is also trivial.
Of course, if you haven't read anything about linear transformations, then ignore all of this!
