We have the matrix $X = \begin{bmatrix} 2 & 0 & -1 & 1 \\ 0 & 0 & 1 & 1 \\ 1 & 0 & 0 & 1 \\ -1 & x & 2 & 1 \end{bmatrix}$
We want to find a basis for the row space, column space and null space of $X$ for values of $x \in \mathbb{R}$. What I did is put the matrix in rref, but I had to do it twice: once for $x=0$, once for $x \neq 0$.
$x=0 \implies $ $\text{rref}(X) = \begin{bmatrix} 1 & 0 & 0 & 1 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix}$
$x \neq 0 \implies$ $\text{rref}(X) = \begin{bmatrix} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{bmatrix}$
And from there, we can find the row space (the above two rows of the rref if $x=0$ and the above three of the rref is $x \neq 0$). Then the column spaec is column 1 and column 3 of $X$ if $x=0$ and column 1,2,3 of $X$ if $x \neq 0$.
I'm wondering if my ideas here are correct. I separated the problem into two cases, $x=0$ and $x \neq 0$, because to get the rref of $X$ I had to divide by $x$ at one point in a row operation. So I had to obtain the rref twice. If this is correct, is this also the best way of solving this problem, or can we do it in an easier way?