Show that the $\text{rank}(A)=$ number of pivot elements in $T$. Problem: Given $A_{m\times n}$ and $T$, where $T$ is the equivalent row-reduced matrix in echelon form.


*

*Show that rank$(A)=$ number of pivot elements in $T.$

*Show that the nulldim$(A)=$ the dimension of $A$ minus the number of pivot elements in $T$.



Attempt: 
1) Since the matrix $A$ is of type $m\times n$, it follows that dim$(A)=n.$ Denote the number of pivot elements in $T$ by $p$. I need to show that rank$(A)=p.$ 
Saying that $T$ is the echelon form, row-reduced equivalent  of $A$ is the equivalent of saying that ker$(A)=$ker$(T)$. Does it to suffice to state this? Isn't it true that if the kernels are equal, it follows that their ranks are equal?
2) Here, I'm supposed to show that nulldim$(A)=p-r,$ which is the rank-nullity theorem. any simple proof for this?
 A: No, the linear relations between columns do change by row operations. Only the dimension of the column space is preserved. You can read some of the explanations here. This is a comment of user lhf from the same link that sums it up:

Elementary row operations do not change the row space of a matrix but they do change the column space; only the dimension of the column space is preserved.

Hence, I believe the best way to prove question $1$ is by first showing that column rank of $A$ is equal to row rank of $A$ (see here for the proof). And since by doing row operations, the row space do not change, which follows row rank $A$ = number of pivot elements in $T$. But since row rank $A$ = column rank $A$ so we are done.
For question $2$, we know that nullspace of $A$ is set of vectors $\mathbf{x}$ so $\mathbf{Ax}=0$. Let $A=(a_{i,j})_{m \times n}, \mathbf{x}=(x_{i,1})_{1 \le i \le n}$ and denote $\mathbf{a_i}$ as the $i$th column vector of $\mathbf{A}$. We can rewrite $\mathbf{Ax}=0$ as following 
$$x_1 \mathbf{a_1}+x_2\mathbf{a_2}+ \ldots + x_n\mathbf{a_n}=0. \tag{1}$$
WLOG, let $\{ \mathbf{a_1}, \ldots, \mathbf{a_k} \}$ be basis of column space then $k= \text{rank }A$.  This follows all column vectors $\mathbf{a_j} \; (j>k)$ can be written as linear combination of $\{\mathbf{a_1},\mathbf{a_2}, \ldots, \mathbf{a_k}\}$, or $\mathbf{a_j}= \sum_{i=1}^k \alpha_{i,j}\mathbf{a_i}$ for $j \ge k+1$. Combining with $(1)$, we obtain $$\left( x_1- \sum_{i=k+1}^n \alpha_{1,i}x_i \right)\mathbf{a_1}+\ldots+\left( x_k- \sum_{i=k+1}^n \alpha_{k,i}x_i \right)\mathbf{a_k}=0.$$
But since $\{ \mathbf{a_1}, \ldots, \mathbf{a_k} \}$ are linearly independent so that means $x_j= \sum_{i=k+1}^n \alpha_{j,i}x_i$ for all $1 \le j \le k$. This follow, any solution $\mathbf{x}$ of $\mathbf{Ax}=0$ can be written as 
$$\mathbf{x}=(x_i)_{m \times 1}= x_{k+1} \begin{pmatrix}
\alpha_{1,k+1} \\ 
\vdots \\ 
\alpha_{k,k+1} \\
1_{k+1} \\
0_{k+2} \\
\vdots \\
0_n
\end{pmatrix}+x_{k+2} \begin{pmatrix}
\alpha_{1,k+2} \\ 
\vdots \\ 
\alpha_{k,k+2} \\
0_{k+1} \\
1_{k+2} \\
0_{k+3} \\
\vdots \\
0_n
\end{pmatrix}+ \ldots + x_n\begin{pmatrix}
\alpha_{1,n} \\ 
\vdots \\ 
\alpha_{k,n} \\
0_{k+1} \\
\vdots \\
1_n
\end{pmatrix}.$$
Note that these $n-k$ column vectors are linearly independent so that mean they spans the nullspace of $A$. This follows $\text{dim} N(A)=n-k$. We also know that $k= \text{rank }A$ so we are done.
