How do Trigonometric functions work?
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.
Trigonometric functions are a fundamental component of mathematics and have applications in various fields, including physics, engineering, and computer graphics. These functions provide a way to relate angles to ratios of two sides of a right triangle. In this article, we will explore how trigonometric functions work, diving into their definitions, properties, and applications.
Overview of Trigonometric Functions
The primary trigonometric functions are sine, cosine, and tangent. They are typically defined in the context of a right triangle or the unit circle. Other related functions, known as reciprocal functions, include secant, cosecant, and cotangent.
Definitions via Right Triangle
Consider a right triangle with an angle , opposite side , adjacent side , and hypotenuse . The trigonometric functions are defined as follows:
- Sine ():
- Cosine ():
- Tangent ():
Reciprocal Functions
- Cosecant ():
- Secant ():
- Cotangent ():
Definitions on the Unit Circle
In the unit circle approach, a circle with a radius of 1 is centered at the origin of the coordinate plane, with representing the angle from the positive x-axis. Points on the unit circle have coordinates . The unit circle allows for an easy extension of trigonometric functions to all real numbers beyond just angles of a right triangle.
Pythagorean Identity
A fundamental identity derived from trigonometric functions is the Pythagorean identity:
This identity holds true for any angle and is crucial for simplifying expressions involving sine and cosine.
Trigonometric Function Properties
Periodicity
Trigonometric functions exhibit periodic behavior, which means they repeat their values over regular intervals. For sine and cosine, the period is , whereas the period for tangent is :
Symmetry
Trigonometric functions also demonstrate symmetrical properties:
- Sine is an odd function: .
- Cosine is an even function: .
- Tangent is an odd function: .
Key Angles and Values
Trigonometric functions exhibit known values at specific angles, often expressed in degrees or radians, such as , , , , and .
| Angle (degrees) | Angle (radians) | |||
| 0° | 0 | 0 | 1 | 0 |
| 30° | $\frac{π}{6}$ | $\frac{1}{2}$ | $\frac{\sqrt{3}}{2}$ | $\frac{\sqrt{3}}{3}$ |
| 45° | $\frac{π}{4}$ | $\frac{\sqrt{2}}{2}$ | $\frac{\sqrt{2}}{2}$ | 1 |
| 60° | $\frac{π}{3}$ | $\frac{\sqrt{3}}{2}$ | $\frac{1}{2}$ | $\sqrt{3}$ |
| 90° | 1 | 0 | Undefined |
Applications of Trigonometric Functions
Trigonometric functions have extensive applications across different areas:
Physics
In physics, trigonometric functions describe oscillations and wave behavior, such as sound waves, light waves, and the motion of pendulums. The functions help solve problems related to forces, angles of inclination, and velocity components.
Engineering
Engineers use trigonometry in fields such as civil, mechanical, and electrical engineering to design structures, analyze forces, and model physical systems. Trigonometry is crucial in signal processing, telecommunications, and control systems.
Computer Graphics
In computer graphics, trigonometric functions manipulate angles, create rotations, and determine lighting and perspective projections. These functions help render 3D objects on 2D displays by calculating angles, distances, and transforming coordinates.
Astronomy
Astronomers use trigonometry to calculate distances between celestial bodies, measure angles in parallax, and predict the orbits of planets and stars.
Conclusion
Trigonometric functions, with their rich set of properties and identities, are a cornerstone of mathematics. They bridge geometric concepts with analytical approaches to offer solutions for various practical and theoretical problems. Mastering these functions is essential for advancing in many scientific and technical domains.
Related reading
- How do you calculate the average of a set of circular data?
- How do you find a point at a given perpendicular distance from a line?
- How do you round UP a number?
- How do you round UP a number?
- How does one divide a big integer by another big integer?
- How does tf.multinomial work?
- How does tf.multinomial work?
- How does this solution of Project Euler Problem 27 in the Haskell Wiki work?

DSA Fundamentals
Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.