# Thread: Spanning sets, linear independence and bases

1. ## Spanning sets, linear independence and bases

PROBLEM
Let B = {1,−1 + x,1 + x^2}
(a) Show that B is a basis for P2.
(b) Find the coordinates for p(x) = a + bx + cx^2 with respect to the basis B.
(c) Hence write down the coordinates, with respect to B, for q(x) = 3 − 4x^2 and r(x) = 4 − x + 2x^2

ATTEMPT AT SOLUTION
(a) B as a matrix: $\begin{bmatrix} 1 & 0 & 0 \\ -1 & 1 & 0 \\ 1 & 0 & 1 \end{bmatrix}$ which row-reduces to $\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
Each row has a leading entry, so B is linearly independent and thus is a basis for P2. Also, B has 3 polynomials and the dimension of P2 is 3, so B spans P2

(b) I know this is incorrect, but I got:
p(x) = a(1,0,0) + b(-1,1,0) + c(1,0,1)
a=b=c=1 (from (a))
Therefore $p(x) = 1 + x + x^2$

(c) No idea?

2. Originally Posted by iExcavate
PROBLEM
Let B = {1,−1 + x,1 + x^2}
(a) Show that B is a basis for P2.
(b) Find the coordinates for p(x) = a + bx + cx^2 with respect to the basis B.
(c) Hence write down the coordinates, with respect to B, for q(x) = 3 − 4x^2 and r(x) = 4 − x + 2x^2

ATTEMPT AT SOLUTION
(a) B as a matrix: $\begin{bmatrix} 1 & 0 & 0 \\ -1 & 1 & 0 \\ 1 & 0 & 1 \end{bmatrix}$ which row-reduces to $\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$
Each row has a leading entry, so B is linearly independent and thus is a basis for P2. Also, B has 3 polynomials and the dimension of P2 is 3, so B spans P2
Good! A more fundamental approach, using the definition of "linearly independent"- suppose a(1)+ b(-1+ x)+ c(1+ x^2)= 0 for all x. Taking x= 0, a(1)+ b(-1)+ c(1)= a- b+ c= 0. Taking x= 1, a(1)+ b(0)+ c(2)= a+ 2c= 0. Taking x= -1, a(1)+ b(-2)+ c(2)= a- 2b- 2c= 0. Subtracting the second equation from the first eliminates a: - b- c= 0. Subtracting the third equation from the first b+ 3c= 0. Adding those two equations, 2c= 0 so c= 0 and then b= a= 0.

Do you have the theorem that "any linearly independent set containing a number of vectors equal to the dimension of the space is a basis" and that the dimension of P2 is 2? If so, then yes, showing that those three vectors are independent show this is a basis. If not, then you should show that for any a, b, c, there exist $\alpha$, $\beta$, $\gamma$ such that $\alpha(1)+ \beta(-1+ x)+ \gamma(1+ x^2)= a+ bx+ cx^2$. That's, fairly easy- just solve for $\alpha$, $\beta$, and $\gamma$.

(b) I know this is incorrect, but I got:
p(x) = a(1,0,0) + b(-1,1,0) + c(1,0,1)
a=b=c=1 (from (a))
Therefore $p(x) = 1 + x + x^2$
No, your "vector" is a+ b+ cx^2 for any a, b, c- you can't just make a= b= c= 1. Your coefficients must be in terms of a, b, and c- just what I said in my last sentence above! Find $\alpha$, $\beta$, $\gamma$ such that $\alpha(1)+ \beta(-1+ x)+ \gamma(1+ x^2)= a+ bx+ cx^2$, for all x.

One way to do this is to equate like coefficients. Multiplying out the left side, $\alpha- \beta+ \beta x+ \gamma+ \gamma x^2= (\alpha- \beta+ \gamma)+ \beta x+ \gamma x^2= a+ bx+ c$ for all x so we must have $\alpha+ \beta+ \gamma= a$, $\beta= b$ and $\gamma= c$. Putting those into the first equation, $\alpha- b+ c= a$ so $\alpha= a+ b- c$:
$a+ b + cx^2= (a+ b- c)+ b(-1+ x)+ c(1+ x^2)$.

(c) No idea?

Use the answer to (b) to write out $3- 4x^2= \alpha(1)+ \beta(-1+ x)+ \gamma(1+ x^2$ and then $4- x+ 2x^2= \alpha(1)+ \beta(-1+ x)+ \gamma(1+ x^2$. The "coordinates" of each are the number $\alpha$, $\beta$, and $\gamma$