Basis of $\mathcal{P}^*_5$ such that for all $p(x)\in\mathcal{P}_5$, $p(-1)=p(0)=p(1)=0$ I have been tasked with finding a basis for the space $\mathcal{P}^*_5$ of all polynomials in $x$ of degree less than or equal to $5$ such that each polynomial vanishes for $x\in\{-1,0,1\}$. We have just covered bases and dimension in my course in linear algebra.
$p(0)=0$ implies that the constant term of the polynomial must be zero. Therefore, we can write each polynomial as a linear combination of the polynomials $\{x,x^2,x^3,x^4,x^5\}$, since all of these polynomials are zero at $x=0$. Since all of these are linearly independent and span the space, it seems to me that this should be a basis of $\mathcal{P}^*_5$, and therefore $\mathcal{P}^*_5$ has dimension 5. Is this correct? If not, where am I mistaken?
Edit: After reading user113102's comment, I see that the above is not a basis, as I have neglected the other two conditions $p(1)=p(-1)=0$. Then is the set $\{x(x^2-1),x^2(x^2-1),x^3(x^2-1)\}$ a basis of $\mathcal{P^*_5}$?
 A: First of all the space of polynomials of degree $5$ or less has dimension $6$ and not $5$ and consists of the vectors of the form $ax^5+bx^4+cx^3+dx^2+ex+f$. The space $\mathcal{P}^*_5$ you are looking for is in fact the intersection of three hyperplanes of polynomials:


*

*The ones for which $p(-1) = 0$, i.e. for which $-a + b -c + d - e + f = 0$

*The ones for which $p(\;\; \, 1) = 0$,  i.e. for which $\;\;\, a + b + c + d + e + f = 0$. and

*The ones for which $p(\;\; \, 0) = 0$, i.e. for which $\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ f = 0$
Solving this system of equations gives $a + c +e = 0, b+d = 0, f = 0$ so that the polynomials of $\mathcal{P}^*_5$ are of the form $ax^5+bx^4+cx^3 -bx^2+(-a-c)x$ so you can conclude that the polynomials $x^5-x, x^3-x, x^4-x^2$ form a basis.
A: Recognizing a basis is not that hard, as what you come up is indeed a basis. The difficulty is proving. 
Any polynomial in your vector space has to be of them form $f(x) = x(x^2-1)g(x),$
where $g(x)$ is a quadratic at best. Now you need to prove that your choice of $3$ functions are linearly independent and they span your space. Equivalently, if you can argue that your vector space must have dimension $3,$ then you do not need to prove that your polynomials span, just the linear independence is needed.   
