Given two sets:$S\_1=\{(1,-2,1,0),(0,5,-2,1),(2,1,0,1)\},S\_2=\{(3,-1,1,1),(1,3,-1,1)\}$. Check if $S\_1$ and $S\_2$ span the same subspace of the vector space $\mathbb R^4$.

Rank of a matrix formed of vectors in $S\_1$ and $S\_2$ is $2$.

**Question**: Does this mean that $S\_1$ and $S\_2$ span $\mathbb R^2$?

From the row echelon form of a matrix formed of vectors in $S\_1$, we can see that $span(S\_1)=span\{(1,-2,1,0),(0,5,-2,1)\}$ (third vector is dependent).

Now $$span(S\_1)=\{c\_1(1,-2,1,0)+c\_2(0,5,-2,1):c\_1,c\_2\in\mathbb R\}=\{(c\_1,-2c\_1+5c\_2,c\_1-2c\_2,c\_2):c\_1,c\_2\in\mathbb R\}$$

From the row echelon form of a matrix formed of vectors in $S\_2$, we can see that $$span(S\_2)=\{c\_3(3,-1,1,1)+c\_4(1,3,-1,1):c\_3,c\_4\in\mathbb R\}=\{(3c\_3+c\_4,-c\_3+3c\_4,c\_3-c\_4,c\_3+c\_4):c\_3,c\_4\in\mathbb R\}$$

What confuse me is that from the rank of matrices formed from $S\_1$ and $S\_2$ we get that they span $\mathbb R^2$, but when forming linear combinations we see that they span **different** subspaces of $\mathbb R^4$.

So, finding the matrix ranks gives false answer?