In each of the following find the dimension of the subspace of $P_3$ spanned by the given vectors.
$(a)\quad x,x-1,x^2+1$
$(b)\quad x,x-1,x^2+1,x^2-1$
Dimension is the number of vectors in any basis for the space to be spanned.
Rank of a matrix is the dimension of the column space
$(A)$
$$ \begin{bmatrix} 0 & -1 & 1 \\ 1 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} =^{rref} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} $$
My questions is does this matrix have a dimension of $3$ and rank $3$. Or a Rank $2$ with dimension $2$?
$(B)$
$$ \begin{bmatrix} 0 & 0 & 1&1 \\ 1 & 1 & 0 &0\\ 0 & -1 & 1&-1 \\ \end{bmatrix} =^{rref} \begin{bmatrix} 1 & 0 & 0&-2 \\ 0 & 1 & 0&2 \\ 0 & 0 & 1&1 \\ \end{bmatrix} $$
My question remains the same, I think this matrix has a dimension of $3$ and a rank of $3$. However, I am not too confident that this is correct.The number of pivots decides the dimension. I just need some confirmation that my work is correct.