# The linear span

### Polynomials[edit]

Let *K* be **R**, **C**, or any field, and let *V* be the set *P* of all polynomials with coefficients taken from the field *K*. Consider the vectors (polynomials) *p*_{1} := 1, *p*_{2} := *x* + 1, and *p*_{3} := *x*^{2} + *x* + 1.

Is the polynomial *x*^{2} − 1 a linear combination of *p*_{1}, *p*_{2}, and *p*_{3}? To find out, consider an arbitrary linear combination of these vectors and try to see when it equals the desired vector *x*^{2} − 1. Picking arbitrary coefficients *a*_{1}, *a*_{2}, and *a*_{3}, we want{\displaystyle a_{1}(1)+a_{2}(x+1)+a_{3}(x^{2}+x+1)=x^{2}-1.\,}

Multiplying the polynomials out, this means{\displaystyle (a_{1})+(a_{2}x+a_{2})+(a_{3}x^{2}+a_{3}x+a_{3})=x^{2}-1\,}

and collecting like powers of *x*, we get{\displaystyle a_{3}x^{2}+(a_{2}+a_{3})x+(a_{1}+a_{2}+a_{3})=1x^{2}+0x+(-1).\,}

Two polynomials are equal if and only if their corresponding coefficients are equal, so we can conclude{\displaystyle a_{3}=1,\quad a_{2}+a_{3}=0,\quad a_{1}+a_{2}+a_{3}=-1.\,}

This system of linear equations can easily be solved. First, the first equation simply says that *a*_{3} is 1. Knowing that, we can solve the second equation for *a*_{2}, which comes out to −1. Finally, the last equation tells us that *a*_{1} is also −1. Therefore, the only possible way to get a linear combination is with these coefficients. Indeed,{\displaystyle x^{2}-1=-1-(x+1)+(x^{2}+x+1)=-p_{1}-p_{2}+p_{3}\,}

so *x*^{2} − 1 *is* a linear combination of *p*_{1}, *p*_{2}, and *p*_{3}.

On the other hand, what about the polynomial *x*^{3} − 1? If we try to make this vector a linear combination of *p*_{1}, *p*_{2}, and *p*_{3}, then following the same process as before, we’ll get the equation{\displaystyle 0x^{3}+a_{3}x^{2}+(a_{2}+a_{3})x+(a_{1}+a_{2}+a_{3})\,}

{\displaystyle =1x^{3}+0x^{2}+0x+(-1).\,}

However, when we set corresponding coefficients equal in this case, the equation for *x*^{3} is{\displaystyle 0=1\,}

which is always false. Therefore, there is no way for this to work, and *x*^{3} − 1 is *not* a linear combination of *p*_{1}, *p*_{2}, and *p*_{3}.