Question about Column space and Row space of generic matrix $A$ and the corresponding upper triangular $U$ I am doing the following exercise from Introduction to Linear Algebra:

Find the dimensions of (a) the column space of A, (b) the column space of U , (c) the row space of A, (d) the row space of U . Which two of the spaces are the same?

Given a generic matrix $A$, and its upper triangular $U$
$$A = \begin{bmatrix}1&1&0\\1&3&1\\3&1&-1\end{bmatrix}$$
$$U = \begin{bmatrix}1&1&0\\0&2&1\\0&0&0\end{bmatrix}$$
the solution is:

All dimensions are $2$. The row spaces of $A$ and $U$ are the same.

I agree that all dimensions are $2$. However, I could not understand why the row spaces of $A$ and $U$ are the same, while the corresponding column spaces are not. 
 A: Writing the rows of $A$ as $a_1, a_2, a_3$, respectively. If you do row transformations you arrive at $U$ which has rows $a_1,a_2-a_1,a_3-3a_1+a_2$. The elementary row transformations don't change the row space of the matrix. You can easily check that if some vector $v$ can be expressed as $v=\lambda_1a_1+\lambda_2a_2+\lambda_3a_3$ with $\lambda_i\in \mathbb{R}$, then there are also $\mu_i\in \mathbb{R}$ with $v=\mu_1a_1+\mu_2(a_2-a_1)+\mu_3(a_3-3a_1+a_2)$, e.g. $\mu_3=\lambda_3$, $\mu_2=\lambda_2-\lambda_3$, $\mu_1=\lambda_1+\lambda_2+3\lambda_3$. However, there is no reason why row operations should not change the column space of $A$. To find a basis of the column space of $A$ you should do column operations and arrive at $L=\begin{pmatrix}1&0&0\\1&2&0\\3&-2&0\end{pmatrix}$. 
Note that the column and the row space always have the same dimension (called the rank of the matrix), but are not necessarily the same space.
A: I prefer to give you a hint, but I can't comment. I will provide more detail if it doesn't work.
Compare the two independent vectors that are the basis of the column space of A with those of U.
A: All the questions can be answered by inspection. First recall that the dimension of the row space of a matrix is equal to the dimension of the column space of a matrix.  
Observe that the second row of $A$ is not a scalar multiple of the first row of $A$ because $a_{23}=1$ and $a_{13}=0$.  This implies the first two rows of $A$ are linearly independent and that the dimension of the row space of $A$ is at least 2 (ie equal to 2 or 3).  If the third row is a linear combination of the first two rows,  then it must be $(-1)(row~2)+c (row~1)$ because $a_{33}=-1$.  To get $a_{32}=1$ requires that $c=4$.  We can verify that $(row~3)=(-1)(row~2)+4(row~2)$.  This proves that the dimension of the row space of $A$ (and hence of the column space of $A$) is 2.
Similarly for $U$.
Observe that the first row of $A$ is equal to the first row of $U$.  The first two rows of $U$ form a basis for the row space of $U$, and observe that the second row of $A$ is the sum of the first two rows of $U$. Hence, the row space of $A$ (which is spanned by the first two rows of $A$) is a subset of the row space of $U$.  Since the two dimensions are equal, we have that the two row spaces are equal.
For the column space, observe that the third column of $A$ has a nonzero entry in its 3rd coordinate and hence cannot be in the column space of $U$.
