My goal is to solve a really simple linear algebra problem , "To check whether if two elements can span a whole vector space"
I could see that is easy to find basis for matrices space but how about a space of all real polynomials of a degree at most two , I guess a way to check this is to consider if linear combination of elements given can produce the space , but I think that's a lot of calculation for a simple problem
Anyway the question is here : question
Well in this case it's easy to bring a Counterexample as the book suggests ,How ever I want to solve the problem using MATLAB so it can be solved in different situation
Thanks in advance (any other method to solve the problem or simply to check if the statement is true or false is highly appreciated)
$\mathbb{R}_2[x]$ has dimension 3, so for sure two vectors can't generate it. Anyway, it's easy to see that for example $x$ doesn't belong to the span of $1+2x+x^2$ and $2+x^2$: indeed you have to find $a$ and $b$ (in the field on which the vector space is built, so in this case in $\mathbb{R}$ ) such that $a(1+2x+x^2)+b(2+x^2)=x$ (equality here is identity between polynomials),then you get $a+2b+2ax+(a+b)x^2=x$, and so $a+2b=0$, $2a=1$ and $a+b=0$, that is clearly impossible.