Find $a_1,a_2,a_3\in\mathbb{R}$ such that vectors $e_i=(x-a_i)^2,i=1,2,3$ form a basis for $\mathcal{P_2}$ (space of polynomials)
Attempt:
$e_1= \begin{bmatrix} 1 \\ -2a_1 \\ a_1^{2} \\ \end{bmatrix}$
$e_2= \begin{bmatrix} 1 \\ -2a_2 \\ a_2^{2} \\ \end{bmatrix}$
$e_3= \begin{bmatrix} 1 \\ -2a_3 \\ a_3^{2} \\ \end{bmatrix}$
Matrix of column vectors $e_i$ is $A= \begin{bmatrix} 1 & 1 & 1 \\ -2a_1 & -2a_2^2 & -2a_3^2 \\ a_1^2 & a_2^2 & a_3^2 \\ \end{bmatrix}$
$A$ must be invertible $\Rightarrow \det(A)\neq 0$
$\det(A)=-2(a_2a_3^2-a_2^2a_3-a_1a_3^2+a_1^2a_3+a_1a_2^2-a_1^2a_2)$
Question: How to factorize this function to get the conditions for $a_1,a_2,a_3$?
Every vector $e_i$ can be written as a linear comination of $e_i\Rightarrow e_i$ span $\mathcal{P_2}$
If $A$ is invertible, $e_i$ are linearly independent.
From the span and linear independence, set of $e_i$ form a basis for $\mathcal{P_2}$.