Hint:
Te first step is to determine if the given subset is really a vector space, this means that it have to be closed under the addition and the scalar product, and contains the zero vector and the opposite of his elements.
Than, to find his dimension, we have to find a basis for this subspace, and the number of vectors in this basis is the dimension. The way to do this is, in general, different, for different vector spaces.
As an example, for your case $V_1$, we can see that any diagonal matrix can be expressed as:
$$
\begin{bmatrix}
a&0&0\\
0&b&0\\
0&0&c
\end{bmatrix}=
a\begin{bmatrix}
1&0&0\\
0&0&0\\
0&0&0
\end{bmatrix}
+b\begin{bmatrix}
0&0&0\\
0&1&0\\
0&0&0
\end{bmatrix}
+c\begin{bmatrix}
0&0&0\\
0&0&0\\
0&0&1
\end{bmatrix}=
ae_{11}+be_{22}+ce_{33}
$$
where the three matrices $e_{11},e_{22},e_{33}$ on LHS are linearly independent, so the dimension of $V_1$ is $3$.
Can you do something similar for the other cases?
Note that in the example the kay fact is that three matrices that are a basis for the space $V_1$, and, by definition, the dimension of a vector space is the cardinality of a basis.
The comment of @Abstraction points out that a vector space is well defined only if we specifies not only the set of vectors (the set $V_1$ in this case) but also the field of scalars used for the scalar product. So, as an example the set of complex numbers $\mathbb{C}$ can be seen as a vector space over the field $\mathbb{C}$, and in this case it has dimension $1$, or over the field $\mathbb{R}$, and in this case has dimension $2$ or over $\mathbb{Q}$ and in this case his dimension is uncountably infinite. Anyway the given definition of dimension is the same: the cardinality of a basis. And I suppose thet the OP refers to the simpler and common case of vector spaces over $\mathbb{R}$.
For $V_2$, as another example, we can easily see that a basis for lower triangular matrices on $M_3(\mathbb{R})$ is:
$$
\begin{bmatrix}
1&0&0\\
0&0&0\\
0&0&0
\end{bmatrix}
\quad
\begin{bmatrix}
0&0&0\\
1&0&0\\
0&0&0
\end{bmatrix}
\quad \begin{bmatrix}
0&0&0\\
0&1&0\\
0&0&0
\end{bmatrix}
\quad
\begin{bmatrix}
0&0&0\\
0&0&0\\
1&0&0
\end{bmatrix}
\quad\begin{bmatrix}
0&0&0\\
0&0&0\\
0&1&0
\end{bmatrix}
\quad
\begin{bmatrix}
0&0&0\\
0&0&0\\
0&0&1
\end{bmatrix}
$$
and this means that the dimension of $V_2$ is $6$
In a similar way, a basis for $V_3$ is done by the monomials $\{1\},\{x^3\}$, so the dimension of $V_3$ is $2$.
For $V_4$ note that a polynomial of $P_3$ such that $p(1)=0$ has the form: $(x-1)(ax^2+bx+c)=ax^3+b(x^2-x)+c(x-1)$ and, since $x^3,(x^2-x),(x-1)$ are linearly independent they form a basis of $V_4$ and its dimension is $3$.
Specifically for the case that the field $F$ is a subfield of the field $S$, and we're comparing $F^n$ to $S^n$, any basis of $F^n$ is also a basis of $S^n$.
To show this, it's enough to show that any basis of $F^n$ spans $S^n$. (Then it's a basis by a dimension argument.) We can do so by working through the standard basis $\{\vec e^1, \vec e^2, \dots, \vec e^n\}$: these vectors are contained in both $F^n$ and $S^n$ since both $F$ and $S$ contain $0$ and $1$.
- If we're given a basis of $F^n$, then we can express each $\vec e^i$ as an $F$-linear combination of vectors of that basis.
- We can express each element of $S^n$ as an $S$-linear combination of vectors in the standard basis: $(s_1, \dots, s_n) = s_1 \vec e^1 + \dots + s_n \vec e^n$.
- Putting these together, we can express each element of $S^n$ as an $S$-linear combination of vectors in the basis of $F^n$ we started with.
But your argument is not valid: in particular, you're claiming that every element of $S^n$ is an $F$-linear combination of vectors in the basis of $F^n$, which is false. (Any element of $S^n$ that is not in $F^n$ is a counterexample.)
Also, you shouldn't say "$S^n$ has the same basis as $F^n$" because both $F^n$ and $S^n$ have many different bases. You're making it sound like there is only one basis, and it is the same for both.
Best Answer
Hint: Vector subspaces are closed under multiplication by scalars. If $v$ is a non-zero element of $V$, can you produce any other element of $V$ through multiplication by a scalar?