# Cosine wave represented as 1/2 magnitude vector at positive and negative frequency?

1. May 31, 2008

### xerxes73

So....a cosine wave when shown in the frequency domain is represented by a 1/2 magnitude vector at the positive frequency and a 1/2 magnitude vector at the negative frequency. I am surprised by this because I cannot understand why a vector of magnitude 1 at the positive frequency of the cosine wave is wrong? I understand euler's inverse formula that cos ix = e^ix / 2 + e^-ix / 2. When I look at this equation, I see a one positive and negative associated with 1/2 magnitudes but I cannot make the jump from e^ix and e^-ix locating these 1/2 magnitude vectors at the positive x frequency and -x frequency. And again, why would the 1 vector at the positive frequency be wrong?

In about ten signal processing texts I have see this thrown around as if it is self explanatory but I am not getting it. Can someone spell this out for me? Thanks!

-xerxes73

2. May 31, 2008

### xerxes73

Actually I meant, euler's inverse formula: cos x = e^ix / 2 + e^-ix / 2

3. May 31, 2008

### rbj

okay xerxes, it's a curious combination of what is evident that you know and then ostensibly what you don't know, judging from the question asked. i'm not sure what is the missing connection. hmmmmm.

maybe it's two concepts: 1. eigenfunctions and 2. basis functions. it turns out that for Linear, Time-Invariant (LTI) systems exponential functions make for nice eigenfunctions. and a combination of the discoveries of Fourier and Euler show that exponentials make good basis functions to decompose a general signal function into.

do you know about eigenfunctions and basis functions?

the fact is that $e^{i \omega t}$ and $e^{-i \omega t}$ make for better basis functions than just cos() or sin(). (we can add up a bunch of exponential functions with imaginary exponents to get any general function.)

and exponential functions are eigenfunctions for LTI systems. if $e^{s t}$ is input to an LTI system, then something times $e^{s t}$ is what comes out (that's what it means to be an eigenfunction). and that something is $H(s)$, where H(s) is called the transfer function of the LTI system and is a function of that complex exponent rate factor s in est.

if you put those two concepts together, when you have a single cosine function, you might think that is a single component, represented by a single frequency, but mathematically, they really are two basis components, with two different frequencies (that are negatives of each other).

Last edited: May 31, 2008
4. May 31, 2008

### jhicks

As a simple counterexample, if you assume e^(ix) = cos(x), for real x you would still produce complex numbers from the left side but the right side would be real, for real x inputted. Are you able to visualize the complex plane? cos(x) with respect to e^(ix) (or e^(-ix)) can be seen as a projection of those complex functions onto the real axis, and summing e^(ix) and e^(-ix) - which are conjugate functions - together can be seen to cancel out the imaginary parts of both functions and double the real part. If you were to plot both functions as vectors in the complex plane it might make the most sense.

Euler's identity is most easily seen from the expansion of e^(ix) and I believe the "inverse formulas" are working backwards from this. Since e^(ix)=cos(x)+i*sin(x) and e^(-ix)=cos(x)-i*sin(x) (once again you'd have to inspect the power series expansion to see this), e^(ix)+e^(-ix)=cos(x)+i*sin(x)+cos(x)-i*sin(x)=2*cos(x).

I hope I answered your question, but I'm with rbj on this one in that I don't know what you know and what you don't so I tried to keep the argument as simple as possible.

Last edited: May 31, 2008
5. May 31, 2008

### Redbelly98

Staff Emeritus
Keep in mind that the time-domain signal must be real-valued (i.e., no imaginary part).

A frequency spectrum of 1 at only the positive frequency w gives a time domain signal of

f(t) = exp(i w t)

which has an imaginary component [i sin(w t)], so that is wrong.

The frequency spectrum of 1/2 at both +w and -w gives the required real-valued time signal:

f(t) = (1/2)exp(i w t) + (1/2)exp(-i w t)
= cos(w t)

6. Jun 1, 2008

### xerxes73

Thanks for the patient explanations. I can't say I have intuitively grasped this yet but I am not finished playing with these new ideas provided by you all on basis, eigenfunctions, and vectors in the s plane. I just wanted to send a quick note of thanks.

-xerxes73

7. Jun 1, 2008

### rbj

i wouldn't call them "vectors" on the s-plane. they're complex numbers. but it is true that both complex numbers (what we denote with a script C) and what we call "R2 space" (the space of 2-dimensional vectors) are both ordered pairs of real numbers. and, even though R2 vectors and complex numbers both add in the same way, they don't multiply the same. R2 vectors have dot-product (which results in a real number). i don't even know if cross-product is really meaningful for R2 vectors since they would alway point perpendicularly "out of the page". since the direction is not variable, cross product of R2 vectors could also be thought of as a single real number. complex numbers multiply in a manner that defaults to how real numbers multiply, and the result is simply another complex number in the same C space.

there's even division with complex numbers, but i don't know of what division with R2 vectors would conceptually be.

anyway, the wikipedia article on basis functions doesn't look so good. do you want the 5 minute spiel on that? then, after that, we could talk about eigenfunctions of LTI systems. it really is an important mathematical gift to signal processing engineers that exponential functions have the properties that they make for an elegant family of basis functions for either periodic functions or finite-energy aperiodic functions.

and exponentials are eigenfunctions of LTI operators. that is because:

1. when you add two exponentials with the same complex rate scaler s in the exponent, you get a third exponential with the same s.
2. when you multiply an exponential by a constant, it's another exponential (with the same s).
3. when you delay and exponential, it's another exponential function (with the same s).
4. when you differentiate an exponential function, it's another exponential (with the same s).

and LTI systems are sorta the combination of the above 4 operations. so if est goes in to an LTI system, something that looks just like est comes out (but possibly bigger or smaller or negated). that is fundamental for understanding Linear Time-Invariant systems and how Fourier and/or Laplace Transforms describe or treat LTI systems.

8. Jun 2, 2008

Lots of good responses in this thread already, but perhaps you can still benefit from yet another point of view. The easiest way to see that a cosine can't be just a single (postive) frequency component is to note that then the spectrum would not be symmetric, and so the time-domain waveform would be complex-valued, which a cosine is not. The spectrum of a real-valued signal is always (conjugate) symmetric.

Well, there's a couple of problems here. First, Euler's formula is $\cos (x) = \frac{1}{2}(e^{ix} + e^{-ix})$. There is no imaginary component in the argument to the cosine. Second, simply applying Euler's formula doesn't get you to the frequency domain: this is still an expression for a time-domain waveform, so some further interpretation is required to see how this related to the spectrum. In particular, there are no components at a frequency of "x;" x is a time index. The frequency of $\cos (x)$ is 1 (on a normalized scale), and so that is where the components are. To make this more clear, consider writing Euler's formula with a more general argument to the cosine:

$$\cos (2\pi f t) = \frac{1}{2}\left(e^{i2\pi f t} + e^{-i2\pi f t} \right)$$

Where $f$ is the frequency in Hertz and $t$ is the time variable. Perhaps this expression makes it more explicit that the two frequency components are at plus and minus $f$?

9. Aug 21, 2008

### fisico30

Re: Cosine wave represented as 1/2 magnitude vector at positive and negative frequenc

just a short comment. Please correct me if wrong.
I think that the cosine is represented by the two complex exponentials because we have chosen to represent it using the complex Fourier series or transform which are based on these complex exponentials as basis functions.
The complex Fourier series can synthesize both real and complex functions. In the case of real functions, the resulting spectrum is always symmetric (you need a basis and its conjugate to make real: Re(z)=(z+z*)/2 ).