# Decide if each is a basis for $P_2$. (a) $(x^2 + x - 1, 2x + 1, 2x - 1)$

I'm using Linear Algebra by Jim Hefferon (freely available, links below with solution).

I'm having trouble understanding Exercise 1.18 on page 117.

1.18 Decide if each is a basis for $P_2$. (a) $(x^2 + x - 1, 2x + 1, 2x - 1)$

First, I try to prove that it spans $P_2$ $(ax^2 + bx + c)$. However, I do not understand how to set up the matrix. I usually do not have any trouble when there are column vectors given to me and I simply have to row-reduce using Gauss' Method, however whenever given equations with variables I have trouble.

Can someone walk through this step by step? That would be really helpful. I'm trying to teach myself Linear Algebra so there may be many missing gaps of knowledge.

• Add and subtract $2x+1$ and $2x-1$ to get $4x$ and $2$. Then you can use these two and $x^{2}+x-1$ to get $x^{2}$. Then you can trivially write anything in $P_2$ in terms of these functions. – DisintegratingByParts Aug 20 '15 at 1:16

Take an arbitrary vector in $P_2$, say $ax^2 + b + c$. We want to prove/disprove the existence of $\lambda_1, \lambda_2, \lambda_3$ such that $$\lambda_1(x^2+x-1) + \lambda_2(2x+1) + \lambda_3(2x-1) = ax^2 + bx + c.$$ Since polynomials are identically 0 if and only if all the coefficients are 0, we can do the 'coefficient comparison' method to find the $\lambda$'s. First, expand the left side of the equation as: $$\lambda_1 x^2 + (\lambda_1 + 2\lambda_2 + 2\lambda_3)x + (-\lambda_1 + \lambda_2 - \lambda_3).$$ We can set up a system of equations (I believe the answer key has an error in the third equation): \begin{align} \lambda_1 &= a \\ \lambda_1 + 2\lambda_2 + 2\lambda_3 &= b \\ -\lambda_1 + \lambda_2 - \lambda_3 &= c. \end{align} Plugging the result from the first equation into the others and multiplying the last equation by 2, \begin{align} 2\lambda_2 + 2\lambda_3 &= b - a \\ 2\lambda_2 - 2\lambda_3 &= 2c + 2a. \end{align} Adding and subtracting, we get $\lambda_2 = \frac{1}{4}(a + b + 2c)$ and $\lambda_3 = \frac{1}{4}(b - 2c - 3a)$. This completes a constructive proof of spanning.

Linear independence follows almost immediately from this -- recall from HS algebra that a system of equations either has 0, 1, or infinitely many solutions. Since for any polynomial we can find exactly one 3-tuple of coordinates, the system is independent. This can be more explictly shown by taking $a = b = c = 0$ and verifying that $\lambda_1 = \lambda_2 = \lambda_3 = 0$ is the unique solution with the expressions found previously. A good take-away from this exercise is the nice relationship between the solutions to the 'spanning problem' and linear independence.

• Awesome! This makes perfect sense! (especially the answer key being wrong really threw things off). However an additional question I have is: in P2, all vectors are in the form (ax^2, bx, c). However, when we set up the system of equations, why can we subtract one linear system with another when one is in lets say (ax^2) and the other one is in (bx) or c. Sorry if this is a bit unclear. – Zoub Aug 20 '15 at 0:55

First, set up the matrix so that every row is a vector. eg, $$\begin{bmatrix}x^2 & x & -1 \\0 & 2x & 1 \\ 0 & 2x & -1 \end{bmatrix}$$

if you want to, you can simply represent the variables in a "normalized" basis by simply deciding that $\bar b_1 = x^2$. You can now use a "change of basis" from $\bar b_n$ to $\bar e_n$.

Then, row reduce and determine the linear independence.

If you prefer column vectors, the question is equivalent to

Decide if $$\left\{ \begin{bmatrix} 1 \\ 1 \\ -1 \\ \end{bmatrix} , \begin{bmatrix} 0 \\ 2 \\ 1 \\ \end{bmatrix} , \begin{bmatrix} 0 \\ 2 \\ -1 \\ \end{bmatrix} \right\}$$ is a basis for $\mathbb{R}^3$.

The coefficients of the polynomials determine the vectors. (Assuming $\mathbb{R}$ is the underlying field.)

The equivalence is because $$\begin{bmatrix} a \\ b \\ c \end{bmatrix} = d_1 \begin{bmatrix} 1 \\ 1 \\ -1 \\ \end{bmatrix} +d_2 \begin{bmatrix} 0 \\ 2 \\ 1 \\ \end{bmatrix} +d_3 \begin{bmatrix} 0 \\ 2 \\ -1 \\ \end{bmatrix}$$ holds if and only if $$ax^2+bx+c = d_1 (x^2+x-1)+d_2 (2x+1)+d_3 (2x-1)$$ for scalars $d_1$, $d_2$, and $d_3$ (by equating coefficients).

This is equivalent to

Do the columns of $$\begin{bmatrix} 1 & 0 & 0 \\ 1 & 2 & 2 \\ -1 & 1 & -1 \\ \end{bmatrix}$$ form a basis of $\mathbb{R}^3$?

Your question indicates you can handle things from here.

• Yes this makes sense thank you! An additional question I have is: in P2, all vectors are in the form (ax^2, bx, c). However, when we set up the system of equations, why can we subtract one linear system with another when one is in lets say (ax^2) and the other one is in (bx) or c. Sorry if this is a bit unclear. – Zoub Aug 20 '15 at 0:57
• $P_2$ would be the set of polynomials, i.e., $P_2=\{ax^2+bx+c:a,b,c \in \mathbb{R}\}$. It forms a vector space, and the polynomials $ax^2+bx+c$ are the vectors. There shouldn't be any difficulty adding and subtracting polynomials. For two polynomials to be equal $a_1 x^2+b_1 x + c_1 = a_2 x^2 + b_2 x + c_2$, we must have $a_1=a_2$, $b_1=b_2$ and $c_1=c_2$. – Rebecca J. Stones Aug 20 '15 at 1:00
• I think my question was a bit clear. My question is: When I look at the matrix you created above, I am a bit confused because, if I were to perform the normal operations on it, I would subtract the second linear equation with the first to get rid of the (1). What I do not understand is that, while all the coefficients in the first column are part of $d_1$, the first number coefficient in the column relates to $x^2$ and the second one relates to $x$. In my head, all I'm thinking is why can we subtract $x^2$ with $x$, even though they are both part of $d_1$. Does this make more sense? Thank you! – Zoub Aug 20 '15 at 1:26

First write $$1 = \frac{1}{2}\{(2x+1)-(2x-1)\} \\ x = \frac{1}{4}\{(2x+1)+(2x-1)\} \\ x^{2} = (x^{2}+x-1) - \frac{1}{4}\{(2x+1)+(2x-1)\}+\frac{1}{2}\{(2x+1)-(2x-1)\}$$ Then you can easily write $ax^{2}+bx+c$ as a linear combination of $2x+1,2x-1,x^{2}+x-1$.