Introduction

Welcome to Rational Numbers and Terminating Decimals, the first course in your learning path through the real number system! Since this is our very first lesson together, we are starting right at the foundation. By the end of this lesson, we will have a clear and confident understanding of what a rational number is, and we will be able to spot one no matter how it is dressed up: as a whole number, a fraction, a negative value, or a familiar decimal.

The Everyday Numbers Around Us

Before we write any formal definitions, let's pause and notice something. Think about the numbers that show up in daily life: the price on a coffee cup ($3.503.50), the temperature outside (2-2), a half-cup of flour (12\frac{1}{2}), or the number of eggs in a carton (12). These numbers look quite different from one another. Some have decimal points, some have fraction bars, and some are just plain whole numbers.

What Makes a Number Rational?

A rational number is any number that can be written as a fraction of two integers, where the bottom integer is not zero. In mathematical notation, we say a number rr is rational if it can be expressed as:

r=ab,where a and b are integers and b0r = \frac{a}{b}, \quad \text{where } a \text{ and } b \text{ are integers and } b \neq 0
Integers as Rational Numbers

One of the most common surprises for new learners is that every integer is already a rational number. Consider the number 77. We can write it as:

7=717 = \frac{7}{1}

The numerator is 77 (an integer), and the denominator is (a nonzero integer). That satisfies our definition perfectly. The same idea works for negative integers and zero:

Signed Fractions and Finite Decimals

Fractions with negative signs are rational as well, because the negative sign simply makes the numerator (or denominator) a negative integer. For example, 34-\frac{3}{4} can be viewed as 34\frac{-3}{4}. Both and are integers, and , so the definition is satisfied.

Recognizing Rational Numbers at a Glance

Now that we have explored each form individually, let's bring them together into a quick-reference checklist. When someone hands you a number and asks, "Is it rational?", your job is to determine whether it can be written as ab\frac{a}{b} with integer aa, integer bb, and b. Here is how the most common forms map to that test:

Conclusion and Next Steps

In this lesson we established the definition of a rational number: any value that can be written as ab\frac{a}{b} where both aa and bb are integers and b0b \neq 0. We saw that integers, signed fractions, and finite decimals all belong to this set, even though they look very different on the surface. This idea will be the foundation for everything else in the course, from converting fractions to decimals to understanding why some decimals terminate while others repeat.

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