## Coding to Promote Problem Solving and Logical Reasoning

An excellent article, by Scott G. Smith, appeared in the August 2016 edition of MATHEMATICS teacher and published by the National Council of Teachers of Mathematics, got me thinking about how I might use simple coding activities in math classes to promote problem solving and logical reasoning. The author discussed how he used simple coding activities with the TI-84 Graphing Calculator to teach generalization, problem solving and logical reasoning in his algebra 2 classes. Smith provided numerous TI-84 program listings along with explanations.

The purpose of this post is to show how to use an Excel spreadsheet and the TI-BASIC programming language to solve a problem that would be suitable for a high school math class. I chose a spreadsheet solution of the problem because educated adults in a modern economy are expected to have working knowledge of spreadsheets. Then, I chose a TI-84 solution of the problem because programmable calculators are ubiquitous in the modern math classroom.

In a previous post, I discussed algorithms for finding the day-of-week when given a Gregorian or Julian calendar date. If you have not read my post How to Find the Day of the Week for a Given Date, I believe you will find it helpful to read it before continuing because the floor function and mod operator are fully explained. The algorithm for finding the day-of-week given a Gregorian calendar date is given below. This algorithm was also selected for this post because it’s relatively easy to implement in Excel or the TI-BASIC programming language. In my opinion, it’s important that high school students learn the basics of how to use these powerful tools.

The source code of the TI-BASIC program that implements the Gregorian calendar day-of-week algorithm is given below. I indented some lines of code to make the structure of the program easier to understand, but code lines in the TI code editor are left justified. Notice that each line of code starts with character ‘:’ which is automatically inserted by the code editor with each new line of code. After a bit of study, one can easily learn how to translate many algorithms into TI-BASIC code; almost line by line. There are abundant online resources where one can learn how to program in TI-BASIC. In fact, I had to do a bit of research to write this post.

Shown below is the program input and the resulting output after a single run of the TI-BASIC program above. The bold face text is the input the user would enter for the date 12 February 1809. After carefully studying the day-of-week algorithm, the TI-BASIC source code, and a single run of the program, the TI-BASIC code makes perfect sense.

An Excel spreadsheet implementation of the Gregorian day-of-week algorithm is shown below. Note that the text in column B cells of the spreadsheet only serve to clarify what the spreadsheet is about, and to describe what the cells C4 through C13 represent. The spreadsheet formulas (invisible in this view) in cells C7 through C13 generate the numerical and text cell values the user sees. When cells C4, C5 or C6 are changed, cells C7 through C13 are automatically updated.

The reason spreadsheets are so powerful is that cells can contain very complex formulas that determine the numeric or text content of the cell that contains the formula. Shown below are the formulas in cells C7 through C13. I find it fun and interesting to Google a formula that will allow me to easily solve my problem. Notice that the formulas in cells C12 and C13 are broken up into multiple lines, however, formulas in any actual spreadsheet cell are entered as a single continuous string of characters where the first string character is ‘=’.

Some Final Comments, Observations and Suggestions

• For beginning coders, give students a pseudocode description of an algorithm and then have them implement the algorithm in TI-BASIC or in a spreadsheet. After students learn how to translate statements in an algorithm into computer code, they are ready to start learning how to develop algorithms.
• Pick problems that relate to their current course work that are relatively easy to solve, but also time consuming and tedious. Students now have a reason to want to learn how to create an algorithm and write code to implement the algorithm.
• The Common Core Standards for Mathematical Practice do not directly address coding, however, coding activities can certainly help promote the goals of the Common Core Standards.
• Steve Jobs once said the learning how to program computers is a great way to teach people how to solve problems and reason logically.
• Coding can become addictive. Years ago, a social studies teacher at my high school reported that parents were complaining that their children were spending too much time outside of class writing Apple Macintosh HyperCard stacks for a social studies class project. The social studies teacher only had to present the project to his class and gave students a short introduction to the coding in the HyperCard language. Students quickly became hooked and simply ran with the project. One class project required over 60 floppy discs to hold the HyperCard stacks!
• It’s not uncommon to find computer programmers who were music majors in college.
• Teachers should remind their students that many women have made important contributions to computer science. Ada Lovelace (1815 – 1852), the only legitimate child of the famous poet Lord Byron, was an English mathematician and writer. Around 1843, Ada published an elaborate set of notes that many historians consider to be a description of the first computer program. She also envisioned computers doing much more than just numerical calculations. Rear Admiral Grace Hopper (1906 – 1992), nicknamed “Amazing Grace,” began her career teaching mathematics at Vassar in 1931, and was promoted to associate professor in 1941. In 1934, she earned a Ph. D. in mathematics from Yale. Later she served in the U.S. Navy and other civilian organizations devoted to the development of computer systems and programming languages. Hopper believed computer languages should be similar to the English language rather than the machine language of computers. She made significant contributions to the development of COBOL (COmmon Business-Oriented Language) which is still used in many business applications.

## Release of Probability Simulations Software by Math Teacher’s Resource

I’m happy and excited to release a free full Windows version of the software Probability Simulations. The primary reasons for writing the program are: 1) Satisfy my lingering curiosity about a variety of probability distributions. 2) Develop an effective classroom software tool that makes it easy to demonstrate a variety of concepts and interesting problems in probability theory and statistics.

Here is a brief description of the software’s main features:

• The software provides a total of 23 probability simulations ranging from classic geometric probability simulations to common probability distributions such as the binomial, Poisson, normal, and chi-square.
• Upon selection of a particular simulation, the purpose of the simulation is explained and the key parameters of the simulation are described. Simulation parameters can be easily edited.
• A simulation can be run in either manual or automatic mode which gives users two different ways to experience a simulation, view program output and interact with the software. In manual mode, the user is required to click the <Run Simulation> button or press the <R> key to run the next simulation.
• Users can run simulations of sampling statistics based on populations described by probability distributions such as binomial, normal, student-t, chi-square and uniform continuous.
• Users can run simulations of confidence interval calculations or simulations of hypothesis tests from a P-value point of view or traditional rejection region point of view.
• Experimental and expected probabilities of events can be found by just moving the cursor over a histogram bar and then shift-click the mouse.
• Probabilities, inverse probabilities, critical values and P-values of statistics can be found by just clicking a button or shift-clicking the mouse in the region under a probability curve.
• The software is easy to use because of the program’s <Help> menu command and context sensitive explanations are provided at the appropriate moment in all simulations.

The screen shots below give you a quick peek at some of the program’s features.

Also check-out my free Summary of Common Probability Distributions, which describes the key properties of probability distributions found in lower level college statistics courses.

## Orbit and Rotation of Planet Earth

As we gaze across a beautiful valley or stare in awe at a distant mountain, it is easy to forget that we are on a spinning platform that is traveling on an elliptical orbit around the sun at an average speed of 66,600 miles per hour. I find this seemly unending journey truly amazing. In this post, I would like to take a look at some of the facts that mankind has learned about this journey.

Before Nicholas Copernicus (1474 – 1543), many people thought that the Sun, planets, and stars rotated about the Earth, and each planet in turn rotates on its own private circular arc. This complicated Earth centered view of nature became so entrenched that it became an article of faith in the Catholic Church. In fact, the Catholic Inquisition threated Galileo (1564 – 1642) with torture on the rack unless he publicly retracted his belief in the Sun centered circular orbit Copernican world system. Galileo publicly retracted his belief in the Copernican world view and was spared torture on the rack, but spent the remaining years of his life under house arrest.

Johannes Kepler (1571 – 1630) discovered three laws of planetary motion which is a relatively simple description of planetary motion. (You may find it helpful to read my post Demonstrating Dynamics in a Mathematical Model.) Kepler’s first law stated that the orbit of a planet around the Sun is an ellipse where the Sun is located at one of the two foci of the ellipse. An ellipse is a very special curve where every point P on the ellipse, the distance from P to one focus point plus the distance from P to the other focus point, is a constant. The diagram below shows an ellipse with foci at F1 and F2, length of major axis = 10 units, length of minor axis = 6 units, and center point at (0, 0). For very point P on an ellipse, the sum of the distances from point P to the two focus points equals the length of the major axis. As indicated in the diagram below, an ellipse can be drawn by first anchoring the endpoints of a length of string on a piece of paper or cardboard. Use a pencil to make the string taunt, and then trace the curve by keeping the string taunt as you move the pencil along the elliptical curve.

To better understand planetary orbits, it’s necessary to understand what we mean by the eccentricity of an ellipse. If a = half the length of the major axis, and c = the distance from the center to a focus point, then the eccentricity e of the ellipse = c/a. Thus elliptical eccentricity e ranges from 0 to 1. If e = 0, the ellipse is a circle, and if e = 1, the ellipse degenerates to a line segment with foci at the endpoints of the major axis. (By definition, the eccentricity of a parabola equals 1, and the eccentricity of a hyperbola is greater than 1.) The two diagrams below show eccentricity values for five ellipses where the ellipse and foci have the same color. Note that eccentricity approaches 1 as the foci approach the endpoints of the major axis. The eccentricity of the Earth’s orbit = 0.0167086. This is the reason, I suspect, that Copernicus thought the Earth’s orbit was circular, not elliptical. Since half the length of the major axis of the Earth’s elliptical orbit equals 149.6 million km, it follows that the Sun is 0.0167086*149.6 million km = 2.4996 million km from the center of the Earth’s orbit.

The two diagrams below show an exaggerated oval shape of the Earth’s yearly orbit around the Sun; the purpose is to draw your attention to key time periods in a year. Orbital dates can vary slightly from year to year, and therefore the dates shown in the diagrams are approximate. The following points describe the key time periods in Earth’s orbit:

• At the point of perihelion, the Earth is at its closest point of 147.1 million km from the Sun. In northern latitudes, the direction of the Earth’s polar axis is tilted away from the Sun, which results is less direct sunlight and cooler average temperatures.
• At the point of aphelion, the Earth is at its farthest point of 152.1 million km from the Sun. In northern latitudes, the direction of the Earth’s polar axis is tilted towards the Sun, which results in more direct sunlight and warmer average temperatures.
• The equinoxes and solstices divide a year into approximately four equal time periods or seasons. At the fall and spring equinoxes, the Earth’s polar axis is perpendicular to the plane of the Earth’s orbit which results in equal periods of daylight and darkness. At the summer and winter solstices, the Earth’s polar axis is tilted towards or away from the Sun which results the longest and shortest days of the year.
• At the point of perihelion, the Earth reaches its fastest orbital speed of 109,080 km/hour.
• At the point of aphelion, the Earth reaches its slowest orbital speed of 105,480 km/hour.
• The average or mean orbital speed of the Earth equals 107,200 km/hour or 66,600 mph.
• It takes the Earth 365.256 363 004 days to orbit the Sun. Because of the extra 0.256 363 004 days in a year, it’s necessary to add an extra day to our calendar every four years in February. To be more specific, leap years occur in years that are multiples of 4 or 400, but not multiples of 100. Hence the years 2000 and 2400 are leap years, but the years 1800, 1900, 2100, 2200 and 2300 are not leap years. All other years that are multiples of 4 such as 1868, 1936 and 2016 are leap years.
• In the diagrams below, note that seasons in the northern and southern hemispheres occur at opposite times of the year.

Everyone knows that the Earth does a daily rotation about its polar axis. Here are a few facts about the Earth’s rotation.

• The Earth rotates in about 24 hours with respect to the Sun and once every 23 hours, 56 minutes and 4 seconds with respect to the stars.
• The Earth’s rate of rotation rate is slowing with time. Atomic clocks have demonstrated that a modern-day is about 1.7 milliseconds longer than a day in 1900. (I doubt that this fact will be reported in the national news any time soon.)
• In the northern hemisphere, the Earth rotates east towards the Sun in the morning hours and away from the Sun in the west in the evening hours. This is the reason that the folks in New York see the Sun about 4 hours before the folks in California.
• Technically speaking, there is no such thing as sunrise and sunset. The Sun only appears to rise and set in the sky because of the rotation of the Earth. Buckminster Fuller who was an American architect (geodesic domes) and systems theorist suggested that we should the terms sunsight and sunclipse because the terms sunrise and sunset do not accurately describe what we observe.
• The Earth’s rate of rotation is not constant. The true solar day is about 10 seconds longer at the point of perihelion and 10 seconds shorter at the point of aphelion.
• At the equator, the Earth’s linear speed of rotation is 465.1 m/s, 1,674.4 km/h or 1,040.4 mph. At higher latitudes, the linear rate of rotation is reduced by a factor of Cos(angle of latitude). Example: The Kennedy Space Center is located 28.59° North latitude and has a linear rotation rate of 1,674.4Cos(28.59°) = 1,470.23 km/h = 913.56 mph.

I will close this post about an epiphany I experienced many years ago. As I recall, it was about March of 1975 when my neighbor Chuck Beck invited me into his back yard to view Sun spot activity. Chuck had placed his expensive Celestron telescope with an attached power cord and lens filter on his picnic table. As I adjusted a knob on the Celestron in order to keep the Sun in view, I had the same physical sensation in my legs as if I was riding a merry-go-round. I thought to myself, “Johnson you really ARE on a moving and spinning platform in space!”

## Binomial Probability Distribution and the Battle of Gettysburg

This post shows how I use my Battle of Gettysburg Trivia Quiz to help teach the binomial probability distribution. My brother Roger and I are Civil War buffs, and we recently paid another of our many visits to the Gettysburg Military Park Battlefield in Gettysburg, Pennsylvania. On each visit to a Civil War battlefield, I’m rewarded with another gold nugget of information about a particular battle that relatively few people know. After several visits to the Gettysburg battlefield, I created a Gettysburg Trivia Quiz to demonstrate the binomial probability distribution in my statistics classes at the junior college where I have taught a variety of math courses over the years. I consider the binomial probability distribution to be the most important discrete probability distribution in statistics. (The normal probability distribution is the most important probability distribution in all of statistics.)

You can download the Gettysburg Trivia Quiz by clicking the links below. I believe you’ll find it fun, interesting and helpful to take the quiz before continuing.

Gettysburg Trivia Quiz (student version)

Gettysburg Trivia Quiz (teacher version)

You can also download the quiz on our free instructional content page under the statistics tab.

The features of the quiz and how I administer the quiz are as follows:

• The quiz has 20 multiple choice questions.
• Each question has 5 choices.
• Each question is designed so that no normal person would have any idea of what the correct answer is. Hence a normal test taker can only guess at the correct answer, and therefore has a 0.2 probability of answering any question correctly.
• All questions are independent of each other in that knowledge of any one question can’t help answer any other quiz question.
• On the day of the lesson, I announce that the class will be taking 20-question multiple choice trivia quiz on the battle of Gettysburg.
• I distribute a copy of the quiz to each student, and tell them there is no reason to take a peek at a neighbor’s answer because their quiz score has no influence on their course grade.
• I tell them that the intent of the quiz is to eventually help them better understand the binomial probability distribution. Most likely there will be no high scores.
• I allow 5-10 minutes to take the quiz. (You will observe intense expressions on some faces.)
• I verbally provide the correct answers so that each student can grade his/her own quiz. I ask students to be honest when grading their quiz. There should be no surprise if almost all students have a very low score.
• As each student reports his/her quiz score, I record the score on the chalkboard.
• I then begin a discussion of the binomial probability distribution, introduced previously, and how the binomial distribution can be used to predict the probability distribution of scores from the Gettysburg Trivia Quiz. The class will see that the expected average or mean score is 4, and an unusually high score is 8 or more. A score of 8 is more than 2 standard deviations above the expected mean score of 4, where the expected standard deviation of the scores equals 1.789.
• Using our calculators, the probability of a score of 0 = 0.0115, probability of a score of 4 = 0.218, and the probability of a score of 8 or more = 0.0321.
• We then compare the experimental binomial results from the quiz with the expected binomial results. Especially with a larger class, students are amazed at how the expected and experimental results agree.

My free handout, Summary of Common Probability Distributions, describes the key properties and some applications of the probability distributions found in lower level college statistics courses. You can also download the handout on our free instructional content page under the statistics tab. Teachers can copy parts or all of the handout to share with students. Here is a general description of the key components of a binomial probability distribution:

• A Bernoulli trial is any experiment that has exactly two possible outcomes. Examples: 1) Tossing a single coin has outcomes of head or tail. 2) Answering a multiple choice test question has outcomes of correct answer or incorrect answer. 3) Consider the chances of a person living to retirement age of 65. That person can die before 65, or age 65 or after.
• The two possible outcomes of a Bernoulli trial are called ‘success’ or ‘failure’. The terms success and failure are just labels that represent the two possible outcomes of a Bernoulli trial.
• Each outcome of a Bernoulli trial has no influence on subsequent Bernoulli trials. In other words, Bernoulli trials are independent events.
• The random variable x of a binomial population equals the number of successes found in n Bernoulli trials repeated under identical conditions. Therefore x could equal any of the integers that range from 0 to n.
• The probability of success on each trial is always the same and is denoted by p. The probability of failure on each trial is denoted by q. The laws of probability tell us that p + q = 1 or q = 1 – p.
• The expected average or mean of random variable x equals μ = np.
• The expected standard deviation of random variable x equals σ = √(n*p*q).
• The formula for the probability of exactly x successes in n trials is P(x) = nCx * px * q(n-x).

Now let’s see how the binomial probability distribution can be used to predict the key statistical properties of the sample of quiz scores. Note that the number of test takers has no influence of the expected values for μ and σ below. As the number test takers increases, we can expect increased agreement between expected and experimental results.

• Each quiz question is a Bernoulli trial; the answer is correct or incorrect.
• The trivia quiz is composed of 20 independent Bernoulli trials with p = 0.2 and q = 0.8 because we are assuming that normal students don’t know any of the details of the battle of Gettysburg.
• The number of successive independent Bernoulli trials equals n = 20.
• Let the random variable x equal the number of correct answers reported by test takers.
• The expected mean or expected class average score μ = np = 20*0.2 = 4 correct answers.
• The expected standard deviation of quiz scores σ = √(npq) = √(20*0.2*0.8) = 1.789.
• An unusually high score = μ + 2σ = 4 + 2*1.789 = 7.58 = a score of 8 or more.
• Calculate the sample mean x-bar and sample standard deviation s of the reported scores, and then compare these values with μ and σ.
• P(x = 0) = 0.0115, P(x = 4) = 0.218), and P(x ≥ 8) = 0.0321. Compare these probabilities to the experimental probabilities derived from the reported quiz scores. Example: What is the experimental probability that a student got a score of 4?

Based on the Gettysburg Trivia Quiz, here are the results of two probability simulations of a binomial distribution where the number of Bernoulli trials n = 20 and the probability of success on each trial p = 0.2. The widths of the histograms bars = 1 unit. Both the heights of the blue bars and the area of the blue bars equals P(x) = the expected probability of a student having exactly x successes in 20 Bernoulli trials. The heights of the red bars and the area of the red bars equals the experimental probability of a student having exactly x successes in 20 Bernoulli trials. The first graph shows the results of 50 students taking the trivia quiz, and the second graph shows the results of 50,000 students taking the quiz. Every simulation run on any number quiz takers will give us different experimental results, but the same expected results.

Using the same simulation parameters for the two graphs above, the graph below shows the cumulative results after a run of 30 simulations in manual mode where the user is required to press the <R> key to run the next simulation. The output of each simulation in manual mode shows us how well a test taker did on the quiz. The graph below includes a string of S’s and F’s that indicate successes and failures for test taker number 30 in 20 Bernoulli trials. The probability simulation software used to create the histograms allows me to find expected and experimental probabilities of events by just moving the mouse cursor over a histogram bar, and then shift-left clicking the mouse. The software also makes it easy to find probabilities such as P(x ≤ 5) or P(x ≥ 2).

My Probability Simulations software was used to create the graphics in this post. I will be releasing a full and free version of this software in the near future at the Math Teacher’s Resource website. The software release will be announced in a future post. Stay tuned!

I will close this post by telling you a true story about Larry (not his real name) who was in a general education high school math class that I taught approximately 20 years ago. Larry had very little mathematical ability. Larry could learn how to solve a specific type of math problem when the problem was presented in a specific format. If the presentation of a math problem was modified in any way, Larry was lost.

Like myself, Larry was a Civil War buff. Many of his classmates thought Larry was a history genius because he could spout a wide variety of American history facts. Larry could tell you that Private Hugh White was the lone British sentry on guard duty near the British Customs House on Monday, March 5th, 1770, the night of the Boston Massacre. I loved to share Civil War stories with Larry. He liked to ask trivia questions to stump me. It turns out, Larry, his father and I also had the same barber, Joe. About 6 years after Larry graduated, I asked Joe to have Larry take my Gettysburg Trivia Quiz the next time he got a haircut. I gave Joe the answer key so that he could grade the quiz while Larry was still in the shop. I told Joe that if Larry scored 19/20 or 20/20 on the quiz, I would pay for his haircut. Larry scored 19/20! The haircut and tip were on me. Joe told me how excited Larry became, and how proud Larry’s father was. I guess our brains are wired differently.

## Why Division by Zero Can Lead to Absurd and Disastrous Results

In an earlier post, Why is Division by Zero is Forbidden, I discussed why division by zero is a mathematically meaningless operation. The purpose of this post is to show how attempted or actual division by zero can lead to absurd and disastrous results. I will also take a look at two rational polynomial functions to show how division by zero at point x = k can be interpreted. It’s important to understand why division by zero results in an undefined value, but it’s more important to be aware of actual or potential division by zero, and how to avoid, interpret, and deal with division by zero.

The first example is based on an article from Wikipedia that was brought to my attention by one of my students. On 21 September 1997, the U.S. Navy cruiser USS Yorktown (CG-48) was rendered dead in the water due to a failure in the ship’s propulsion system. A crew member entered a zero in a data base field causing attempted division by zero which in turn caused a buffer overflow in a computer network. As a result, all machines in the network were shut down until the problem was corrected. This undetected data entry error caused the crew to frantically work several hours to make the ship seaworthy. In light of standard programming practices, it’s difficult to understand why the possibility of a division by zero error was not considered by the network control software programming team. It’s not reasonable to assume that a human will always enter the correct value in a data base field; humans make mistakes.

The next example gives a flawed 9-step mathematical proof that 1 = 2. A class discussion to determine the flaw in the proof can be very interesting and enlightening. One only needs to understand the basic properties of real numbers and simple factoring to follow the logic of the proof. The fatal error in the proof occurs in step 8 because p – q = 0 which in turn leads to division by zero. It’s fun to see the initial reaction of a class when you announce that you will give a proof that 1 = 2. When presenting the proof, I have students give a justification for each step.

In terms of a practical application, let’s see how to avoid the error message #DIV/0! in an Excel spreadsheet cell. It’s important that spreadsheet users are aware of the possibility of division by zero, and they know how to handle this type of error. Suppose the formula =C2/D2 is in some cell of an Excel spreadsheet such as cell E10. If cell D2 is blank or has a value equal to zero, the value of cell E10 will be set to #DIV/0!. This division by zero problem can be avoided by setting the value of cell E10 to blank on division by zero with the conditional statement =IF(D2=0,” “,C2/D2) in cell E10. Another way to avoid this problem is to set the contents of cell E10 to “Undefined” on division by zero with the conditional statement =IF(D2=0,”Undefined”, C2/D2) in cell E10.

Next consider the expression (x2 + x – 6) / (x + 3) = (x + 3)(x – 2) / (x + 3) and the graph of the function y = (x2 + x – 6) / (x + 3) shown below. Depending on the class and mathematical level of the students, there are a variety of interesting questions and points of discussion that can be raised. Remind students that the hole in the graph at (-3, -5) has an infinitely small diameter, and therefore can only be seen by a mathematically aware person or God.

• Why is the expression (x2 + x – 6) / (x + 3) mathematically equivalent to x – 2 except when x = -3?
• Why is the graph of the function y = (x2 + x – 6) / (x + 3) appear to be equal to the graph of y = x – 2?
• What is the value of f(-3)?
• What is the limit of f(x) as x approaches -3 or when x is arbitrarily close to -3?
• Why is the function y = (x2 + x – 6) / (x + 3) continuous at every real number x except when x = -3?
• Why does the graph of the function y = (x2 + x – 6) / (x + 3) contain a single hole at the point (-3, -5)?
• Graph the function y = (x2 + x – 6) / (x + 3) on your favorite graphing utility. Most likely the graph is just the graph of the line y = x – 2 without any indication that the graph contains a hole? Why is this so?

Lastly, consider the rational polynomial function f(x) = y = 3(x – 2)(x + 4) / ((x + 2)(x – 5)). The graph of this function and a table of key function values are shown below. Depending on the class and mathematical level of the students, there are a variety of interesting and important concepts that can be discussed. Teachers can use rational polynomial functions to give students a gentle and concrete introduction to important math concepts. In this example, students are confronted with division by zero when x = -2 or 5. Notice how the graph of f(x) behaves near x = -2 or x = 5. Warning! Initially, many students will not get the same results shown below because they failed to enclose (x + 2)(x – 5) in a pair of matching parentheses when they entered the expression in their graphing calculator. I often have to remind students that calculators obey the order of operation rules.

• By only looking at the equation for y = f(x), how can you tell that f(2) = 0 and f(-4) = 0?
• From a geometric point of view, what does f(2) = 0 tell us? What does f(-4) = 0 tell us?
• Verify that f(0) = 2.4. From geometric point of view, what does this tell us?
• By only looking at the equation for y = f(x), how can you tell that both f(-2) and f(5) are undefined?
• As shown in the table below, pick values of x that are very close to -2 or 5, and then use a calculator to verify that the absolute value f(x) is a relatively large number.
• When x is close to -2 or 5, the absolute value of (x + 2)(x – 5) is relatively small compared to the absolute value of 3(x – 2)(x + 4). Therefore |f(x)| is relatively large because dividing by smaller numbers gives us larger numbers.
• Since f(-2) and f(5) are undefined, the lines x = -2 and x = 5 are vertical asymptotes or poles. This tells us that the graph of y = f(x) is literally ripped apart along the vertical asymptotes. In other words, the function y = f(x) is not continuous at x = -2 or x = 5. Continuous functions can be drawn without lifting the pencil from the sheet of paper.
• As illustrated in the table below, pick values of x, negative or positive, that have very large absolute values, and then use a calculator to verify that f(x) is very close to 3. This tells us that the line y = 3 is a horizontal asymptote. In other words, as x approaches ±∞, f(x) approaches 3. You can verify that f(-1,000,000) = 2.999985 and f(1,000,000) = 3.000015.

I will close this post by mentioning that the free handout, Rapid Curve Sketching, explains how one can quickly sketch the graph of a polynomial or rational polynomial function when the equation of the function is completely factored. You can also download this handout by visiting our free instructional content page in the algebra and pre-calculus tab.

## Linear Transformation Rule to Reflect over Oblique Line y = mx + b

This post discusses how the linear transformation rule for reflecting a figure over an oblique line y = mx + b can be used to create learning opportunities for high school students at different grade levels. Initially one might think that this topic is too advanced for most high school students. In my opinion, it’s possible to create a variety of activities based on linear transformations that will give mathematical nourishment to high school students at many different grade levels. An understanding of the concept of using a linear transformation to change a 2D graphic object to another 2D graphic object can definitely benefit college linear algebra students and computer graphic programmers. You may find it helpful to read my post, Geometric Transformations to Practice Basic Skills and Introduce Fundamental Concepts.

The content of this post is based on my free handout, Reflection over Any Oblique Line. This handout covers the following topics and items:

• The derivation of the liner transformation rule (p, q) → (r, s) that reflects a figure over the oblique line y = mx + b where both r and s are functions of p, q, m, and b.
• The derivation of the linear transformation rule (p, q) → (r, s) that reflects a figure over the oblique line y = mx + b where both r and s are functions of p, q, b, and θ = Tan-1(m).
• Given the specific equation of a line y = mx + b, show different ways of finding a linear transformation rule to reflect a preimage figure over the line y = mx + b.
• Graphic images showing the reflection images of various polygons over different oblique lines.
• A 13-step algorithm for the TI-84 graphing calculator to draw preimage and image polygons under a linear transformation.

The linear transformation rule (p, s) → (r, s) for reflecting a figure over the oblique line y = mx + b where r and s are functions of p, q, m, and b is given below. Finding the linear transformation rule given equation y = mx + b involves substituting the values for m and b in the formulas below, and then using basic operations with fractions to simplify each of the six coefficients of the linear transformation rule. What a sneaky way to get kids to practice operations with fractions.

As shown in the handout, Reflection over Any Oblique Line, the linear transformation rule for reflecting over the line y = -2x + 4 is (p, q) → (-3/5p – 4/5q + 16/5, -4/5p + 3/5q + 8/5). When reflecting over the line y = 3/5x – 4, the linear transformation rule is (p, q) → (8/17p + 15/17q + 60/17, 15/17p – 8/17q – 100/17). The graph below shows the reflection images of polygons over the lines y = -2x + 4 and y = 3/5x – 4.

The linear transformation rule (p, s) → (r, s) for reflecting a figure over the oblique line y = mx + b where r and s are functions of p, q, b, and θ = Tan-1(m) is shown below. Finding the linear transformation rule given the equation of the line of reflection equation y = mx + b involves using a calculator to find angle θ = Tan-1(m), and then calculating each of the six coefficients of the linear transformation rule.

The handout, Reflection over Any Oblique Line, shows the derivations of the linear transformation rules for lines of reflection y = √(3)x – 4 and y = -4/5x + 4.

• Line y = √(3)x – 4: θ = Tan-1(√(3)) = 60° and b = -4. The corresponding linear transformation rule is (p, q) → (r, s) = (-0.5p + 0.866q + 3.464, 0.866p + 0.5q – 2).
• Line y = -4/5x + 4: θ = Tan-1(-4/5) = -38.66° and b = 4. The corresponding linear transformation rule is (p, q) → (r, s) = (0.2195p – 0.9756q + 1.9512, -0.9765p – 0.2195q + 2.4390).

The graph below shows the reflection images of a polygon over the lines y = √(3)x – 4 and y = -4/5x + 4.

Suggestions for activities that teachers might consider:

1. Give students a sheet of graph paper with the line of reflection and preimage polygon drawn. Also give them the equation of the line of reflection and the linear transformation rule corresponding to the equation of the line of reflection. Have students use the linear transformation rule to calculate the vertices of the image polygon, and then draw the image polygon. A completed assignment should include lists of the x-y coordinates of the vertices of the preimage and the image polygon.
2. Give students a sheet of graph paper with the line of reflection and preimage polygon drawn. Have students find the equation of the line of reflection in slope-intercept format, and the linear transformation rule corresponding to the equation of the line of reflection. Depending on the level and interest of the students, allow students to calculate transformation rule coefficients in terms of parameters m and b or θ and b. Then have students use the linear transformation rule to calculate the vertices of the image polygon and draw the image polygon. A completed assignment should include lists of the x-y coordinates of the vertices of the preimage and the image polygon.
3. Have upper level students derive the linear transformation rule with parameters m and b. As illustrated in the handout, Reflection over Any Oblique Line, explain and discuss the general strategy for deriving the linear transformation rule with parameter m and b. Derivation of the equations for a linear transformation only requires an understanding of concepts already encountered in their math classes. This is a great activity for promoting mathematical reasoning and presenting ideas in an organized manner to explain mathematical relationships.
4. Have upper level trig students derive the linear transformation rule with parameters θ and b. Using the handout, Reflection over Any Oblique Line, as a guide, review and discuss the trig identities needed to convert the six coefficients of a linear transformation with parameters m and b to the coefficients of a linear transformation with parameters θ and b. Students now have a need to use trig identities.
5. If students have access to the appropriate technology, have them do a project in which they graph the reflection image of a polygon over an oblique line y = mx + b. The completed project should include the following items: 1) A graph showing the line of reflection, preimage polygon, and image polygon. 2) The equation of the line of reflection. 3) A describtion of the linear transformation rule corresponding to the equation of the line of reflection. 4) A list of the x-y coordinates of the vertices of the preimage polygon. 5) A list of the x-y coordinates of the vertices of the image polygon. Students who have access to a TI-84 graphing calculator can use the 13-step algorithm given in the handout Reflection over Any Oblique Line.
6. The handout, Reflection over Any Oblique Line, shows how linear transformation rules for reflections over lines can be expressed in terms of matrix multiplication. After showing students matrix multiplication based transformation rules, they better understand why matrix multiplication is done the way it is. Programmers use matrix multiplication to perform 2D and 3D transformations of objects on a computer screen. Computer video cards are optimized to perform millions of matrix multiplications per second.
7. Recruit a team of computer programming geeks in your school to write a program that calculates the x-y coordinates of a reflection image of a figure over any oblique line y = mx + b, and then graph the line of reflection, the preimage figure, and the image figure. The set of features the program could offer is limited only by the ability and imagination of the programmers.

## Geometric Transformations to Practice Basic Skills and Introduce Fundamental Concepts

This post shows how learning to apply geometric transformation rules to slide, reflect, rotate or resize a figure can benefit students. Geometric transformation graphing activities can help students learn important math concepts in the following ways:

• Learn how to interpret a symbolic description of a geometric transformation rule to find the image point of a preimage point.
• Learn what it means to reflect a figure over a line.
• Learn what it means to slide or translate a figure.
• Learn what it means to rotate a figure about a point.
• Learn what it means to stretch or shrink a figure.
• The idea that preimage and image points is equivalent to the idea of function inputs and outputs.
• Worthwhile practice with the basic operations of signed numbers.
• Worthwhile practice plotting points and drawing geometric transformation images.
• A tacit introduction to the important mathematical concepts of function, inverse of a function and composition of functions.

This post does not discuss the general theory of affine transformations nor does it discuss the study of geometry from a geometric transformation point of view. For a general discussion of 2D matrix based geometric transformations, download my free handout Matrix Geometric Transformations or visit our free instructional content page.

The table below describes the geometric transformations considered in this post. Assume constants j and k are positive.

Transformation Operation
Reflect point (x,y) over the x-axis. (x,y) → (x,-y)
Reflect point (x,y) over the y-axis. (x,y) → (-x,y)
Reflect point (x,y) over the line y = x. (x,y) → (y,x)
Translate or slide point (x,y) right/left j units and up/down k units. (x,y) → (x ± j, y ± k)
Rotate point (x,y) 90° CW about (0,0). (x,y) → (y,-x)
Rotate point (x,y) 90° CCW about (0,0). (x,y) → (-y,x)
Rotate point (x,y) 180° about (0,0). (x,y) → (-x,-y)
Expand or contract point (x,y) by a factor of k from (0,0). (x,y) → (kx,ky)

The setup and parameters for a geometric transformation activity are shown below:

1. Each student is provided a handout containing directions for the activity, an x-y coordinate axes with the graph of the preimage polygon drawn in black, a symbolic description of a geometric transformation, a table for the preimage points, and blank table for the image points to be filled in by the student. I prefer lattice point coordinate axes, but grid line coordinate axes are fine. The coordinate axes should be properly labeled and laid out so that it’s easy to plot points. It’s important that the coordinate axes be drawn with a 1:1 aspect ratio so that perpendicular lines appear to be perpendicular and graphs of circles appear to be circles, not ovals.
2. Each student should have a ruler to aid in drawing graphs. Sloppy hand drawn graphs are not allowed. I have found that a 6 inch or 15 cm ruler works best.
3. It is assumed that students can do the basic operations with signed numbers and plot points.
4. No calculators allowed; strictly old school. Students may use scratch paper of course.
5. The initial preimage point is arbitrary; just move from vertex to vertex around the polygon in either a clockwise or counterclockwise direction.
6. To enhance the visual effect, allow colored ink pens or pencils to draw the image figures.

The tables and graphs below show the results of reflecting the same black preimage figure over the x-axis, the line x = -4 and the line y = x. Normally a geometric transformation graphing activity should have no more than two transformations to perform on a figure, but to conserve space three transformation images are graphed on the same x-y coordinate axes. The tables of x-y coordinates of the image points are color coded to match the color of the image polygon. In an actual transformation activity handout for students, the column of image point x-y coordinates is blank. The first two or three rows of the tables may show both preimage and image point coordinates to help students understand how the transformation rule works. The reflection over the line x = -4 is accomplished by chaining together transformations as follows:

1. Slide the polygon right 4 units.
2. Reflect the image over the y-axis.
3. Slide the last image left 4 units.

The next demonstration involves a slide, rotation and size transformations of a preimage polygon drawn in black. The 90° counterclockwise rotation about (-2, 1) is accomplished by chaining together three transformations as follows:

1. Slide the polygon right 2 units and down 1 unit.
2. Rotate the image 90° counterclockwise about (0, 0).
3. Slide the last image left 2 units and up 1 unit.

The image polygon drawn in green was obtained by chaining together a size transformation with expansion factor = 1.5 and a 180° rotation about (0, 0).

The graph below shows the decomposition of the geometric transformation (x, y) → (-y + 3 , x – 13) that rotates the black flag 90° counterclockwise about the point (8, – 5). Using the transformation mapping functions in the table above and the graphs of the 4 flags below, we can see that the geometric mapping function can be created as follows: (x, y) → (x – 8, y + 5) → (-(y + 5), x – 8) → (-(y + 5) + 8, x – 8 – 5) = (-y + 3, x – 13). Note that the transformations (x, y) → (x – 8, y +5) and (x, y) → (x + 8, y – 5) are inverse transformations.

Suggestions for fun follow up activities relating to geometric transformations:

• After graphing the reflection image of a polygon over a line, have students fold the sheet of graph paper on the reflecting line, and then hold the sheet of graph paper up to the light to verify that preimage and image polygons are congruent.
• After translating a polygon, use the theorem of Pythagoras to determine the magnitude of the slide and a protractor to determine the polar direction of the slide where the polar direction ranges from 0° to 360°.
• Have students use a compass and protractor to verify that a polygon has been rotated a certain number of degrees about a point.
• Let students be creative by having them make up their own transformation rule, and then use the rule to graph the image of a preimage polygon. Exceptional work can be posted in the classroom for all to enjoy.
• Give students a graph similar to the graph above, and have them find a geometric transformation rule that maps a preimage to an image. You can let the preimage be any of the figures in the graph, and the image can be any of the other figures. You will be amazed to see that some students struggle to find a transformation rule that maps a given preimage figure onto itself, but this can be a great teaching opportunity!
• Given the graphs of a preimage polygon and the image polygon under a size transformation, find the lengths of corresponding side pairs and verify that the ratios of the lengths of corresponding side pairs are equal.
• Tell students that geometric transformations make it possible for game developers to create whose wonderful video games they love to play.

Here’s some exercises based on the examples in this post that you can give to your students:

Introduction to Geometric Transformations (student version)

Introduction to Geometric Transformations (teacher version)

## Giving Students Meaningful Practice with Signed Numbers

The purpose of this post is to show how I have used simple equation graphing activities very early in a beginning algebra course to practice basic operations with signed numbers. Students not only practice applying the rules for adding, subtracting, multiplying and dividing signed numbers, they also learn how to plot x-y data pairs, draw graphs of equations, and get a glimpse of future course concepts which include the ideas that 1) equations and graphs of equations describe a relationship between two variables and 2) variables in linear relationships change at a constant or steady rate with respect to each other. After students have learned how to do the basic operations with signed numbers, there is no real reason to wait another two or three chapters in the book to start learning how to graph simple equations. They now have a reason to use what they have just learned.

You can download two free graphing activities by clicking the links below. These activities are examples of the approach presented in this post that you can directly use with your students or as a starting point for making your own activities.

Intro to Graphing Equations 1 (student version)

Intro to Graphing Equations 2 (student version)

🙂 The completed teacher versions of these activities are also available on our free instructional content page under the algebra and pre-calculus tab.

I will begin by describing the setup and parameters for a graphing activity.

1. Each student is provided a handout containing directions for the activity, equations to be graphed, a table of equation input values, and x-y coordinate axes. I prefer lattice point coordinate axes, but grid line coordinate axes are fine. The coordinate axes should be properly labeled and laid out so that it’s easy to plot points.
2. Each student should have a ruler to aid in drawing graphs. Sloppy hand drawn graphs are not allowed. I have found that a 6 inch or 15 cm ruler works best.
3. No ink pens or calculators allowed; strictly old school. Student may use scratch paper of course.
4. The input values for each equation are carefully selected so that most points in the relation are integer pairs, and the key features of the graph are graphed.
5. Even if all values in a table are the same, students are required to write every value in the table; no down arrows to indicate that numeric values continue.

Shown below are sample equations and table setups that I have used to introduce graphing equations to my students. My handouts usually have two or three equations with tables located at the sides and/or bottom of a blank x-y coordinate axes. The tables presented in this post show the output values in red color text. In an actual graphing activity handout for students, the column of output values are blank. This is brand new stuff for beginners, and therefore I do a lot of coaching by explaining what the equations mean, and by doing a few of each type of problem. What is obvious to more advanced students is not so obvious to beginning students.

Tables A, B and C below are similar to tables that I have used to introduce graphing equations. These equations are so simple that some students initially find these equations somewhat difficult to understand; it’s true. As shown below, I like to give intuitive descriptions of the equations.

• Table A: The value of the y-variable always equals the opposite of x.
• Table B: No matter what x equals, the value of y always equals 7.
• Table C: No matter what y equals, the value of x always equals -6.

The equations in tables D, E and F give students meaningful practice adding, subtracting and multiplying signed numbers. After filling in the tables, hopefully some students will notice a common pattern in the tables in that the y-variable goes up or down a certain amount whenever the x-variable goes up or down a certain amount. Depending on the class, I might ask students if they see a way to predict the steady rate of change between the variables from the equation. Later in the course, I use similar tables and corresponding graphs to show the relationship between the slopes of parallel lines and perpendicular lines. Intuitive descriptions of the equations D, E and F are shown below.

• Table D: y always equals 2/3 of x plus 4.
• Table E: y always equals 2/3 of x minus 2.
• Table F: y always equals the opposite of 3/2 of x plus 1.

The equations in tables G, H and I give students more meaningful practice adding, subtracting and multiplying signed numbers. The equation x + y = 4 requires students to think differently because the y-variable is not explicitly stated in terms of the x-variable. After filling in the table, hopefully students will notice patterns in the tables. Depending on the class, I might discuss the steady rate of change pattern in table G and the symmetry patterns in tables H and I. Intuitive descriptions of the equations G, H and I are shown below.

• Table G: The sum of x and y must always equal 4.
• Table H: y always equals x squared minus 8.
• Table I: y equals the product of the quantities (x + 2) and (x – 4).

After filling in the tables of equation x-y data pairs, I decrible how equations should be graphed as follows:

1. For each x-y data pair that fits on the x-y coordinate axes provided, draw a heavy dot at location (x, y). The x-value indicates how many spaces to the left/right of the origin (0, 0) the point is. The y-value indicates how many spaces above/below the x-axis the point is.
2. The points for equations A through G should fall on a straight line. If they don’t, correct the mistake in your table and replot the point.
3. For each of the graphs A through G, use your ruler to draw a line segment through all of the equation points. At each endpoint of the line segment, draw an arrow to indicate that the graph continues forever in both directions.
4. The graphs of equations H and I are named parabolas. If the points don’t fall on a smooth U shaped curve, correct the mistake in your table and replot the points.
5. For graphs H and I, draw a smooth U shaped curve through the x-y data pairs. At each endpoint of the parabolic curve, draw an arrow to indicate that the graph continues forever in both directions.
6. Remind students that they are only plotting a small sample of the infinitely many x-y real number data pairs that satisfy the equation, not just x-y integer pairs.

After drawing the graph of an equation, I show students what the graph of some equations should look like so that they can make corrections before turning in the graphing activity for grading. Shown below are the graphs of equations A through I. I cheated by using my equation graphing program.

I will close this post by mentioning that readers can download blank x-y coordinate axes graphs in either lattice point or grid line format by clicking the links below. These graphs are in JPEG format which makes it easy to paste and resize them to create handouts, tests, presentations, etc.

Blank graph with grid lines (5×5 x-y axes scale)

Blank graph with grid lines (10×10 x-y axes scale)

Blank graph with grid lines (15×15 x-y axes scale)

Blank graph with lattice points (5×5 x-y axes scale)

Blank graph with lattice points (10×10 x-y axes scale)

Blank graph with lattice points (15×15 x-y axes scale)

🙂 These blank graphs are also available on our free instructional content page under the algebra and pre-calculus tab.

## Getting Comfortable with Negative Exponents

This post shows how I use a reciprocal pairs approach to introduce zero and negative integer exponents to my students. Several exercises that I have used to make students more comfortable using zero and negative integer exponents are also included. It seems to me that students learn to tolerate negative exponents, but they are not really comfortable using negative exponents.

I begin my intuitive discussion of negative exponents by creating a table of the first 4 positive integer powers of an integer such as 6 for example. Refer to the table below.

From this point, the discussion goes something like this:

• What do we do to 1,296 to get 216? What do we do to 216 to get 36?
• Some groups immediately notice that we divide by 6 to get the next number in the list, and other groups require a bit of coaching to see that we divide by 6 to get the next number.
• In order to maintain the pattern, it’s clear that the fifth row of the table must be 60 = 1.
• To get the remaining rows, I say, “Reduce the exponent by one and divide by whole number six to get the next fraction in the list.” (Some students see a rational number like 3/8 only as a single entity, not one whole number divided by another whole number. Also some groups need to be reminded how a fraction is divided by a whole number.)
• As shown in the diagram, I bracket the reciprocal pairs of numbers in the list.
• Now the important question; “What is the relationship between bracketed pairs of numbers?”
• Some groups immediately notice the reciprocal pair relationship, and other groups need a little coaching to see the relationship. It takes a lot of coaching to get them to say out loud, “They are reciprocal pairs because all products of a pair of bracketed numbers equals 1.”
• I point out that we could do the same process with any nonzero real number, but the math might be a little messy.

Shown below is a reciprocals pairs table for -2/5 and -5/2. If a teacher decides to show his/her class a reciprocal pairs table for two fractions, and fraction operation skills are fragile, I strongly advise that the implied multiplication and division of fractions in the table be explicitly demonstrated. It’s sufficient to demonstrate multiplication and division of fractions for one or two lines in the table.

After exploring one or two tables of reciprocal number pairs, I give my students an informal summary of what can be deduced from the table. Of course, the concepts that I discuss depends on the class I’m teaching. Base b equals any nonzero real number, p is an integer, and x and y are real numbers. Students should use their calculators to verify the specific examples.

Concept Example
b0 = 1 3.140 = 1
1 / (x/y) = y/x 1 / (-7/2) = -2/7
All real numbers have an implied exponent of one. π = π1
Changing the sign of the exponent of a number gives us the reciprocal of the number. 4-1 = 1/4
If integer n > 0, bn means repeated multiplication of b by itself n times. 43 = 4•4•4 = 64
If integer n > 0, b-n means repeated multiplication of 1/b by itself n times. 4-3 = (1/4)•(1/4)•(1/4) = 1/64
b-p = (1/b)p (1.2)-5 = (5/6)5
bp = (1/b)-p (-2.25)3 = (-1/2.25)-3
xy = y / (1/x) 0.008x = x/125
If x > 0, Log(x) = -Log(1/x) because logarithms are exponents. Log(5) = -Log(0.2) ≈ 0.699
The graphs of y = a(bx) and y = a(1/b)-x are equal. See graph below.
The graphs of y = a(bx) and y = a(b-x) are reflection images of each other over the y-axis because the graphs of y = f(x) and y = f(-x) are always mirror images over the y-axis. See graph below.

I will close this post by showing you some practice exercises that I have used to promote understanding of negative exponents, and to increase student comfort level in working with negative exponents. One may think that these exercises are nothing more than mental gymnastics, however, calculus students need to know how to rewrite expressions in terms of negative and fractional exponents. Readers can download my free handout, Properties of Exponents and Logarithms, by going to the algebra and pre-calculus tab in our instructional content page. This handout is filled with examples demonstrating the laws of exponents and logarithms.

## Addition, Subtraction and Vectors

Early in a beginning algebra course, students are taught how to add and subtract signed numbers. Addition of signed numbers is taught by giving students a set of rules that they can follow to get the right answer. Some number line diagrams are thrown in to illustrate addition of signed numbers. Subtraction of signed numbers is usually taught by the “add the opposite” rule. This rule sounds plausible, however, it does not give students any insight into what subtraction is all about from a geometric point of view. You might ask, “Isn’t learning how to apply a set of rules to get the answer sufficient?” In my view, it’s not. As I stated several times in previous posts, whenever possible, students should understand a math concept from both an algebraic and geometric point of view. The primary purpose of this post to show how I have used vector diagrams to illustrate addition and subtraction of real numbers and 2D vectors. I will also discuss geometric interpretations of expressions and relationships such as (a + b)/2, |x – 4| < 5, and |x – 5| > 7.

Based on my own experience, most kids quickly learn how to apply the rules for adding and subtracting positive and negative numbers. When simplifying polynomial expressions, rational polynomial expressions, and polynomial long division, most mistakes occur at the step where a negative number is subtracted. Students are generally pretty good at adding signed numbers, but a little weak when it comes to subtracting signed numbers. This is why my favorite high school math teacher, Vivian Jones, said, “When subtracting a number, just change the sign of the number and add”. This is what I tell my college algebra students when they do polynomial long division. As taken from a developmental algebra textbook, the rules for adding and subtracting signed numbers are as follows:

Adding Two Real Numbers a and b

• If a and b have the same sign, add their absolute values. Use the common sign of a and b as the sign of the answer.
• If a and b have different signs, subtract their absolute values. The sign of the answer is the sign of the number that has the largest absolute value.

Subtracting Two Real Numbers a and b

• ab = a + (-b)
• In other words, ab equals a plus the opposite of b
Vector diagrams similar to diagrams A, B and C below are used to illustrate how the addition and subtraction rules for signed numbers work. The bottom half of diagram A shows that two negatives do not necessarily make a positive.

Diagrams B and C illustrate the subtraction rule for signed numbers. The problem with the subtraction rule and the corresponding vector diagram is that they don’t give us any insight into what subtraction is all about from a geometric point of view.

Diagrams D and E below illustrate the idea that subtracting two real numbers gives us the directed distance between two reals numbers. The concept of directed distance is fundamental in understanding subtraction from a geometric point of view. For real numbers a and b, the directed distance from b to a = a – b, and the directed distance from a to b = ba. The positive distance or just the distance from a to b = |a – b| = |b – a|. The distance concept is related to many concepts in mathematics such as the amount of change in a variable, how much a data value deviates from some fixed constant, margin of error, etc. Notice that the subtraction problems in diagrams D and E are the same problems in diagrams B and C. After comparing diagrams B and C with diagrams D and E, it becomes clear that diagrams D and E give us a much better way to understand subtraction from a geometric point of view.

We will now take a look at 2D vectors which are essential in understanding a variety of concepts in math and physics. We can treat 2D vectors as line segments that have the properties of length and direction. Any two vectors are equivalent if and only if they have the same length and direction. In this post, 2D vectors will be denoted by bold face capital letters, and a pair of vertical absolute value bars will denote the length or magnitude of a vector. The arrow at one tip of a segment indicates the direction the vector. Geometric rays have infinite length, and therefore 2D vectors are not geometric rays. In passing, I will mention that 2D vectors are just a special case of an abstract mathematical object named vector. If you want to stretch your mind, take a course in infinite dimensional vector spaces. The student and teacher versions of my free handout, Introduction to Vectors, can be downloaded by going to the trigonometry section of our instructional content page.

The graph below shows how two 2D vectors are added. All vectors drawn in the same color are equal to each other because they have the same length and direction. All 2D vectors can be represented by a pair of real numbers of the form < x, y > where x and y equal the x-component and y-components of the vector. Knowing the x-y components of a vector, it’s easy, at least for trig students, to calculate the vector’s magnitude and direction. Note the following as you study the graph:

• A 2D vector can be expressed as the sum of its x-component and y-component. Example: Vector A = < -7, 0 > + < 0, 3 > = < -7, 3>.
• To find the x-y components of a vector, start at the tail of the vector and count the number of spaces left/right and the number of spaces up/down to the head of the vector.
• The x-y components of any two equivalent vectors are equal.
• The tail of the second vector in a vector sum is located at the tip of the first vector.
• Vector addition is commutative. In other words, it makes no difference in what order vectors are added.
• Any two equivalent vector pairs will always result in equivalent vector sums.
• The theorem of Pythagoras is used to calculate the length or magnitude of a vector.
• The inverse tangent function, Tan-1(x), is used to calculate the direction of a vector.
• Vectors A, B and S = A + B = B + A in the diagram have the following properties:
• A = < -7, 3 >, |A| = √(58) units, and direction of A ≈ 156.800
• B = < 3, 5 >, |B| = √(34) units, and direction of B ≈ 59.040
• S = < -4, 8 >, |S| = √(80) units, and direction of S ≈ 116.570
• |A| + |B| > |S|

The graph below shows how two 2D vectors are subtracted. Vector subtraction gives us a vector that represents a difference vector between the tips of the two vectors. Vector AB has its tail at the tip of B and its head at the tip of A.  Vector BA has its tail at the tip of A and its head at the tip of B. All vectors drawn in the same color are equal to each other because they have the same length and direction. Note the following as you study the graph:

• The difference vector connects the tip of one vector to the tip of the other vector.
• Vector subtraction is not commutative. Vectors AB and BA have the same length, but they point in opposite directions; they are vector opposites.
• Vectors A, B, AB,  BA have the following properties:
• A = < 6, 2 >, |A| = √(40) units, and the direction of A ≈ 156.800
• B = < 2, 9 >, |B| = √(85) units, and the direction of B ≈ 59.040
• AB = < 4, -7 >, |A – B| = √(65), and the direction of A – B ≈ 299.750
• B – A = < -4, 7 >, |B – A| = √(65), and the direction of B – A ≈ 119.750

Once a student understands addition and subtraction from a geometric point of view, many math problems become much easier to solve. Consider the three routine math problems shown below.

Problem 1: Suppose the IQ score I of a person is in the normal range if the IQ score deviates from 100 by 10 points or less. What interval on a number line and inequality describes a normal IQ score?

Solution: The expression |I – 100| gives us the positive distance of the variable I from 100. Therefore the range of normal IQ scores is described by the inequality |I – 100| ≤10.

Problem 2: A part will fail inspection if its diameter d deviates from 2.5 cm by more than 0.001 cm. What interval on a number line and inequality describes the rejection region?

Solution: A part will fail inspection if the positive distance from 2.5 to d is more than 0.001 cm. Therefore the rejection region can be described by the inequality |d – 2.5| > 0.001. Of course, we tacitly assume that there are practical restrictions on values of d.

Problem 3:  The graph of the closed interval [0.84, 2.68] is shown below. Find the following:

• Length of the interval
• Coordinate of the midpoint M
• Radius of the interval
• Write an inequality that describes the interval.

Solution: (Many of my elementary statistics students initially struggle with review problems like this.)

• Length of interval = 2.68 – 0.84 = 1.84
• Coordinate of midpoint M = (0.84 + 2.68)/2 = 1.76
• Radius of the interval = 1.84/2 = 2.68 – 1.76 = 1.76 – 0.84 = 0.92
• Inequality: |x – 1.76| ≤ 0.92

Miscellaneous facts I tell my students:

• If you subtract a smaller number from a bigger number, the answer is positive.
• If you subtract a bigger number from a smaller number, the answer is negative.
• If you subtract a positive number from n, the answer is smaller than n.
• If a positive influence is removed from your personal life, the quality of your personal life goes down.
• If you subtract a negative number from n, the answer is bigger than n.
• If you remove a negative influence from your person life, your personal life gets better.
• If you add a negative number to n, the answer is smaller than n.
• If a negative influence is introduced into your personal life, your personal life gets worse.
• To find out how far apart two numbers are, subtract the numbers.
• To find a number half way between two numbers, find the average of the numbers.

I will close this post with a true story about an epiphany I experienced early in my teaching career. The class was a regular high school geometry class. We were learning how to solve story problems involving complementary and supplementary angles. I could see that little Elmo (not his real name) was not getting the idea that if x is the measure of an acute angle, then 90 – x is the measure of the complement of the angle. So I asked Elmo a series of about 5 questions like: If an angle measures 200, what is the degree measure of the complement of the angle? Elmo got every one of my questions right. I then asked Elmo the following question: If an acute angle measures n degrees, what is the degree measure of the complement of the angle? All I got from Elmo was a blank stare. I’m thinking to myself, why doesn’t he get it? Then it hit me. When asked the degree measure of the complement of a 650, Elmo figured out how many degrees he needed to add to 650 to get 900. For me, this was an enlightening and humbling experience.