how to prove a spanning set of polynomial I am struggling so much understanding this concept of subspace and span.
The question is, Given that 
$P2:W=\{(x+1)(ax+b)| a,b \in R\}$
show that 
$\{x^2+x, x^2+2x+1\}$
is a spanning set of $W$.
I don't know if I got this concept right, but I've tried to do things by letting 
$p(x)=x^2+x$
$q(x)=x^2+2x+1$
then multiplying them a coefficient $\alpha$ and $\beta$ each and adding to fit in with $W$.
but then I got an answer saying $a=\alpha + \beta$, $a+b = \alpha+ 2\beta, b=\beta$, which means... no solution? I am guessing? so this does not span $W$. Am I right?
 A: $(x+1)(ax+b)=ax^2+(b+a)x+b.$
Claim: There exists  $\alpha, \beta\in \Bbb R $ such that 
$$ax^2+(b+a)x+b=\alpha(x^2+x)+\beta( x^2+2x+1)\tag1$$
$$ax^2+(b+a)x+b=(\alpha+\beta)x^2+(\alpha+2\beta)x+\beta$$
Comparing coefficients, we get 
$$a=\alpha+\beta\tag2$$
$$b+a=\alpha+2\beta\tag3$$
$$b=\beta \tag4$$
Substituting  $(4) $ in $(1) $ gives $\alpha=a-b$ (you can verify the solution using $(3)$). 
In other words, $\forall a,b\in\Bbb R $, there exists  $\alpha=a-b, \beta =b $ such that $(1) $ holds. Hence  $\{x^2+x,x^2+2x+1\} $ is indeed a spanning set. 
A: No, you are wrong. Note that$$x^2+x=(x+1)x\text{ and that }x^2+2x+1=(x+1)(x+1).$$So, both polynomails $x^2+x$ and $x^2+2x+1$ belong indeed to $W$ and therefore they span a subspace of $W$.
On the other hand, if $(x+1)(ax+b)\in W$, then\begin{align}(x+1)(ax+b)&=(a-b)(x+1)x+b(x+1)(x+1)\\&=(a-b)(x^2+x)+b(x^2+2x+1)\end{align}which belongs, of course, to $\operatorname{span}\bigl(\{x^2+x,x^2+2x+1\}\bigr)$. So, $W=\operatorname{span}\bigl(\{x^2+x,x^2+2x+1\}\bigr)$.
A: Hint:  First, $W$ is a $2$-dimensional vector space (easy to see).
Now, $\{x^2+x,x^2+2x+1\}$ is linearly independent (easy to see)
Let $a=1,b=0$.  We get $x^2+x$.  Now let $a=1,b=1$.  We get $x^2+2x+1$.  
Thus $W=\operatorname{span} \{x^2+x,x^2+2x+1\}$.
. 
