Why does this method for finding basis work? If we have a spanning set and want to find a basis, one method that seems to be used is to put the set into row echelon form. From there, the original vectors of all leading variables are bases for the set. 
Obviously, the original vectors associated with the free variables are linearly dependent, which means that they can be expressed as linear combinations of the vectors that have leading variables assigned to them.
It is demonstrated in the following video by PatrickJMT: 
https://youtu.be/0utd-Noc_Fs?t=6m55s
However, I can't seem to find a good explanation about why this method works. I'd like to know WHY this procedure works and what it is exactly telling us. Specifically, how is it able to tell us exactly which vectors are linearly independent and which are the dependent ones?
Thank you.
 A: Let $A=\begin{bmatrix}A_1 & A_2 & \ldots & A_n\end{bmatrix}$ be the original matrix and $U=\begin{bmatrix}U_1 & U_2 & \ldots & U_n\end{bmatrix}$ the row echelon form. Reducing to a row echelon form corresponds to left multiplication with an invertible matrix, that is
$$
A=LU\qquad\text{where } L \text{ is invertible}.
$$


*

*Note that $\text{rank}\,A=\text{rank}\,U$. ($\text{rank}\,A=\text{rank}\,LU\le\text{rank}\,U$ and $\text{rank}\,U=\text{rank}\,L^{-1}A\le\text{rank}\,A$.) It means that the number of linearly independent columns in $U$ and in $A$ is the same.

*Since $A_j=LU_j$, a set of vectors $\{A_j\}_{j\in J}$ is linearly independent iff $\{U_j\}_{j\in J}$ is linearly independent. Let's see it for the $J=\{1,2\}$ (as in the Patrik's example). Since
$$
\begin{bmatrix}A_1 & A_2\end{bmatrix}=L\begin{bmatrix}U_1 & U_2\end{bmatrix}
$$
we have $A_1$, $A_2$ linearly independent iff $\alpha_1 A_1+\alpha_2 A_2= \begin{bmatrix}A_1 & A_2\end{bmatrix}\alpha=0$ implies $\alpha=0$, but
$$
\begin{bmatrix}A_1 & A_2\end{bmatrix}\alpha=0\quad\Leftrightarrow\quad L\begin{bmatrix}U_1 & U_2\end{bmatrix}\alpha=0\quad\Leftrightarrow\quad \begin{bmatrix}U_1 & U_2\end{bmatrix}\alpha=L^{-1}0=0.
$$
Thus linearly independent vectors take the same positions in $U$ and in $A$. (Of course, the same is true for linearly dependent vectors.)

