# The difference in finding a basis for the range of a matrix when using the columns versus the rows confuses me

Let $$\{a_1,..,a_n\}$$ be a set of vectors in $$\mathbb{R}^m$$.

In a first semester linear algebra course, two different but similar methods are introduced in order to find a basis for $$span\{a_1,..,a_n\}$$

Method 1: Consider $$\{a_1,..,a_n\}$$ as the rows of a matrix $$A$$ and reduce this matrix to echelon form, denoted $$B$$. Then the nonzero rows of $$B$$ will be a basis for $$span\{a_1,..,a_n\}$$

Method 2: Consider $$\{a_1,..,a_n\}$$ as the columns of a matrix $$A$$ and reduce this matrix to echelon form, denoted $$B$$. Then the columns of $$A$$ that correspond to the columns of $$B$$ that contain pivot positions form a basis for $$span\{a_1,..,a_n\}$$

I have two questions.

My first question is when using method $$2$$, wouldn't the columns of $$B$$ that contain pivot positions be a basis for $$span\{a_1,..,a_n\}$$? If so, why is this method presented as being dependent on going back to the columns of $$A$$?

My second question is, when using method $$1$$, would it be possible to use the rows of $$A$$ that correspond to rows of $$B$$ containing pivot positions to find a basis for $$span\{a_1,..,a_n\}$$? I suspect not. But what if we would have used column operations instead?

Anyway, I'm also just looking into general insight into understanding what is going on here, but my two questions would be a great place to start.

Thank goodness for MSE!!

Elementary row operations do not change the row space of $$A$$. However, they can change the column space without altering the dependency of the columns. Meaning that if $$\vec{v}_1,\vec{v}_2,\dots,\vec{v}_n$$ are column vectors of $$A$$ and let $$R$$ be a row equivalent matrix to $$A$$ having column vectors $$\vec{u}_1,\vec{u}_2,\dots,\vec{u}_n$$ you can prove that the equation $$k_1\vec{v}_1,k_2\vec{v}_2,\dots,k_n\vec{v}_n = 0$$ has the same solutions as $$k_1\vec{u}_1,k_2\vec{u}_2,\dots,k_n\vec{u}_n = 0$$. It then follows that a set of columns of $$A$$ are linearly independent iff the corresponding columns of $$R$$ are linearly independent.
Note that method 2 is beneficial if you also need to express the dependent vectors in the set as a linear combination of the basis vectors. Since the dependency between the columns is the same, you can solve the system using $$R$$(usually easier to compute) and the solution of scalars $$\vec{k}$$ is also the solution for the same system in $$A$$.