Are $x^2$ and $x \cdot |x|$ linearly dependent on $\mathbb{R}$?

Let $$f_1(x)=x^2, f_2(x)=x \cdot |x|$$ , then they are linearly dependent on $$[0,\infty)$$, and also linearly dependent on $$(-\infty,0]$$. But the question is, are they linearly dependent on $$(-\infty,\infty)$$?

They should be linearly dependent as on both the interval $$[0,\infty)$$ and $$(-\infty,0]$$, the functions are linearly dependent. But they are linearly independent as given in my reference book.

• Why don't you set up the definition of linear dependence? – zipirovich Feb 6 at 4:03
• Which theorem are you using when you said "it should be linearly dependent as ... " ? – Eclipse Sun Feb 6 at 4:06
• as it is linearly dependent on both the interval so it should be .... – mSourav Feb 6 at 4:07
• Are there non-zero solutions for $(a,b)$ such that $af_1 + bf_2 = 0, \forall x$? – Dylan Feb 6 at 4:15
• @mSourav That is not a theorem I have heard of. You should at least try to prove the statement. And it is easier to show they are linearly independent by definition. – Eclipse Sun Feb 6 at 4:16

Consider the vector space $$\mathscr{C}(\Bbb R)$$ of functions $$\Bbb R\to\Bbb R$$. Our two functions $$f_1, f_2\in\mathscr{C}(\Bbb R)$$ are defined by $$f_1(x)=x^2$$ and $$f_2(x)=x\cdot\lvert x\rvert$$. To see that $$\{f_1, f_2\}$$ is linearly independent, suppose that $$c_1\cdot f_1+c_2\cdot f_2=0\tag{\ast}$$ where $$c_1, c_2\in\Bbb R$$. This equation means that $$c_1\cdot x^2+c_2\cdot x\cdot\lvert x\rvert=0$$ for all $$x\in\Bbb R$$. Plugging in $$x=-1$$ and $$x=1$$ gives the system of linear equations $$\begin{array}{rcrcrc} c_1 &-& c_2 &=& 0 \\ c_1 &+& c_2 &=& 0 \end{array}$$ How many solutions are there to this system of equations?
If two functions, each of which is identically not zero, are linearly dependent, then the first must be the linear combination of the second: $$f_1=cf_2 \\ x^2=c\cdot x|x| \Rightarrow \begin{cases}c> 0, if \ \ x> 0\\ c< 0, if \ \ x< 0\\ c\in \mathbb R, if \ \ x=0\\ \end{cases}$$ However, there is no unique $$c$$, for which $$x^2=c\cdot x|x|$$ holds true for all $$x\in \mathbb R$$. Hence, the two functions are independent for $$x\in \mathbb R$$.
• A set of two vectors is linearly dependent if and only if one is a scalar multiple of the other; in general, you cannot assert a priori that the first is a multiple of the second, though you can do that after you observe that the second is not the zero vector. Note that $v$ and $\mathbf{0}$ are always linearly dependent, but $v$ is not a a multiple of $\mathbf{0}$ unless they are both $\mathbf{0}$. – Arturo Magidin Feb 6 at 5:18