How to find the basis of vector spaces, and their dimensions. I have doubts when calculating the dimension of the following vector spaces and subspaces, since I do not know how I can find a basis for each of them. If you can help me find your bases and dimension I will be very grateful, since I am completely lost. 
They are:
1) $C^1[-1,1]$. (Space of continuous and derivable functions only once in the closed interval [-1,1]).
2) $D=\{f \in C^1[-1, 1]:f(x) - xf'(x) = 0\}$. ($D$ is a subspace of 1))
3) $S=\{f \in C^1[-1, 1]:f(-1) =f(1)\}$. ($S$ is a subspace of 1))
 A: $C^1$ does not mean "differentiable function only once". It means a function has continuous first derivative. See for instance: https://en.wikipedia.org/wiki/Function_space#Functional_analysis.


*

*For the first one, consider the polynomials $p_n(x)=x^n$. 

*For the second one, do you know how to solve the differential equation?

*Consider $p_m(x)=x^{2m}$.

A: $\newcommand{\Reals}{\mathbf{R}}\newcommand{\Seq}[1]{\mathbf{#1}}$Judging from the comments, it seems to me that you're struggling not with this particular question, but with some of the underlying ideas.
By way of analogy, consider the vector space $V$ of all real sequences $\Seq{a} = (a_{k})_{k=0}^{\infty}$, and the subspaces


*

*$D = \{\Seq{a} \in V : \text{$a_{k+1} = a_{k}$ for all $k \geq 0$}\} \subset V$,

*$S = \{\Seq{a} \in V : a_{0} = a_{1}\} \subset V$.
The space $D$, which consists of all constant sequences, is one-dimensional, with the constant sequence $(1, 1, 1, \dots)$ as basis.
Each of the spaces $V$ and $S$ is infinite-dimensional: the infinite, linearly-independent (ordered) set $(\mathbf{e}_{k})_{k=2}^{\infty}$ of "standard basis sequences" is in each of $V$ and $S$.
The quotient $V/S$ is finite-dimensional. To prove this, it suffices to find a finite-dimensional vector space $W$ and surjective linear map $\Pi:V \to W$ with $\ker(\Pi) = S$.
Here, a natural approach is to define $\Pi:V \to \Reals$ by $\Pi(\Seq{a}) = a_{0} - a_{1}$. If $a$ is a real number and $\Seq{a} = (a, 0, 0, \dots)$, then $\Pi(\Seq{a}) = a$, so $\Pi$ is surjective. Further, $\Pi(\Seq{a}) = 0$ if and only if $a_{0} - a_{1} = 0$, i.e., $a_{0} = a_{1}$, so $\ker(\Pi) = S$. It follows that, as real vector spaces, $V/S \simeq \Reals$.
