Range Space of matrix

If a matrix A has a dimension of m, then why will the first m columns of the matrix be the basis of range space of the matrix? Moreover, what is meant by basis? (This is not a homework question. My book always first finds the dimension of the matrix then jumps to the range space without explaining why the range space has to do anything with the number of non-zero rows)

• The definition of dimension is the number of elements in a basis, the definition of a basis is a linearly independent spanning set. – Quality Nov 13 '16 at 7:01

You can think of a matrix as a linear transformation $T$ between vector spaces given by $T(x) = Ax$. By a basis they mean a basis for the vector space which is the domain of $T$. The range space of a matrix is the vector space generated by its columns. (taking the columns as vectors). So the range space is generated by the set of linearly independent columns of $A$. If there are $m$, then we have a basis of $m$ elements for the range space and hence the range space has dimesion $m$. Also in finite dimension it is equivalent to have $m$ linearly independent rows and $m$ linearly independent columns. I hope you understand it better now. I believe Friedberg's book on linear algebra explains everything pretty well.