Equivalent basis of a subspace How to check whether two sets of vectors $\left\{ \begin{array}{cccc}
v_{1} & v_{2} & \cdots & v_{m}\end{array}\right\} $ and $\left\{ \begin{array}{cccc}
u_{1} & u_{2} & \cdots & u_{m}\end{array}\right\}$ where $v_{i},u_{i}\in R^{n}$
 are the basis of the same subspace of dim m?
 A: Check that the the $v_k$ are linearly independent and that each $v_k$ can be written in terms of the $u_i$. (Or the other way around, with $u,v$ interchanged.)
That is, check that if $\sum_k\alpha_kv_k = 0$ then $\alpha_k = 0$.
And check that for each $k$, there are constants $\beta_i$ such that $v_k = \sum_i \beta_i u_i $.
A: For any $\;i=1,2,\ldots,m\;$ , it must be that
$$v_i\in\text{Span}\{u_1,u_2,\ldots,u_m\}$$
and the other way around.
A: The other answers have mentioned the theoretical implications of what it means for both sets of vectors to span the same subspace. However, I'm guessing you're looking for how to efficiently compute to determine the answer to such a question.
Suppose you have two sets of vectors $\{u_1, \ldots, u_n\}$ and $\{v_1, \ldots, v_m\}$, each subsets of $\mathbb{R}^d$. The question is to determine whether or not $\mathrm{span}\{u_i\} = \mathrm{span}\{v_i\}$. First, construct an augmented matrix of size $d \times (n+m)$ of the form:
$$ [U \, | \,  V]  = [ u_1 \ldots u_n | v_1 \ldots v_m]$$
Now, proceed by Gaussian elimination, using row operations, so that the left-hand side of the augmented matrix is in echelon form (upper triangular). In other words, use row operations such that you obtain the augmented matrix
$$ [R \, | \, \tilde{V} ]$$
where $R$ is the upper triangular echelon form row equivalent to $U$, and $\tilde{V}$ is the altered form of $V$ after the row operations that you did to turn $U$ into $R$. Now, consider any rows of $R$ containing all zeros. If the corresponding row in $\tilde{V}$ is not all zeros as well, then you can conclude that $\mathrm{span}\{u_i\} \neq \mathrm{span}\{v_i\}$. If this test fails, then you have concluded that $\mathrm{span}\{v_i\} \subseteq \mathrm{span}\{u_i\}$.
What remains is to determine whether in fact $\mathrm{span}\{u_i\} = \mathrm{span}\{v_i\}$. All know currently is that the second subspace is contained in the first. So all that one must do is check whether their dimensions are equal. This can be done by first counting the number of pivots (nonzero rows) of $R$ (which you have already computed). Now, use Gaussian elimination on $V$ and count the number of resulting pivots there, and check if those quantities are the same.
