Independent sets of vectors 
How to check if these sets of vectors are linearly dependent or linearly independent?

a) $S:=\{ \sqrt{3}, e, \pi \}$ in $\mathbb{R}$ $( =\mathbb{R}^1)$
b) $S:=\{\sin^2(x), \cos^2(x), -3\}$ in $C(\mathbb{R})$
I know how to check for linear dependence in general and what the definition is, but have trouble when it's functions or not so easy to see vectors.


Def: A finite set $S:= \{v_1,v_2,\dots,v_n\} \subset V$ of vectors, where $V$ is a $\mathbb{R}$-vector space, is linearly dependent if it is true that, for $\alpha_1,\dots,\alpha_n \in \mathbb{R}$, not all  zero, that
$$\alpha_1v_1+ \alpha_2 v_2 + \dots \alpha_n v_n = 0   $$
If the set is not linearly dependent, then it is called linearly independent.


So for the $(a)$ it is clear that in $\mathbb{R}$ these vectors are all linearly dependent. Let's call $v_1:= e$, $v_2:= \pi$, $v_3 := \sqrt{3}$. We can write $$\alpha_1v_1+\alpha_2v_2+\alpha_2v_2 = 0\cdot e +   \frac{2}{\pi}\cdot \pi  +  \frac{-2}{\sqrt{3}}\cdot \sqrt{3} = 0$$ Where in this case we have, e.g.,  $\alpha_2 := 2/\pi \neq 0$ and then this is not a set of linearly independent vectors. So these are linearly dependent vectors.

For the $(b)$ part we can proceed like that, suppose that there are numbers $\alpha_1, \dots, \alpha_n \in \mathbb{R}$ such that
$$\tag{$\forall x \in \mathbb{R}$}\,\,\,\,\alpha_1\sin^2(x) + \alpha_2\cos^2(x)+\alpha_3\cdot(-3) = 0$$
then
$$\tag{$\forall x \in \mathbb{R}$}\alpha_1\sin^2(x) -\alpha_2\sin^2(x) + \alpha_2-3\alpha_3 = 0 \implies (\alpha_1-\alpha_2)\sin^2(x) = 3\alpha_3-\alpha_2$$
if $\alpha_1 - \alpha_2 \neq 0$ then we get that $\sin(x)$ is a constant function, witch is absurd, so $\alpha_1 = \alpha_2$. But then we get that $3\alpha_3 = \alpha_2$ so we conclude that they are linearly dependent. Take  $\alpha_1 = \alpha_2 = 3$ and $\alpha_3 = 1$ we get, for all $x \in \mathbb{R}$
$$3\sin^2(x)+3\cos^2(x) + 1 \cdot (-3) = 3-3 = 0$$
Suppose they were linearly independent. Then you would conclude that one must have that all $\alpha$'s are equal to zero. Note that in the $(b)$ part we are in $C(\mathbb{R})$ so $0 \in C(\mathbb{R})$ is the constant function that gives $0$ for all $x \in \mathbb{R}$. That's why we must consider all $x \in \mathbb{R}$, because in that space we are dealing with functions.
