Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Orthogonality of cosine and sine functions

  1. Oct 20, 2011 #1
    Can someone give a more intuitive explanation on how it is (if it is true), that;

    all cos (nx) cos (mx) = 0 if n!=m


    all sin (nx) sin (mx) = 0 if n!=m

  2. jcsd
  3. Oct 20, 2011 #2
  4. Oct 20, 2011 #3
    Do you mean "explanation" in the algebraic sense? Note that


    if and only if k≠0. If k=0 then the integrand is 1 and the integral is 2π.

    Then to prove the orthogonality relations just substitute the exponential forms for sine and cosine, i.e. cos(nx)=(exp(inx)+exp(-inx))/2 etc. and the result falls out.

  5. Oct 20, 2011 #4


    User Avatar
    Science Advisor

    Maybe you should graph a few of these curves against each other to get some intuitive graphical understanding of why these are the way they are.

    In terms of algebra though, you just need a few applications of integration by parts.

    If you want to understand the orthogonality and how it acts in situations like a filter, again use a mathematical package and use a few different filters: low-pass, high-pass, or some union of frequency domains. This should give you an intuitive idea of how the orthongality translates algebraicly to something that can be seen graphically.
  6. Oct 21, 2011 #5


    User Avatar
    Science Advisor

    You can also use trig identities.
    cos(a+ b)= cos(a)cos(b)- sin(a)sin(b) and
    cos(a- b)= cos(a)cos(b)+ sin(a)sin(b) so that

    cos(a+ b)+ cos(a- b)= 2 cos(a)cos(b)

    In particular, cos(mx)cos(nx)= (1/2)cos((n+m)x)+ (1/2)cos((n-m)x)

    The integral of that will be, of course,
    [tex]-\frac{1}{2(n+m)}sin((n+m)x)- \frac{1}{2(n- m)}sin((n-m)x)[/tex]
    as long as [itex]n\ne m[/itex]. Integrating from 0 to [itex]2\pi[/itex] (I don't understand your "all" in the integral) those will be 0. If m= n, we have, since cos(0)= 1, cos^2(nx)= cos(2nx)+ 1 and the integral is NOT 0.

    Similarly, if we subtract cos(a+b)= cos(a)cos(b)- sin(a)sin(b) from cos(a- b)= cos(a)cos(b)+ sin(a)sin(b), we get 2sin(a)sin(b)= cos(a- b)- cos(a+ b).

    So sin(mx)sin(nx)= (1/2)cos((m-n)x)- cos((m+n)x) and the same thing happens.
  7. Oct 21, 2011 #6


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    It is interesting that nobody has pointed out that the orthogonality depends on it being a definite integral and the interval over which the integral is taken.
  8. Oct 25, 2011 #7
    There are good conceptual ways of seeing this, I think, without really doing any calculations.

    Unfortunately, my grasp of these things is tenuous, and I am pressed for time these days, so I can only indicate a few lines of investigation in this direction. So, this will be a fairly crappy response, but it is the best I can do at the moment. I'd love to be able to explore this fully. The point is that there are answers to the original question.

    I think there is a nice proof that involves some representation theory.

    It is given somewhere in here, but I don't suppose you would want to read this paper (kind of heavy stuff):


    I believe maybe this proof can be applied to the present case (by someone with more knowledge and time on their hands than myself).

    Another theoretical argument that might work is that cos x and sin x are eigenvectors of a differentiation operator. So, this fact is analogous to the fact that the eigenvectors of a Hermitian matrix are orthogonal. Here's a little intro to that sort of thing:


    So, that sometimes gives you a beautiful way to show that functions are orthogonal without calculating the integral that defines orthogonality. Although, I guess that integral is done indirectly when you prove that the operator is self-adjoint.

    And there is a third explanation that I came up with myself when I was studying signal processing. If you take the convolution of the two functions, it vanishes. The orthogonality relations can be obtained as a special case of that. As it stands, the argument is sort of circular, but there's a reason why you would expect the convolution to be zero.

    Convolution is what you do to find how a linear time invariant system will respond to a given input. You convolve the input with the impulse-response (which is the response when the input is a delta function). So you feed one sine wave into the system whose impulse reponse is a sine wave with a different frequency. If the system is linear and time invariant, you would expect the output to be a sine wave with the same frequency as the input. But convolution is actually a commutative operation, so you could switch the role of the input and impulse response and get the same result. So, I have argued that the output has one frequency one way and another frequency the other way. Contradiction. Only way out is for the output to be 0 (you're free to let the amplitude be 0), so you are done.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook