Polynomial subspace,basis and dimension I am stuck with this,any help would be appreciated
In vector space $P_{ \leq 4}$ the following set $M$ is given
$M=$ { $p \in P_{4} : p'(0)=p(1)$ , $p''(0)=2p(-1)$
Prove that $M$ is a subspace, find basis and dimension
Okay,for the subspace i need to prove that: $\alpha p$ $+ \beta g \in M$, where $\alpha,\beta \in \mathbb{R}$, and $p,g\in M$. So we have
$p'(0)=p(1), g'(0)=g(1)$
$\alpha p'$ $+$ $\beta g' (0)= \alpha p'(0)+\beta g'(0) = \alpha p(1)+\beta g(1) \in M $
Is this step correct?, and how can I find basis of this kind of polynomias? I know how to find it with any other vectors, but I'm stuck here
 A: your generic polynomial in $P_4$
$p = ax^4 + bx^3 + cx^2 + dx + e$
With restrictions: 
$p'(0) = p(1) \implies d = a+b+c+d+e\\
p''(0) = 2p(-1) \implies 2c = 2a - 2b + 2c - 2d+2e$
And from those two equations you can find a basis.
A: What you did in order to prove that $M$ is a subspace doesn't make sense. You wrote that $\alpha p(1)+\beta g(1)\in M$. How can that be? After all, $M$ is a space of polynomials, whereas $\alpha p(1)+\beta g(1)$ is a number. What must be proved here is that $p,g\in M\implies \alpha p+\beta g\in M$. So, you have to prove that if $p'(0)=p(1)$, if $g'(0)=g(1)$, if $p''(0)=2p(-1)$, and if $g''(0)=2g(-1)$, then $(\alpha p+\beta g)'(0)=(\alpha p+\beta g)(1)$ and that $(\alpha p+\beta g)''(0)=2(\alpha p+\beta g)(-1)$.
Note that if $p(x)=a_0+a_1x+a_2x^2+a_3x^3+a_4x^4$, then$$p'(0)=p(1)\iff a_1=a_0+a_1+a_2+a_3+a_4\iff a_0+a_2+a_3+a_4=0$$and that$$p''(0)=p(-1)\iff2a_2=2(a_0-a_1+a_2-a_3+a_4)\iff a_0-a_1-a_3+a_4=0.$$So, the elements of $M$ are the polynomials of the form$$-a_2-a_3-a_4+(-a_2-2a_3)x+a_2x^2+a_3x^3+a_4x^4.$$Can you take it from here?
A: To check that it is a subspace we can apply the definition for $p_1(x),p_2(x) \in M$


*

*$c_1p_1(x)+c_2p_2(x) \in M$


To find basis and dimension we have that
$$p(x)=ax^4+bx^3+cx^2+dx+e$$
and then


*

*$p'(0)=p(1) \implies d=a+b+c+d+e \implies a+b+c+e=0$

*$p''(0)=2p(-1) \implies 2c=2a-2b+2c-2d+2e \implies a-b-d+e=0$
and summing up and subtracting the equations


*

*$2a+c-d+2e=0\implies c=-2a+d-2e$

*$2b+c+d=0\implies 2b=2a-2d+2e \implies b=a-d+e$
and therefore
$$p(x)=ax^4+(a-d+e)x^3+(2a+d-2e)x^2+dx+e=\\=a(x^4+x^3-2x^2)+d(-x^3+x^2+x)+e(x^3-2x^2+1)$$
thus a basis is
$$\{(x^4+x^3-2x^2),(-x^3+x^2+x),(x^3-2x^2+1)\}$$
and the dimensiion is $3$ (indeed we had two conditions).
