<s>[INST] Dimension of the spanned subspace Let $a,b\in \mathbb{R}.$ Determine the dimension of the subspace of $\mathbb{R}^5$ generated by the following vectors.
$$\begin{pmatrix} 1\\2\\1\\2\\0 \end{pmatrix}, \begin{pmatrix} 2\\5\\1\\3\\1 \end{pmatrix}, \begin{pmatrix} 5\\8\\3\\6\\2 \end{pmatrix}, \begin{pmatrix} 2\\1\\1\\1\\1 \end{pmatrix}, \begin{pmatrix} 0\\2a-b+2\\-a+b-1\\-a+2b-1\\3a-2b \end{pmatrix}.$$
My stategy is to construct the matrix
\begin{pmatrix}
  1 & 2 & 5 &2 &0\\
  2 & 5 & 8 &1 &2a-b+2\\
  1& 1 & 3 &1 &-a+b-1\\
  2 & 3 & 6 &1 &-a+2b-1\\
  0 &1 &2 &1 &3a-2b
\end{pmatrix}
and compute its rank by row reduction. Since the rank of the matrix above should be equal to the dimension of its column space, then in theory this computation should give the dimension of the subspace being asked. Is my strategy correct?
 [/INST] Yes, it is, that is the quickest/most common method to compute the dimension of the subspace generated by those vectors :)
</s>