IT

GNSS and surveying · 11 February 2021

Tangent (and slope)

The tangent is the ratio of sine and cosine, it doesn't always exist, and it is the slope of a line. From the unit circle to road gradients in percent.

The tangent is another trigonometric function.
A bit like sine and cosine, but also a bit different.

The tangent is closely tied to sine and cosine.
But while those two are used to solve triangles, the tangent helps me understand something a bit more concrete, at least for those who work in measurement.
The tangent tells you the slope of something…

Put like that it is rather simplistic and reductive.
And not quite correct either.
The tangent also helps solve triangles and does much more than tell me the slope, but you know I’m looking for a simple way to talk about these things and, at least at the start of the article, I’m trying to stay on track.

In any case, for the tangent too we talk about the tangent of an angle.

tanα = sinα/cosα

The heading above is the definition of the tangent.
It is the ratio between the sine and the cosine of the same angle.
That’s why they are so closely linked.

tanα = sinα / cosα

Before going on, two things about the tangent:

  • it is a pure number (sine and cosine already were, so their ratio must be too);
  • it doesn’t always exist (?!?! – I’ll explain later).

If I look at the unit circle below and use the segments with their letters, I can write:

tanα = BC / OC

Tangent and the unit circle

Just as sine and cosine can be seen visually (because they are the two coordinates, X and Y, of point B), the tangent can be seen too.
You need to draw a couple more lines, but you’ll find it.

From point A, the origin of oriented angles, I draw the line tangent to the unit circle.

… … …

I can imagine your puzzlement.
Tangent line and tangent of an angle…

Are they the same thing?
No, they are two different things.

But you are right to be puzzled.
All that rigour and precision of mathematics, geometry and trigonometry, and then you find two things with the same name and different meanings?

That’s how it is, but it’s an isolated case.

The tangent line comes from pure geometry and refers to a line that touches a curve at a single point without cutting it (otherwise it would be a secant).

The tangent in this article is a purely trigonometric thing.

(As you’ll see in a moment, the two are actually related: the tangent of the angle is a length measured along the tangent line.)

Back to the unit circle.
After drawing the tangent line at A (there is only one, and it is perpendicular to segment OA), I extend segment OB beyond the circle.
B is a point on the circle and forms the central angle α (measured from side OA).

The two lines meet at point T.
And there’s the tangent!
The length of segment AT is the tangent of angle α.
Or, the tangent of angle α is the abscissa of point T.

Questions and answers on the tangent

“From the image above it looks as if the tangent is larger than the sine and cosine. Is that so?”
Sort of…
It is certainly larger than at least one of the two…
Sine and cosine take values between -1 and 1.
For most angles they are “zero point something”.
And dividing a number by another number smaller than 1 always gives a result larger than the starting value.
OK, it’s not a great explanation, but it sort of works…

“Are there angles for which sine, cosine and tangent are equal?”
No.
For 45° and 225° (and all angles of the form 45° + 180°) sine and cosine are equal, about 0.71 and -0.71 respectively, but there is no angle that gives the same result for the tangent.
The angle whose tangent is 0.71 is just over 35°.

“Why did you write that the tangent doesn’t always exist?”
Because there are two cases where finding a finite number, even a decimal one, for the tangent is impossible.
This is where pure arithmetic and division by 0 come in.

Can you divide a number by 0?
Sort of…
At primary school they teach you that you can’t.
Going a bit further, into the maze of more advanced arithmetic, you find that dividing any number by something closer and closer to 0 gives a larger and larger number (in absolute value, ignoring the sign), uncountable and unreachable: infinity – ∞

I’ve simplified a lot here too.
The impossibility of dividing by 0 is real and comes from the property of multiplication by 0, but if I go in there I’ll come out a few thousand words later.

There are two angles whose cosine is 0.
They are 90° and 270°.

tan90° = sin90° / cos90°
tan90° = 1 / 0 → ∞

tan270° = sin270°/cos270°
tan270° = -1 / 0 → -∞

So can you say the tangent exists for every angle?
No, because there are two (90° and 270°) for which no finite value can be given.
Actually more than two angles upset the tangent: all those you get by adding 180° in series to the right angle: 90°, 270°, 450°, 630°, 810°, …
But I’ll stop at the first turn of the unit circle.

If you go back to point T I showed you earlier, you’ll see that as point B approaches the intersection of the circle with the X axis (where the 90° flag is), T gets further and further from A until it can no longer meet the tangent line at A, and that happens exactly when the central angle is 90°.
So in this case the segment that graphically describes the tangent has a start but no end.
It is infinite!

The same goes, with the opposite sign, in the opposite quadrant, the third, heading towards 270°.

Easy angles and the periodicity of the tangent function

Below is a table with the values of sine, cosine and tangent for a series of angles (the second column gives the angle in radians).
In yellow I’ve highlighted the equal values of sine and cosine.
In light blue are the cells where the tangent is +∞ and -∞.

It isn’t obvious from the numbers above, but for the tangent too there are angles whose value is easier to remember than others.
Here they are:

  • tan0° = 0
  • tan30° = 1 / √3
  • tan45° = 1
  • tan60° = √3
  • tan90° = +∞

That’s all?
Why stop at 90°?

Because the tangent, or rather the tangent function, is periodic like sine and cosine.
Though a bit differently.

If you use a spreadsheet to plot the tangent you get something like this:

I took this image from a maths website (youmath.it), and as you can see the angles are in radians.
It changes nothing; the interesting thing is that the tangent function does repeat, but with a period of 180° (π), half the period of sine and cosine.

You can see it in the coloured table above too: after 180° the tangent values repeat.

The graph of the tangent has nothing to do with the sine wave of sine and cosine any more.

Tangent and slope

After all this fuss about angles, infinity, ratios and so on, I’m getting to something more concrete.

The tangent tells you how steep a segment or a line is.
If α is the angle it makes with the horizontal, the tangent of α is exactly the slope of the segment or line.

That’s how it is, and if you think about it, it is rather powerful, since slope turns up in lots of technical applications.
And not only those.

If I call p the slope of AB:

p = tanα

Now I’ll skip ahead a bit, but I want to tell you something more about slope.

If I take point B and project it onto the horizontal ray starting from A, I find C.
Triangle ABC is right-angled, with the right angle at C.

In a right-angled triangle, one side equals the other side times the tangent of the angle opposite the first.
This is one of the statements that let you solve right-angled triangles, and I’ll write about it in another post.
Here I’m just giving you a preview.

So:

BC = AC · tanα

tanα = BC / AC

If BC is the height h and AC is the base or distance d,
then p = h / d

This is useful when you need the slope between two points but don’t know the angle of the segment joining them.

If you’re a hiker looking at a map to find the best route to your destination, judging the slope can be important to avoid walking in the footsteps of chamois.

Slope and contour lines

Point A lies on a contour line whose elevation you know, ZA, and the same goes for B (its elevation is ZB).
If your map is to scale (and I hope it is!), you can measure the horizontal distance between A and B (on the map) and convert it to the real (horizontal) distance, d.
The slope of the segment joining A and B is then simple:

pAB = (ZB – ZA) / d

If the value is too steep, better change route.
It could be tiring and even dangerous!

Slope and percentage

If you’re a cycling fan you’ll be familiar with the gradients of the big climbs of the Giro d’Italia or the Tour de France (or maybe just the ones you ride regularly).
The Zoncolan climb, for example, has an average gradient of 12% with peaks of 22%.

You’ve probably driven past signs like the one below.
It warns you that the road ahead has a 10% gradient.

But what has slope got to do with percentages?

It is a way to make something concrete (a road) easier to understand, without using tangents and decimals, which are frankly not very intuitive.
And it is also a great way to let you know whether to turn your bike round or whether your legs are good enough to reach the top…

To get the slope as a percentage, just multiply the tangent of the angle by 100.
So the angle 5.71059313° (in decimal degrees) has a tangent of 0.1, which corresponds to a 10% gradient.
In terms of height difference over horizontal distance, it’s like saying you climbed 1 m for every 10 m travelled on the flat.

If the angle is 0, the percentage slope is 0% too.

An angle of 45°, whose tangent is 1, gives a slope of 100%.

As the degrees increase, the percentage slopes increase, but not linearly (80° corresponds to a 567% slope, a 1000% slope corresponds to an angle of 84.3°), until you reach 90°, which has no percentage slope.
Why?
Well, because the tangent of 90° doesn’t exist, and you can’t say a wall has an infinite slope.

In this case you leave slope and mathematics behind and use words: the wall is vertical.

If I know the slope I can work back to the angle with the inverse tangent formula.
But that’s another topic!
🙂

← All articles