Sine and Cosine – A friendly guide to the unit circle

Welcome to the world of sine and cosine! These two functions are the backbone of trigonometry, and they’re much simpler than they seem. In this article, we will explore the unit circle, the home of sine and cosine, and learn how they map angles to coordinates. By the end, you will see why sine and cosine are so powerful.

Somehow the rule always works. Magic!

What is the Unit Circle?

The unit circle is a circle with a radius of 1, centered at the origin (0,0) in the Cartesian plane. Every angle θ (theta) corresponds to a unique point on the circle. The x-coordinate of that point is cos θ, and the y-coordinate is sin θ.

Think of the unit circle as a compass:

  • The red line (x-axis) represents cos θ.
  • The blue line (y-axis) represents sin θ.

Here’s how it looks in Python:


Let’s start with four cardinal directions:

  • : Facing right (east). Coordinates: (1, 0).
    • cos 0° = 1sin 0° = 0.
  • 90°: Facing up (north). Coordinates: (0, 1).
    • cos 90° = 0sin 90° = 1.
  • 180°: Facing left (west). Coordinates: (-1, 0).
    • cos 180° = -1sin 180° = 0.
  • 270°: Facing down (south). Coordinates: (0, -1).
    • cos 270° = 0sin 270° = -1.

These are your compass points on the circle!

Friendly Angles: 30°, 45°, 60°

Now, let’s meet three special friends:

  • 45° (π/4):
    • cos 45° = sin 45° ≈ 0.707.
    • Why? Imagine walking northeast: equal steps east and north!
  • 30° (π/6):
    • cos 30° ≈ 0.866sin 30° = 0.5.
    • Think of a gentle slope: mostly east, a little north.
  • 60° (π/3):
    • cos 60° = 0.5sin 60° ≈ 0.866.
    • Now the slope is steeper: mostly north, a little east.

These ratios come from splitting triangles. For example, at 30°, the triangle’s sides are in the ratio 1:√3:2. Here’s the Python code to visualize these angles:

Quadrant Symmetry: Signs Change, Ratios Stay!

Angles love symmetry! Let’s pick α = 15° and see its friends:

  • 15°: Small step northeast → (0.966, 0.259).
  • 165°: Mirror over y-axis → (-0.966, 0.259).
  • 195°: Mirror over both axes → (-0.966, -0.259).
  • 345°: Mirror over x-axis → (0.966, -0.259).

Notice the pattern:

  • cos(180°-α) = -cos α (x flips sign).
  • sin(180°-α) = sin α (y stays positive).

The circle is full of these mirrored friendships!


The Never-Ending Cycle: Periodicity

Sine and cosine repeat every 360°. After a full rotation, they restart! This is called periodicity.

  • cos(θ + 360°) = cos θ (same x-coordinate).
  • sin(θ + 360°) = sin θ (same y-coordinate).

They’re like seasons: predictable, reliable, and eternal!


The Golden Rule: Pythagorean Identity

Here’s their golden rule:
cos²θ + sin²θ = 1.

Why? Imagine a right triangle inside the circle. The legs are cos θ (x) and sin θ (y). The hypotenuse is the radius (1). Pythagoras says:

So x² + y² = 1! This rule always holds.

The complete code is in GitHub here:

https://github.com/Vitosh/Python_personal/blob/master/YouTube/026_Python-Sine-And-Cosine/026_Sine-and-Cosine-for-beginners.ipynb

Enjoy it!  🙂

 

Tagged with: , , ,