Question:
Let $$U = \{p(x) = a(x-1) + b(x^2 + x + 1) + c(x^2 - x -1) : \text{where}\,\ a, b, c \in \mathbb{R}, -\infty < x < \infty\}$$
Is $U$ a subspace. Verify using vector addition and multiplication. If $U$ is a subspace, find a basis.
My work so far:
Checking for linear independence. $$a(x-1) + b(x^2 + x + 1) + c(x^2 - x -1)$$
After simplification, we get $$x(a+b-c) +x^2 (b+c) + (-a+b-c) = 0$$
So, $$\begin{align*} a+b-c &= 0 \\ b+c &= 0 \\ -a+b-c &= 0 \end{align*}$$
Solve this via Gaussian elimination
$$ \begin{pmatrix} 1 & 1 & -1 & 0 \\ 0 & 1 & 1 & 0 \\ -1 & 1 & -1 & 0 \end{pmatrix}$$
We get $a = b = c = 0$, so this implies that the columns are linearly independent. Because of this, we can say that that $U$ is a Subspace.
Are my reasoning and calculation correct? Want to make sure I have the right idea. Thank you. Sorry about the formatting. Hopefully, it is readable.
What you actually showed by solving that linear system is that $\{x-1, x^2 + x + 1, x^2 - x - 1\}$ is a linearly independent set. Since it also spans $U$ (by definition), we conclude that $\{x-1, x^2 + x + 1, x^2 - x - 1\}$ is a basis for $U$.
However, to show that $U$ is indeed a subspace of $\mathbb{R}^\mathbb{R}$ (the space of all functions $\mathbb{R} \to \mathbb{R}$) you should verify that $U$ is closed under linear combinations, i.e. if $p, q \in U$ and $\alpha, \beta \in \mathbb{R}$, then $\alpha p + \beta q$ should also be in $U$.
This is easy. Let
$$p(x) = a_1(x-1) + b_1(x^2 + x + 1) + c_1(x^2 - x -1)$$ $$q(x) = a_2(x-1) + b_2(x^2 + x + 1) + c_2(x^2 - x -1)$$
for some $a_1, a_2, b_1, b_2, c_1, c_2 \in \mathbb{R}$.
Then $$(\alpha p + \beta q)(x) = \underbrace{(\alpha a_1 + \beta a_2)}_{\in\mathbb{R}}(x-1) + \underbrace{(\alpha b_1 + \beta b_2)}_{\in\mathbb{R}}(x^2 + x + 1) + \underbrace{(\alpha c_1 + \beta c_2)}_{\in\mathbb{R}}(x^2 - x -1)$$
which is in $U$.
You can in fact directly see that $U$ is a subspace by noting that $$U = \operatorname{span}\{x-1, x^2 + x + 1, x^2 - x - 1\}$$
because a linear span of some set is always a subspace. Linear independence is not necessary for this conclusion, though. You only need it later to show that $\{x-1, x^2 + x + 1, x^2 - x - 1\}$ is indeed a basis for $U$.