Including the Boundary

Introduction

Welcome back to Understanding Inequalities! This is the second lesson of the course, and you are building momentum. In our first lesson, we learned how the symbols << and >> express which of two quantities is larger or smaller. Those two symbols handle a lot of comparisons, but they leave out one important scenario: what happens when a value is allowed to equal the boundary, not just stay above or below it? That is exactly what this lesson is about. Today we introduce the symbols \leq and \geq, and we will see why that small horizontal line underneath makes a big difference.

When the Boundary Itself Counts

Think about a speed limit sign that reads 65 mph. Are you breaking the law at exactly 65? No — driving at 65 is perfectly fine. The limit includes 65 itself. Now think about a concert that admits only people under 18 for a youth discount. If you are exactly 18, you do not qualify. The boundary, 18, is excluded.

These two situations feel different because one includes the boundary value and the other does not. The strict symbols << and >> from our first lesson handle the second type. To handle the first type, we need a new pair of symbols that say "or equal to." That is where \leq and \geq come in.

The Inclusive Symbols: ≤ and ≥

Strict vs. Inclusive at a Glance

Sign up

Join the 1M+ learners on CodeSignal

Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal