Colin Wright posted a tweet yesterday that said that the plots of cosine and tangent are orthogonal. Here’s a plot so you can see for yourself.

Jim Simons replied with a proof so short it fits in a tweet: The product of the derivatives is -sin(*x*)sec²(*x*) = -tan(*x*)/cos(*x*), which is -1 if cos(*x*)=tan(*x*).

This made me wonder whether sine and cosine are orthogonal in the sense of graphs intersecting at right angles. They are orthogonal in the sense that their product integrates to zero over the interval [0, 2π] is zero, a fact that’s important fact in Fourier analysis, but are they orthogonal in the sense of their graphs intersecting at right angles? A graph makes this look plausible:

But the graph is misleading. I made the plot without specifying the aspect ratio, using the default in Mathematica. This makes the angle between the graphs look smaller. Setting the aspect ratio to 1 shows the true picture. The two curves intersect at π/4 and 5π/4, and they intersect at an angle of 2π/3, not π/2.

The product of the slopes is not -1, but it is negative and constant, so you could multiply each function by some constant to make the product of slopes -1. Said another way, you could make the curves perpendicular by adjusting he aspect ratio.

Can you do this for other functions that are orthogonal in the inner product sense? Not easily. For example, sin(2*x*) and sin(3*x*) are orthogonal in the inner product (integral) sense, but the angles of intersection are different at different places where the curves cross.

What about other functions that are like sine and cosine? I looked at the Bessel functions *J*_{1} and *J*_{2}, but the angles at the intersections vary. Ditto for Chebyshev polynomials. I suppose the difference is that sine and cosine are translations of each other, whereas that’s not the case for Bessel or Chebyshev functions. But it is true for wavelets, so you could find wavelets that are orthogonal in the sense of inner products and in the sense of perpendicular graphs.

**Update**: See more on how Bessel functions cross in the next post.

Interesting. I’ve checked Jacobi cn/sn, and for product of derivatives I’ve got

(-tn(u)/cn(u)) dn^2(u), which means even tn and cn has the same value, angle is not right, and defined by dn^2(u).

It looks to me like the tan-cos angle of intersection is “more constant”, somehow, than the sin-cos angle of intersection.

Specifically, at an intersection of tan x with cos x, the tangent curve is always the one with positive slope, and the cosine curve is always the one with negative slope. The two curves can’t cross during the cosine’s rising period, only its falling period. (Proof: the slope of tan x is positive everywhere.)

But in an intersection of sin x with cos x, it could be that the sine curve is rising and the cosine curve is falling, or it could be the other way around.