[Math] Show that the following polynomials form a basis for $P_2$

linear algebrapolynomialsspan

Show that the following polynomials form a basis for $P_2$.
$$x^2+1, \ x^2-1, \ 2x-1$$

Is my approach correct? To check if the set is linearly independent I took $x^2$, $x$, $x^0$ to be $K$ values, put their coefficients in a gaussian problem and checked if all $k$s are $0$ like this:

1 0  1 = 0

1 0 -1 = 0

0 2 -1 = 0

After solving this, all $k$s $= 0$, therefore linearly independent.

To span $P_2$ there needs to be $3$ equations, one for $x^0$, $x$, $x^2$, and that is the case, therefore it spans.

These two prove it's a basis. Did I do everything correctly?

Best Answer

You can consider the matrix generated by the tuples $(-1,2,0),~(-1,0,1)~\mbox{and}~(1,0,1)$. If the Determinant of the matrix is nonzero, the three vectors are linearly independent.

$\det\left(\begin{array}{ccc}-1&2&0\\-1&0&1\\1&0&1\end{array}\right)=4$

Now, $P^2$ has dimension $3$, and those three vectors form a base for $P^2$ because of definition.