Line 100: Line 100:
 
'''Part 2''':
 
'''Part 2''':
  
Let our space of polynomials be all polynomials of degree less than or equal to 3, and that p(-x)=-p(x). What is our set of basis vectors.
+
Let our space of polynomials be all polynomials of degree less than or equal to 3, and that p(-x)=-p(x). What is our set of basis vectors?
  
 
Again, we approach this by writing the arbitrary expression of p(x) and then attempting to remove unnecessary constants. so p(x) in this case is <math> p(x) = c_0+c_1*x+c_2*x^2+c_3*x^3</math>. Now, let's plug this into our constraints. Therefore our left hand side is <math> c_0+c_1*(-x)+c_2*(-x)^2+c_3*(-x)^3 </math> which simplifies to to <math> c_0 -c_1*x+c_2*x^2-c_3*x^3</math>. Our right hand side of the equation is <math> -c_0-c_1*x-c_2*x^2-c_3*x^3</math>. By setting these two equal, we find that <math> c_0=-c_0, c_1=c_1, c_2=-c_2, c_3=c_3</math>. This means that <math> c_0=0, c_2=0 </math>. Therefore our expression p(x) can be simplified as <math> p(x)= c_1*x+c_3*x^3</math>. Notice that p(x) is now in a form where it is written as an arbitrary linear combination of two vectors and is therefore spanned by x and x^3. This means x and x^3 are our basis.
 
Again, we approach this by writing the arbitrary expression of p(x) and then attempting to remove unnecessary constants. so p(x) in this case is <math> p(x) = c_0+c_1*x+c_2*x^2+c_3*x^3</math>. Now, let's plug this into our constraints. Therefore our left hand side is <math> c_0+c_1*(-x)+c_2*(-x)^2+c_3*(-x)^3 </math> which simplifies to to <math> c_0 -c_1*x+c_2*x^2-c_3*x^3</math>. Our right hand side of the equation is <math> -c_0-c_1*x-c_2*x^2-c_3*x^3</math>. By setting these two equal, we find that <math> c_0=-c_0, c_1=c_1, c_2=-c_2, c_3=c_3</math>. This means that <math> c_0=0, c_2=0 </math>. Therefore our expression p(x) can be simplified as <math> p(x)= c_1*x+c_3*x^3</math>. Notice that p(x) is now in a form where it is written as an arbitrary linear combination of two vectors and is therefore spanned by x and x^3. This means x and x^3 are our basis.

Revision as of 11:46, 12 March 2013

Basis Problems

Example #1: Testing whether a set of vectors is a basis for a given space


Part 1:Is the set of polynomials $ x^2, x, 1 $ a basis for the set of all polynomials of degree two or less?

YES. The first way to approach this problem is to write the knowns. We know that our given subspace V is the set of all polynomials of degree two or less. We also know that $ x^2, x, 1 $ are the vectors we'd like to test as to whether they form a basis for our space V. There are two conditions, $ x^2, x, 1 $ need to be linearly independent and $ x^2, x, 1 $ need to span V. To be concise, let's call these three vectors, respectively, as $ \vec v_1, \vec v_2, \vec v_3 $

The first aspect is trivial, since you can't make any one term by combining the others.

As for the second part, here's a simple trick: every polynomial (let's just call it p(x)) can be written in the form $ p(x)=a*x^2+ b*x+ c*1 $. However, if we look more carefully, a, b, and c are all constants! So we can rewrite this as $ p(x)=c_1*x^2+ c_2*x+ c_3*1 $. This however can be also rewritten as $ p(x)=c_1*\vec v_1+ c_2*\vec v_2+ c_3*\vec v_3 $ and notice something? this is the definition of our three vectors spanning the space! Therefore the three vectors do indeed span the space and are linearly independent. This means that they are a basis

As a take away from this problem, notice that to test whether the basis vectors span the space, write the ambiguous form of the polynomial (in this case, $ p(x)=a*x^2+ b*x+ c*1 $) and then manipulate it to see if it can be written as an arbitrary linear combination of our given basis vectors. This is how you test for span.

NOTE: It wasn't absolutely necessary to rewrite the basis vectors in the from $ \vec v_1, \vec v_2, \vec v_3 $, but this was to help make the span more familiar.



Part 2: is the set of polynomials $ 3x^2, x ,1 $ a basis for the set of all polynomials of degree two or less?

YES. Similar to Part 1, we have the same space V and we know that the vectors are linearly independent. Moreover, when we write $ p(x)=c_1*x^2+ c_2*x+ c_3*1 $, we know that $ 3x^2=3*(x^2) $ so $ p(x)=(c_1 /3)*(3x^2)+ c_2*x+ c_3*1 $ and therefore since $ c_1 /3 $ is a constant, we can rewrite this all as $ p(x)=(k_1)*(3x^2)+ k_2*x+ k_3*1 $. Which means the set of vectors span the space.

Another way of seeing this is that this basis can form the previous basis, by simply dividing the first vector by three. Therefore, since the previous basis spanned the space, this one must too. That would save a lot of work.


Part 3: is the set of polynomials $ 3x^2 + x, x , 1 $ a basis for the set of all polynomials of degree two or less?

YES. They are definitely linearly independent because $ 3x^2 + x $ cannot be made without an $ x^2 $ term and $ x $ cannot be made without removing the $ x^2 $ term from $ 3x^2 + x $ and 1 cannot be made from the first two.

since we know that space V is still the same as with parts 1 and 2, let's write p(x) as $ p(x)=c_1*x^2+ c_2*x+ c_3*1 $. Notice that $ 3x^2+x = 3*(x^2)+1*x $.

The rigorous solution is as follows: $ p(x)=c_1*x^2+ c_2*x+ c_3*1 = (c_1 /3)*(3x^2)+c_2*x+c_3*1=(c_1 /3)*(3x^2)+(c_1 /3)*x+(c_2-c_1/3)*x+c_3*1=(c_1 /3)(3x^2+x) + (c_2-c_1 /3)*x + c_3*1 $. Since $ (c_1 /3), (c_2-c_1/3) $ are still both constants, we can rewrite the expression as $ p(x)=(k_1)(3x^2+x) + (k_2)*x + k_3*1 $. This is the definition of span using our three vectors, meaning that the vectors span the space. Thus, since they span and are linearly independent, they are a basis.

The simple solution is as follows: $ 3x^2 + x, x , 1 $ is just a linear combination of the first initial basis, $ x^2, x, 1 $ and is still linearly independent. Logically, it should still span whatever the initial basis could span and therefore, it spans the entire space.


Part 4: is the set of polynomials $ 3x^2+x+1, 2x+1, 2 $ a basis for the set of all polynomials of degree two or less?

This problem is more or less identical to Part 3, just with more parts. The same simple solution argument can be made and the rigorous argument as well. However, I will show you a different way of thinking about it. Instead of starting with p(x), we'll start with the span of the three vectors. so the span (let's just call it "S"), $ S= c_1*(3x^2+x+1) +c_2*(2x+1)+c_3*2=3*(c_1)*x^2+c_1*x+c_1*1+c_2*2*x+c_2*1+c_3*2=(3*c_1)*x^2+(c_1+2*c_2)*x+(c_1+c_2+2*c_3)*1 $. But wait! $ (3*c_1), (c_1+2*c_2) and (c_1+c_2+2*c_3) $ are constants! Meaning that S can be rewritten as $ (k_1)*x^2+(k_2)*x+(k_3)*1 $ Since $ k_1, k_2, k_3 $ have no bounds (meaning they can take any value possible), this expression is equivalent to our ambiguous expression $ p(x)=d_1*x^2+d_2*x+d_3 $. Therefore, the span of our three vectors is exactly the space that we are given. Therefore it is a basis for the space.


Part 5: is the set of polynomials $ x^3, x, , 1 $ a basis for the set of all polynomials of degree two or less?

No. x^3 is included in the space of polynomials of degree THREE. So this set of vectors cannot be a basis for polynomials of degree two or less since its span is not equal to the given space of polynomials.



Part 6: is the set of polynomials $ x^2,3x^2, x , 1 $ a basis for the set of all polynomials of degree two or less? No. The first thing to note is that the dimension of polynomials of degree two or less is 3 ( one for x^2, one for x, and one for 1). Since there are four vectors, one is auxiliary. More rigorously, of course, 3x^2 is a linear combination of x^2.


Part 7: is the set of polynomials $ x^2,3x^2 + 1, x , 1 $ a basis for the set of all polynomials of degree two or less?

No. Same Reasoning as Part 6. There are four vectors when you only need 3. 3x^2+1 is a linear combination of x^2 and 1.


Part 8: is the set of polynomials $ x^2, x , 1 $ a basis for the set of all polynomials of degree THREE or less? No. They cannot create any polynomial of degree x^3, and therefore do not span the space.


Part 9: is the set of polynomials $ x^2, x , 1 $ a basis for the set of all polynomials of degree ONE or less? No. They also span outside of the space of polynomials of degree one, and therefore it is not exactly equal to the space and therefore is not a basis.


Part 10: is the set of polynomials $ x^2, x , 1 $ a basis for the set of all polynomials of EXACTLY degree TWO?

NO, it is not a basis for the set of all polynomials of exactly degree two. $ 0*x^2+0*x+0*1=0 $ 0 is not a polynomial of degree two. So this set of polynomials spans outside of the given space of polynomials.


Part 11: is it possible to make a basis for the set of all polynomials of EXACTLY degree TWO?

Nope. Every basis can make the $ \vec 0 $ by having constants of 0 in front of the basis vectors and summing them. In other words, the span of the basis vectors always contains 0 and 0 is not a polynomial of exactly degree two. In fact, it is impossible to make a basis for polynomials of and Exact degree greater than 0, since none of those spaces contain zero.


Part 12: is the set of polynomials $ x^2, x , 1 $ a basis for the set of ALL POLYNOMIALS?

Nope. All polynomials includes polynomials of degree three or higher. As seen from Part 8, this set of vectors isn't a basis for this space.


Part 13: Is it possible to make a finite basis for the set of ALL POLYNOMIALS?

Nope. To summarize the proof, by having a finite basis, we will have polynomials of at most degree n. But All polynomials includes polynomials of degree n+1, so the basis won't suffice.


Example #2: Finding a basis of a given space.

I will only give three examples, due to the exhaustiveness of the previous example:


Part 1:

Let our space of polynomials be all polynomials of degree less than or equal to 2, such that p'(x)=x*p(x). What is our set of basis vectors?

Here's how we approach this. Let's make an arbitrary expression of p(x) of degree two or less, which is $ p(x) = c_1*x^2+c_2*x+c_3 $. Now let's plug this into our equation: $ c_1*x^2+c_2*x+c_3 = x*(2(c_1)*x+c_2). Therefore c_1*x^2+c_2*x+c_3 = 2*c_1*x^2+c_2*x $ however, this means that $ c_1=2*c_1, so c_1 = 0 $ and $ c_3=0 $ So in the end, our p(x) can only be written as $ p(x)=c_2*x $. Note that However, this means all of p(x) can be written as a linear combination of x. This means that x spans all of p(x) and is obviously linearly independent with itself. Therefore, x is the basis vector.


Part 2:

Let our space of polynomials be all polynomials of degree less than or equal to 3, and that p(-x)=-p(x). What is our set of basis vectors?

Again, we approach this by writing the arbitrary expression of p(x) and then attempting to remove unnecessary constants. so p(x) in this case is $ p(x) = c_0+c_1*x+c_2*x^2+c_3*x^3 $. Now, let's plug this into our constraints. Therefore our left hand side is $ c_0+c_1*(-x)+c_2*(-x)^2+c_3*(-x)^3 $ which simplifies to to $ c_0 -c_1*x+c_2*x^2-c_3*x^3 $. Our right hand side of the equation is $ -c_0-c_1*x-c_2*x^2-c_3*x^3 $. By setting these two equal, we find that $ c_0=-c_0, c_1=c_1, c_2=-c_2, c_3=c_3 $. This means that $ c_0=0, c_2=0 $. Therefore our expression p(x) can be simplified as $ p(x)= c_1*x+c_3*x^3 $. Notice that p(x) is now in a form where it is written as an arbitrary linear combination of two vectors and is therefore spanned by x and x^3. This means x and x^3 are our basis.


Part 3

The majority of this page has dealt with polynomials. However, the same concepts can be applied to matrices and vectors. For example, let's find the basis for all 2x2 diagonal matrices.

Let's first write the ambiguous form of all 2x2 matrices first. so All Matrices $ M2x2 = \begin{pmatrix}a_1 & a_2 \\a_3 & a_4 \end{pmatrix} $. Since the matrices are diagonal matrices, $ a_2=0, a_3=0 $. So we rewriting M2x2, $ M2x2=\begin{pmatrix}a_1 & 0 \\0& a_4 \end{pmatrix} $. However, remember that matrices can be split up by addition. so M2x2 can again be rewritten as $ M2x2=\begin{pmatrix}a_1 & 0 \\0& 0 \end{pmatrix}+\begin{pmatrix}0 & 0 \\0& a_4 \end{pmatrix} =a_1*\begin{pmatrix}1 & 0 \\0& 0 \end{pmatrix}+a_4*\begin{pmatrix}0 & 0 \\0& 1 \end{pmatrix} $. Notice that M2x2 has been written as the arbitrary linear combination of two linearly independent vectors: $ \begin{pmatrix}1 & 0 \\0& 0 \end{pmatrix} $ and $ \begin{pmatrix}0 & 0 \\0& 1 \end{pmatrix} $.

Therefore, we have our basis: $ \begin{pmatrix}1 & 0 \\0& 0 \end{pmatrix} $ and $ \begin{pmatrix}0 & 0 \\0& 1 \end{pmatrix} $



Conclusion:

The basic way of approaching any basis problem is to write the arbitrary form of the element and check to see if you can rewrite the expression as a linear combination of the basis vectors.


Back to Linear Algebra Resource

Back to MA351

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang