Subspace spanned by polynomials I have to find which subspace of $\mathcal{P}_{2}(\mathbb{R})$ is spanned by $S$ where
$$S=[2x+2,-x^2+x+3,x^2+2x]$$
If $p(x)\in S$ then for $a,b,c\in\mathbb{R}$, we have
$$p(x)=a(2x+2)+b(-x^2+x+3)+c(x^2+2x)$$
$$p(x)=(-b+c)x^2+(2a+b+2c)x+(2a+3b)$$
and since
$$\begin{array}{l} -b+c=\alpha \\ 2a+b+2c=\beta \\ 2a+3b=\gamma\end{array}$$
with $\alpha,\beta,\gamma\in\mathbb{R}$, therefore
$$p(x)=\alpha x^2+\beta x+\gamma$$
Then
$$[S]=\mathcal{P}_{2}(\mathbb{R})$$
Is it correct?
 A: If you identify a quadratic polynomial $ax^2 + b x + c$ with a row vector $(a, b,c)$, then finding a basis for the span of $S = \{2x+2,-x^2+x+3,x^2+2x\}$ amounts to finding a basis for the row space of the matrix
$$
M = \pmatrix{0 & 2 & 2 \\ -1 & 1 & 3 \\ 1 & 2 & 0}
$$
which you can do using Gaussian elimination. I will leave you to work out the details using matrix notation.  You can also work directly with the polynomials themselves, viewing the Gaussian elimination steps as a way of replacing one spanning set by a simpler one (and throwing out any zero polynomials that occur):
\begin{align}
\{2x+2,-x^2+x+3,x^2+2x\} &\mapsto \{2x + 2, 3x + 3, x^2 + 2x\} \\
   &\mapsto \{x + 1, 3x + 3, x^2 + 2x\} \\
   &\mapsto \{x + 1, x + 1, x^2 + 2x\} \\
   &\mapsto \{x + 1, x^2 + 2x\} \\
\end{align}
The two polynomials I've ended up with are clearly linearly independent and hence are a basis for the span of $S$. I've given each of the individual elimination steps above, but left it to you to work out what I did in each step, e.g., the first step replaces $-x^2 + x + 3$, by $(-x^2 + x + 3) + (x^2 + 2x)$.
