<s>[INST] Find a basis for the range of a transformation Supposed $T(v) = Av$ and say I have a matrix like this:
$$\begin{bmatrix} 1 & 2 & -2 \\ 2 & -1 & 0 \\ 1 & 7 & -6 \end{bmatrix}$$
and I want to find the basis for the range.
Is this right?
$$\begin{bmatrix} 1 & 2 & -2 \\ 2 & -1 & 0 \\ 1 & 7 & 6 \end{bmatrix}$$
$$\begin{bmatrix} 1 & 2 & -2 \\ 0 & -5 & 4 \\ 0 & 5 & -4 \end{bmatrix}$$
$$\begin{bmatrix} 1 & 2 & -2 \\ 0 & 1 & \frac{-4}{5} \\ 0 & 0 & 0 \end{bmatrix}$$
$$\begin{bmatrix} 1 & 0 & \frac{-2}{5} \\ 0 & 1 & \frac{-4}{5} \\ 0 & 0 & 0 \end{bmatrix}$$
question, how do you know the first two columns are linearly independent? In short, why does then taking the first two columns from the original matrix the basis for the range of T?
The basis I think is: $(\begin{bmatrix} 1 & 2 & 1 \end{bmatrix}, \begin{bmatrix} 2 & -1 & 7 \end{bmatrix})$. Is this right? 
Most importantly, how do you know the first two rows in the reduced row form are linearly independent?
 [/INST] Your reasoning is sound. Elementary row operations don't chance the linearly independentness of columns, so from the reduced row echelon form you arrived at you can see the two first columns are linearly independent, while the third can (allegedly)  be written as a sum of the two first. In the original matrix then $\begin{bmatrix} 1 \\ 2 \\ 1\end{bmatrix}$ and $\begin{bmatrix} 2 \\ -1 \\ 7\end{bmatrix}$ must be linearly independent.
These vectors are in the range of $T$ since $$\begin{bmatrix} 1 & 2 & -1 \\ 2 & -1 & 0  \\ 1 & 7 & 6 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \\ 0\end{bmatrix} = \begin{bmatrix} 1 \\ 2 \\ 1\end{bmatrix}$$
and 
$$\begin{bmatrix} 1 & 2 & -1 \\ 2 & -1 & 0  \\ 1 & 7 & 6 \end{bmatrix} \begin{bmatrix} 0 \\ 1 \\ 0\end{bmatrix} = \begin{bmatrix} 2 \\ -1 \\ 7\end{bmatrix}$$
So since we know the range is 2-dimensional they must span the range.
That being said, there is a small mistake in your calculation as the original matrix is invertible.
</s>