# Is $\{\sin x,\cos x\}$ independent?

Is $$\{\sin x,\cos x\}$$ linearly independent in $$\mathbb{R}^n$$?

I thought they were not because I can write $$\cos x=\sin (x+\pi/2)$$.

My professor on the other hand said it was independent and his proof is as follows:

If $$\{\sin x,\cos\}$$ is independent in $$[0,2\pi]$$, then it will be independent on all of $$\mathbb{R}.$$ (He didn't prove this either.)

$$a\cos x+b \sin x=0 ,\forall \vec{x}\in[0,2\pi].$$

$$x=0\implies a\cdot1+b\cdot0=0 \implies a=0$$.

$$x=\pi /2\implies a\cdot 0+b \cdot 1 \implies b=0$$.

So $$\{\sin x, \cos x\}$$ is independent on $$[0,2\pi],$$ and thus independent everywhere. $$QED$$.

Is there something I am missing or not understanding...? Why is this set independent, when I can express an element of the set as a linear combination?

• The Wronskian is -1, which means they are linearly independent as a second method. Regards Jul 10 '13 at 0:37
• You have just shown that there are no $a$ and $b$ other than $0$ such that $a\cos x+b\sin x$ is identically $0$. That says precisely that his collection of two functions is a linearly independent set. Jul 10 '13 at 0:40
• What is the relation between $\cos x=\sin(x+\pi/2)$ and linear dependence?
– blue
Jul 10 '13 at 0:48
• It is enough to consider $[0,2\pi]$ because $\sin x$ and $\cos x$ are $2\pi$ periodic. Although it is true that $\cos x=\sin (x+\pi/2)$, that relation does not use the definition of what it means for two functions to be linearly independent. Jul 10 '13 at 0:48
• Your confusion stems from your claim that $\cos x = \sin ( x + \frac{\pi}{2}$. Though it is a valid transalation, it has nothing to do with linear dependence. E.g. Show that the functions $x$ and $x+1$ are linearly independent. Jul 10 '13 at 0:48

You proved that there were no non-trivial (ie, with at least one non-zero coefficient) linear combination of $\sin$ and $\cos$ identically zero on $[0,2\pi]$. That by definition means that $\{\sin,\cos\}$ is linearly independent on $[0,2\pi]$.

This also implies that they are on $\mathbb{R}$, because in particular any identically zero linear combination on $\mathbb{R}$ is also zero on $[0,2\pi]$ (the reciprocal is also true, actually, by $2\pi$-periodicity).

As for your initial comment about $\cos x = \sin(x+\frac\pi 2)$ for all $x$, it is not a linear combination. You are not writing $\cos=\alpha\sin$ for some scalar $\alpha$, you are writing $\cos=\sin\circ f$ for some function $f$.

• It can be seen as a linear combination. But it is trivial.
– OR.
Jul 10 '13 at 0:51
• What is? If you are talking about the last identity with $\sin(x+\frac{\pi}{2}$, it is not a linear combination (unless you mean that is is exactly writing $\cos=1\cdot\cos$). A linear combination is of the form $\sum_i \alpha_i f_i$ with the $\alpha_i$ being scalars, there cannot be any composition of functions (which is not one of the two operations intrinsically part of the vector space, which are addition between vectors and multiplication by a scalar). Jul 10 '13 at 0:54

I am surprised no one has yet pointed out that your question

Is $\{\sin x,\cos x\}$ linearly independent in $\mathbb{R}^n$?

doesn't make sense.

For a start, $\sin x$ and $\cos x$ aren't in $\mathbb{R}^n$! Your notation is a little ambiguous: you could mean the functions $\sin$ and $\cos$ (in which case they live inside a vector space of functions), or you could mean the numbers $\sin x$ and $\cos x$ for some fixed value $x$, say $x = 5$ (in which case they live inside a vector space of numbers, like $\mathbb{R}$).

I'm going to assume you are thinking of them as functions. So let's be clear about this: let's define $V$ to be the $\mathbb{R}$-vector space spanned by the two vectors $\mathbf{u}$ and $\mathbf{v}$, where secretly $\mathbf{u}$ is the function $\mathbf{u}(x) = \sin x$ and $\mathbf{v}$ is the function $\mathbf{v}(x) = \cos x$.

Now, $V$ is a vector space of functions - what's the zero vector? Of course, it's the zero function, $\mathbf{0}$, defined by $\mathbf{0}(x) = 0$. What does linear independence mean? Well, it means that we can find real numbers $a$ and $b$ such that $a\mathbf{u} + b\mathbf{v} = \mathbf{0}$. But these are functions, and two functions $f$ and $g$ are equal when they agree at all $x$, i.e. $f(x) = g(x)$ for all $x$.

That is, we want $a\mathbf{u}(x) + b\mathbf{v}(x) = 0$ for all $x$, or in more familiar language, $a\sin x + b\cos x = 0$ for all $x$. Now, what are $a$ and $b$?

By definition $\{\cos(x), \sin(x)\}$ is a set of linearly independent in $C(\mathbb{R})$ if for all $a,b\in\mathbb{R}$ that satisfies the equation $$a\cos(x)+ b\sin(x)=0$$ for all $x\in\mathbb{R}$ implies $a=0$ and $b=0$.

Supose that $a\neq 0$ or $b\neq 0$ and $a\cos(x)+ b\sin(x)=0$ for all $x\in\mathbb{R}$. Check that for values ​​of $a$ and $b$ arbitrary but fixed the equality hold only for fixed values ​​of $x$ and not all values ​​of $x$ in $\mathbb{R}$. And this contradicts our initial assumption.

Your professor's first claim (that we just have to show linear independence of $\sin x$ and $\cos x$ on $\lbrack0,2\pi\rbrack$) follows from $\sin x$ and $\cos x$ both being $2\pi$ periodic; two real numbers $a$ and $b$ satisfy $a \sin\theta + b\cos\theta = 0$ for all $\theta \in \mathbb{R}$ if and only if $a \sin x + b \cos x = 0$ for all $x \in \lbrack 0, 2\pi\rbrack$. To prove this, note $\implies$ is clear. For $\Longleftarrow$, note every $\theta \in \mathbb{R}$ is of the form $\theta = x + 2k\pi$ for some $x \in \lbrack0,2\pi\rbrack$ and $k \in \mathbb{Z}$, and so $a \sin x + b \cos x = 0$ and $2\pi$ periodicity imply $a\sin\theta + b\cos\theta = a \sin(x + 2k\pi) + b\cos(x + 2k\pi) = 0$.

For your other question, the statement $\cos x = \sin(x + \pi/2)$, $\forall x \in \mathbb{R}$ is an equation of linear dependence, but not for the vectors/functions $f(x) = \cos x$ and $g(x) = \sin x$. This is because $g(x)$ isn't in your equation: $h(x) = g(x+\pi/2) \sin(x+\pi/2)$ is! In fact, what you've shown is that $\{f(x),h(x)\} = \{\cos x, \sin(x + \pi/2)\}$ is a linearly dependent set.

I can elaborate if you still have questions.