Inverse Functions: Arctangent and Angle Between Two Lines (Part 25)

The smallest angle between the non-perpendicular lines y = m_1 x + b_1 and y = m_1 x + b_2 can be found using the formula

\theta = \displaystyle \tan^{-1} \left( \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right| \right).

A generation ago, this formula used to be taught in a typical Precalculus class (or, as it was called back then, analytical geometry). However, I find that analytic geometry has fallen out of favor in modern Precalculus courses.

Why does this formula work? Consider the graphs of y = m_1 x and y = m_1 x + b_1, and let’s measure the angle that the line makes with the positive x-axis.

dotproduct5The lines y = m_1 x + b_1 and y = m_1 x are parallel, and the x-axis is a transversal intersecting these two parallel lines. Therefore, the angles that both lines make with the positive x-axis are congruent. In other words, the + b_1 is entirely superfluous to finding the angle \theta_1. The important thing that matters is the slope of the line, not where the line intersects the y-axis.

The point (1, m_1) lies on the line y = m_1 x, which also passes through the origin. By definition of tangent, \tan \theta_1 can be found by dividing the y- and x-coordinates:

\tan \theta_1 = \displaystyle \frac{m}{1} = m_1.

green linedotproduct6

 

We now turn to the problem of finding the angle between two lines. As noted above, the y-intercepts do not matter, and so we only need to find the smallest angle between the lines y = m_1 x and y = m_2 x.

The angle \theta will either be equal to \theta_1 - \theta_2 or \theta_2 - \theta_1, depending on the values of m_1 and m_2. Let’s now compute both \tan (\theta_1 - \theta_2) and \tan (\theta_2 - \theta_1) using the formula for the difference of two angles:

\tan (\theta_1 - \theta_2) = \displaystyle \frac{\tan \theta_1 - \tan \theta_2}{1 + \tan \theta_1 \tan \theta_2}

\tan (\theta_2 - \theta_1) = \displaystyle \frac{\tan \theta_2 - \tan \theta_1}{1 + \tan \theta_2 \tan \theta_1}

Since the smallest angle \theta must lie between 0 and \pi/2, the value of \tan \theta must be positive (or undefined if \theta = \pi/2… for now, we’ll ignore this special case). Therefore, whichever of the above two lines holds, it must be that

\tan \theta = \displaystyle \left| \frac{\tan \theta_1 - \tan \theta_2}{1 + \tan \theta_1 \tan \theta_2} \right|

We now use the fact that m_1 = \tan \theta_1 and m_2 = \tan \theta_2:

\tan \theta = \displaystyle \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right|

\theta = \tan^{-1} \left( \displaystyle \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right| \right)

green line

The above formula only applies to non-perpendicular lines. However, the perpendicular case may be remembered as almost a special case of the above formula. After all, \tan \theta is undefined at \theta = \pi/2 = 90^\circ, and the right hand side is also undefined if 1 + m_1 m_2 = 0. This matches the theorem that the two lines are perpendicular if and only if m_1 m_2 = -1, or that the slopes of the two lines are negative reciprocals.

Inverse Functions: Arctangent and Angle Between Two Lines (Part 24)

Here’s a straightforward application of arctangent that, a generation ago, used to be taught in a typical Precalculus class (or, as it was called back then, analytical geometry).

Find the smallest angle between the lines y= 3x and y = -x/2.

dotproduct3

This problem is almost equivalent to finding the angle between the vectors \langle 1,3 \rangle and \langle -2,1 \rangle. I use the caveat almost because the angle between two vectors could be between 0 and \pi, while the smallest angle between two lines must lie between 0 and \pi/2.

This smallest angle can be found using the formula

\theta = \displaystyle \tan^{-1} \left( \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right| \right),

where m_1 and m_2 are the slopes of the two lines. In the present case,

\theta = \tan^{-1} \left( \left| \displaystyle \frac{ 3 - (-1/2) }{1 + (3)(-1/2)} \right| \right)

\theta = \tan^{-1} \left( \left| \displaystyle \frac{7/2}{-1/2} \right| \right)

\theta = \tan^{-1} 7

\theta \approx 81.87^\circ.

Not surprisingly, we obtain the same answer that we obtained a couple of posts ago using arccosine. The following picture makes clear why \tan^{-1} 7 = \cos^{-1} \displaystyle \frac{1}{\sqrt{50}}.

dotproduct4In tomorrow’s post, I’ll explain why the above formula actually works.

 

Inverse Functions: Arccosine and Dot Products (Part 23)

The Law of Cosines can be applied to find the angle between two vectors {\bf a} and {\bf b}. To begin, we draw the vectors {\bf a} and {\bf b}, as well as the vector {\bf c} (to be determined momentarily) that connects the tips of the vectors {\bf a} and {\bf b}.

dotproduct2Using the usual rules for adding vectors, we see that {\bf a} + {\bf c} = {\bf b}, so that {\bf c} = {\bf b} - {\bf a}

We now apply the Law of Cosines to find \theta:

\parallel \! \! {\bf c} \! \! \parallel^2 = \parallel \! \! {\bf a} \! \! \parallel^2 + \parallel \! \! {\bf b} \! \! \parallel^2 - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

\parallel \! \! {\bf b} - {\bf a} \! \! \parallel^2 = \parallel \! \! {\bf a} \! \! \parallel^2 + \parallel \! \! {\bf b} \! \! \parallel^2 - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

We now apply the rule \parallel \! \! {\bf a} \! \! \parallel^2 = {\bf a} \cdot {\bf a}, convert the square of the norms into dot products. We then use the distributive and commutative properties of dot products to simplify.

( {\bf b} - {\bf a} ) \cdot ({\bf b} - {\bf a}) = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

{\bf b} \cdot ({\bf b} - {\bf a}) - {\bf a} \cdot ({\bf b} - {\bf a}) = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

{\bf b} \cdot ({\bf b} - {\bf a}) -{\bf a} \cdot ({\bf b} - {\bf a}) = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

{\bf b} \cdot {\bf b} - {\bf a} \cdot {\bf b} - {\bf a} \cdot {\bf b} + {\bf a} \cdot {\bf a} = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

{\bf b} \cdot {\bf b} - 2 {\bf a} \cdot {\bf b} + {\bf a} \cdot {\bf a} = {\bf a} \cdot {\bf a} + {\bf b} \cdot {\bf b} - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

We can now cancel from the left and right sides and solve for \cos \theta:

- 2 {\bf a} \cdot {\bf b} = - 2 \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel \cos \theta

\displaystyle \frac{ {\bf a} \cdot {\bf b} }{ \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel } = \cos \theta

Finally, we are guaranteed that the angle between two vectors must lie between 0 and \pi (or, in degrees, between 0^\circ and 180^\circ). Since this is the range of arccosine, we are permitted to use this inverse function to solve for \theta:

\cos^{-1} \left( \displaystyle \frac{ {\bf a} \cdot {\bf b} }{ \parallel \! \! {\bf a} \! \! \parallel \parallel \! \! {\bf b} \! \! \parallel } \right) = \theta

The good news is that there’s nothing special about two dimensions in the above proof, and so this formula may used for vectors in \mathbb{R}^n for any dimension n \ge 2.

In the next post, we’ll consider how this same problem can be solved — but only in two dimensions — using arctangent.

Inverse Functions: Arccosine and Dot Products (Part 22)

Here’s a straightforward application of arccosine, that, as far as I can tell, isn’t taught too often in Precalculus and is not part of the Common Core standards for vectors and matrices.

Find the angle between the vectors \langle 1,3 \rangle and \langle -2,1 \rangle.

dotproductThis problem is equivalent to finding the angle between the lines y = 3x and y = -x/2. The angle \theta is not drawn in standard position, which makes measurement of the angle initial daunting.

Fortunately, there is the straightforward formula for the angle between two vectors {\bf a} and {\bf b}:

\theta = \cos^{-1} \left( \displaystyle \frac{ {\bf a} \cdot {\bf b} }{ \parallel \!\! {\bf a} \!\! \parallel \parallel \!\! {\bf b} \!\! \parallel } \right)

We recall that {\bf a} \cdot {\bf b} is the dot product (or inner product) of the two vectors {\bf a} and {\bf b}, while \parallel \!\! {\bf a} \!\! \parallel = \sqrt{ {\bf a} \cdot {\bf a} } is the norm (or length) of the vector {\bf a}.

 For this particular example,

\theta = \cos^{-1} \left( \displaystyle \frac{\langle 1,3 \rangle \cdot \langle -2,1 \rangle }{ \parallel \!\!\langle 1,3 \rangle \!\! \parallel \parallel \!\!\langle -2,1 \rangle \!\! \parallel } \right)

\theta = \cos^{-1} \left( \displaystyle \frac{ (1)(-2) + (3)(1) }{ \sqrt{ (1)^2 + (3)^2} \sqrt{ (-2)^2 + 1^2 }} \right)

\theta = \cos^{-1} \displaystyle \frac{1}{\sqrt{50}}

\theta \approx 81.87^\circ

In the next post, we’ll discuss why this actually works. And then we’ll consider how the same problem can be solved more directly using arctangent.

Inverse Functions: Arccosine and SSS (Part 21)

Arccosine has an important advantage over arcsine when solving for the parts of a triangle: there is no possibility ambiguity about the angle.

Solve \triangle ABC if a = 16, b = 20, and c = 25.

When solving for the three angles, it’s best to start with the biggest angle (that is, the angle opposite the biggest side). To see why, let’s see what happens if we first use the Law of Cosines to solve for one of the two smaller angles, say \alpha:

a^2 = b^2 + c^2 - 2 b c \cos \alpha

256 = 400 + 625 - 1000 \cos \alpha

-769 = -1000 \cos \alpha

0.769 = \cos \alpha

\alpha \approx 39.746^\circ

So far, so good. Now let’s try using the Law of Sines to solve for \gamma:

\displaystyle \frac{\sin \alpha}{a} = \displaystyle \frac{\sin \gamma}{c}

\displaystyle \frac{\sin 39.746^\circ}{16} \approx \displaystyle \frac{\sin \gamma}{25}

0.99883 \approx \sin \gamma

Uh oh… there are two possible solutions for \gamma since, hypothetically, \gamma could be in either the first or second quadrant! So we have no way of knowing, using only the Law of Sines, whether \gamma \approx 87.223^\circ or if \gamma \approx 180^\circ - 87.223^\circ = 92.777^\circ.

green lineFor this reason, it would have been far better to solve for the biggest angle first. For the present example, the biggest answer is \gamma since that’s the angle opposite the longest side.

c^2 = a^2 + b^2 - 2 a b \cos \gamma

625 = 256 + 400 - 640 \cos \gamma

-31 =-640 \cos \gamma

0.0484375 = \cos \gamma

Using a calculator, we find that \gamma \approx 87.223^\circ.

We now use the Law of Sines to solve for either \alpha or \beta (pretending that we didn’t do the work above). Let’s solve for \alpha:

\displaystyle \frac{\sin \alpha}{a} = \displaystyle \frac{\sin \gamma}{c}

\displaystyle \frac{\sin \alpha}{16} \approx \displaystyle \frac{\sin 87.223}{25}

\sin \alpha \approx 0.63949

This equation also has two solutions in the interval [0^\circ, 180^\circ], namely, \alpha \approx 39.736^\circ and \alpha \approx 180^\circ - 39.736^\circ = 140.264^\circ. However, we know full well that the answer can’t be larger than \gamma since that’s already known to be the largest angle. So there’s no need to overthink the matter — the answer from blindly using arcsine on a calculator is going to be the answer for \alpha.

Naturally, the easiest way of finding \beta is by computing 180^\circ - \alpha - \gamma.

Inverse Functions: Arccosine and SSS (Part 20)

The Law of Cosines also recognizes when the purported sides of a triangle are impossible.

Solve \triangle ABC if latex a = 16$, b = 20, and c = 40.

Hopefully students would recognize that c > a + b, thus quickly demonstrating that the triangle is impossible. However, this also falls out of the Law of Cosines:

c^2 = a^2 + b^2 - 2 a b \cos \gamma

1600 = 256 + 400 - 640 \cos \gamma

944 =-640 \cos \gamma

-1.475 = \cos \gamma

Since the cosine of an angle can’t be less than -1, we can conclude that this is impossible.

Stated another way, we have the implications (since a, b, and c are all positive)

c > a + b \Longleftrightarrow c^2 > (a+b)^2

\Longleftrightarrow a^2 + b^2 - 2 a b \cos \gamma > a^2 + 2 a b + b^2

\Longleftrightarrow -2 a b \cos \gamma > 2 a b

\Longleftrightarrow \cos \gamma < -1

Since the last statement is impossible, so is the first one.

Inverse Functions: Arccosine and SSS (Part 19)

Arccosine has an important advantage over arcsine when solving for the parts of a triangle: there is no possibility ambiguity about the angle.

Solve \triangle ABC if latex a = 16$, b = 20, and c = 25.

To solve for, say, the angle \gamma, we employ the Law of Cosines:

 

c^2 = a^2 + b^2 - 2 a b \cos \gamma

625 = 256 + 400 - 640 \cos \gamma

-31 =-640 \cos \gamma

0.0484375 = \cos \gamma

Using a calculator, we find that \gamma \approx 87.2^\circ. And the good news is that there is no need to overthink this… this is guaranteed to be the angle since the range of y = \cos^{-1} x is [0,\pi], or [0^\circ, 180^\circ] in degrees. So the equation

\cos x = \hbox{something}

is guaranteed to have a unique solution between 0^\circ and 180^\circ. (But there are infinitely many solutions on \mathbb{R}. And since an angle in a triangle must lie between 0^\circ and 180^\circ, the practical upshot is that just plugging into a calculator blindly is perfectly OK for this problem. This is in stark contrast to the Law of Sines, for which some attention must be paid for solutions in the interval [0^\circ,90^\circ] and also the interval [90^\circ, 180^\circ].

From this point forward, the Law of Cosines could be employed again to find either \alpha or \beta. Indeed, this would be my preference since the sides a, b, and c are exactly. However, my experience is that students prefer the simplicity of the Law of Sines to solve for one of these angles, using the now known pair of c (exactly known) and \gamma (approximately known with a calculator).

Inverse Functions: Arccosine and Arctangent (Part 18)

In this series, we’ve seen that the inverse of function that fails the horizontal line test can be defined by appropriately restricting the domain of the function. For example, we now look at the graph of y = \cos x:

cos1As with the graph of y = \sin x, we select a section that satisfies the horizontal line test and ignore the rest of the graph. (I described this in more rigorous terms when I considered arcsine, so I will not repeat the rigor here.) There are plenty of choices that could be made; by tradition, the interval [0,\pi] is chosen.

cos2Reflecting only the half-wave of the cosine graph on the interval [0,\pi] through the line y = x produces the graph of y= \cos^{-1} x. Again, to assist my students when graphing this function, I point out that the graph of cosine has horizontal tangent lines at the points (0,1) and (\pi,-1). Therefore, after reflecting through the line y = x, we see that the graph of \cos^{-1} x has vertical tangent lines at (1,0) and (-1,\pi).

cos3green lineThe same logic applies when defining the arctangent function. By tradition, the interval (-\pi/2,\pi/2) is chosen as the section of the graph of y = \tan x that satisfies the horizontal line test.

tan1Reflecting only the half-wave of the cosine graph on the interval [0,\pi] through the line y = x produces the graph of y= \tan^{-1} x. Like the (more complicated) logistic growth function, this function has two different horizontal asymptotes that govern the behavior of the function as x \to \pm \infty.

tan2green line

So here are the rules that I want my Precalculus students to memorize:

y = \sin^{-1} x means that x = \sin y and \displaystyle -\frac{\pi}{2} \le y \le \displaystyle \frac{\pi}{2}

y = \cos^{-1} x means that x = \cos y and 0 \le y \le \pi

y = \sin^{-1} x means that x = \sin y and \displaystyle -\frac{\pi}{2} < y < \displaystyle \frac{\pi}{2}

Students using forget that the range of arccosine is different than the other two, and I’ll usually have to produce the graph of y = \cos x to explain and re-explain why this one is different.

Because these functions are defined on restricted domains, the usual funny things can happen. For example,

\cos^{-1} (\cos 2\pi) = \cos^{-1} 1 = 0 \ne 2 \pi

\tan^{-1} \left( \tan \displaystyle \frac{3\pi}{4} \right) = \tan^{-1} (-1) = -\displaystyle \frac{\pi}{4} \ne \displaystyle \frac{3\pi}{4}

 

Engaging students: Using right-triangle trigonometry

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Shama Surani. Her topic, from Precalculus: using right-triangle trigonometry.

green line

How could you as a teacher create an activity or project that involves your topic?

bridge

A project that Dorathy Scrudder, Sam Smith, and I did that involves right-triangle trigonometry in our PBI class last week, was to have the students to build bridges. Our driving question was “How can we redesign the bridge connecting I-35 and 635?” The students knew that the hypotenuse would be 34 feet, because there were two lanes, twelve feet each, and a shoulder of ten feet that we provided on a worksheet. As a group, they needed to decide on three to four angles between 10-45 degrees, and calculate the sine and cosine of the angle they chose. One particular group used the angle measures of 10°, 20°, 30°, and 40°. They all calculated the sine of their angles to find the height of the triangle, and used cosine to find the width of their triangle by using 34 as their hypotenuse. The picture above is by Sam Smith, and it illustrates the triangles that we wanted the students to calculate.

 

The students were instructed to make a scale model of a bridge so they were told that 1 feet = 0.5 centimeters. Hence, the students had to divide all their calculations by two. Then, the students had to check their measurements of their group members, and were provided materials such as cardstock, scissors, pipe cleaners, tape, rulers, and protractors in order to construct their bridges.  They had to use a ruler to measure out what they found for sine and cosine on the cardstock, and make sure when they connected the line to make the hypotenuse that the hypotenuse had a length of 17 centimeters. After they drew their triangles, they had to use a protractor to verify that the angle they chose is what one of the angles were in the triangle. When our students presented, they were able to communicate what sine and cosine represented, and grasped the concepts.

Below are pictures of the triangles and bridges that one of our groups of students constructed. Overall, the students enjoyed this project, and with some tweaks, I believe this will be an engaging project for right triangle trigonometry.

studentbridge3 studentbridge2 studentbridge1

green line

How does this topic extend what your students should have learned in previous courses?

 

In previous classes, such in geometry, students should have learned about similar and congruent triangles in addition to triangle congruence such as side-side-side and side-angle-side. They should also have learned if they have a right angle triangle, and they are given two sides, they can find the other side by using the Pythagorean Theorem. The students should also have been exposed to special right triangles such as the 45°-45°-90° triangles and 30°-60°-90° triangles and the relationships to the sides. Right triangle trigonometry extends the ideas of these previous classes. Students know that there must be a 45°-45°-90° triangle has side lengths of 1, 1, and \sqrt{2} which the lengths of 1 subtending the 45° angles. They also are aware that a 30°-60°-90° produces side lengths of 1, \sqrt{3} , and 2, with the side length of 1 subtending the 30°, the length of \sqrt{3} subtending the angle of 60°, and the length of 2 subtending the right angle. So, what happens when there is a right angle triangle, but the other two angles are not 45 degrees or 30 and 60 degrees? This is where right triangle trigonometry comes into play. Students will now be able to calculate the sine, cosine, and tangent and its reciprocal functions for those triangles that are right. Later, this topic will be extended to the unit circle and graphing the trigonometric functions as well as their reciprocal functions and inverse functions.

 

 

 

green line

What are the contributions of various cultures to this topic?

 

Below are brief descriptions of various cultures that personally interested me.

 

Early Trigonometry

 

The Babylonians and Egyptians studied the sides of triangles other than angle measure since the concept of angle measure was not yet discovered. The Babylonian astronomers had detailed records on the rising and setting of stars, the motion of planets, and the solar and lunar eclipses.   On the other hand, Egyptians used a primitive form of trigonometry in order to build the pyramids.

 

Greek Mathematics

 

Hipparchus of Nicaea, now known as the father of Trigonometry, compiled the first trigonometric table. He was the first one to formulate the corresponding values of arc and chord for a series of angles. Claudius Ptolemy wrote Almagest, which expanded on the ideas of Hipparchus’ ideas of chords in a circle. The Almagest is about astronomy, and astronomy relies heavily on trigonometry.

 

 

 

 

Indian Mathematics

 

Influential works called Siddhantas from the 4th-5th centry, first defined sine as the modern relationship between half an angle and half a chord. It also defined cosine, versine (which is 1 – cosine), and inverse sine. Aryabhata, an Indian astronomer and mathematician, expanded on the ideas of Siddhantas in another important work known as Aryabhatiya. Both of these works contain the earliest surviving tables of sine and versine values from 0 to 90 degrees, accurate to 4 decimal places. Interestingly enough, the words jya was for sine and kojya for cosine. It is now known as sine and cosine due to a mistranslation.

 

Islamic Mathematics

 

Muhammad ibn Mūsā al-Khwārizmī had produced accurate sine and cosine tables in the 9th century AD. Habash al-Hasib al-Marwazi was the first to produce the table of cotangents in 830 AD. Similarly, Muhammad ibn Jābir al-Harrānī al-Battānī had discovered the reciprocal functions of secant and cosecant. He also produced the first table of cosecants.

 

Muslim mathematicians were using all six trigonometric functions by the 10th century.  In fact, they developed the method of triangulation which helped out with geography and surveying.

 

Chinese Mathematics

 

In China, early forms of trigonometry were not as widely appreciated as it was with the Greeks, Indians, and Muslims. However, Chinese mathematicians needed spherical geometry for calendrical science and astronomical calculations. Guo Shoujing improved the calendar system and Chinese astronomy by using spherical trigonometry in his calculations.

 

European Mathematics

 

Regiomontanus treated trigonometry as a distinct mathematical discipline. A student of Copernicus, Georg Joachim Rheticus, was the first one to define all six trigonometric functions in terms of right triangles other than circles in Opus palatinum de triangulis. Valentin Otho finished his work in 1596.

 

http://en.wikipedia.org/wiki/History_of_trigonometry

 

Functions that commute

At the bottom of this post is a one-liner that I use in my classes the first time I present a theorem where two functions are permitted to commute. At many layers of the mathematics curriculum, students learn about that various functions can essentially commute with each other. In other words, the order in which the operations is performed doesn’t affect the final answer. Here’s a partial list off the top of my head:

  1. Arithmetic/Algebra: a \cdot (b + c) = a \cdot b + a \cdot c. This of course is commonly called the distributive property (and not the commutative property), but the essential idea is that the same answer is obtained whether the multiplications are performed first or if the addition is performed first.
  2. Algebra: If a,b > 0, then \sqrt{ab} = \sqrt{a} \sqrt{b}.
  3. Algebra: If a,b > 0 and x is any real number, then (ab)^x = a^x b^x.
  4. Precalculus: \displaystyle \sum_{i=1}^n (a_i+b_i) = \displaystyle \sum_{i=1}^n a_i + \sum_{i=1}^n b_i.
  5. Precalculus: \displaystyle \sum_{i=1}^n c a_i = c \displaystyle \sum_{i=1}^n a_i.
  6. Calculus: If f is continuous at an interior point c, then \displaystyle \lim_{x \to c} f(x) = f(c).
  7. Calculus: If f and g are differentiable, then (f+g)' = f' + g'.
  8. Calculus: If f is differentiable and c is a constant, then (cf)' = cf'.
  9. Calculus: If f and g are integrable, then \int (f+g) = \int f + \int g.
  10. Calculus: If f is integrable and c is a constant, then \int cf = c \int f.
  11. Calculus: If f: \mathbb{R}^2 \to \mathbb{R} is integrable, \iint f(x,y) dx dy = \iint f(x,y) dy dx.
  12. Calculus: For most differentiable function f: \mathbb{R}^2 \to \mathbb{R} that arise in practice, \displaystyle \frac{\partial^2 f}{\partial x \partial y} = \displaystyle \frac{\partial^2 f}{\partial y \partial x}.
  13. Probability: If X and Y are random variables, then E(X+Y) = E(X) + E(Y).
  14. Probability: If X is a random variable and c is a constant, then E(cX) = c E(X).
  15. Probability: If X and Y are independent random variables, then E(XY) = E(X) E(Y).
  16. Probability: If X and Y are independent random variables, then \hbox{Var}(X+Y) = \hbox{Var}(X) + \hbox{Var}(Y).
  17. Set theory: If A, B, and C are sets, then A \cup (B \cap C) = (A \cup B) \cap (A \cup C).
  18. Set theory: If A, B, and C are sets, then A \cap (B \cup C) = (A \cap B) \cup (A \cap C).

However, there are plenty of instances when two functions do not commute. Most of these, of course, are common mistakes that students make when they first encounter these concepts. Here’s a partial list off the top of my head. (For all of these, the inequality sign means that the two sides do not have to be equal… though there may be special cases when equality happens to happen.)

  1. Algebra: (a+b)^x \ne a^x + b^x if x \ne 1. Important special cases are x = 2, x = 1/2, and x = -1.
  2. Algebra/Precalculus: \log_b(x+y) = \log_b x + \log_b y. I call this the third classic blunder.
  3. Precalculus: (f \circ g)(x) \ne (g \circ f)(x).
  4. Precalculus: \sin(x+y) \ne \sin x + \sin y, \cos(x+y) \ne \cos x + \cos y, etc.
  5. Precalculus: \displaystyle \sum_{i=1}^n (a_i b_i) \ne \displaystyle \left(\sum_{i=1}^n a_i \right) \left( \sum_{i=1}^n b_i \right).
  6. Calculus: (fg)' \ne f' \cdot g'.
  7. Calculus \left( \displaystyle \frac{f}{g} \right)' \ne \displaystyle \frac{f'}{g'}
  8. Calculus: \int fg \ne \left( \int f \right) \left( \int g \right).
  9. Probability: If X and Y are dependent random variables, then E(XY) \ne E(X) E(Y).
  10. Probability: If X and Y are dependent random variables, then \hbox{Var}(X+Y) \ne \hbox{Var}(X) + \hbox{Var}(Y).

All this to say, it’s a big deal when two functions commute, because this doesn’t happen all the time.

green lineI wish I could remember the speaker’s name, but I heard the following one-liner at a state mathematics conference many years ago, and I’ve used it to great effect in my classes ever since. Whenever I present a property where two functions commute, I’ll say, “In other words, the order of operations does not matter. This is a big deal, because, in real life, the order of operations usually is important. For example, this morning, you probably got dressed and then went outside. The order was important.”