Real numbers
Algebra works with numbers and with letters that stand for numbers. This page reviews the real numbers: the kinds of numbers, the number line, the rules of arithmetic, absolute value, and intervals. The rest of the course is built on these ideas.
Kinds of numbers
A set is a collection of objects. We list the members of a set inside braces, ${\{\ \}}$. Here are the main sets of numbers:
- The natural numbers are the counting numbers: ${\{1,2,3,4,\ldots\}}$. The three dots mean the list goes on forever.
- The whole numbers are the natural numbers and zero: ${\{0,1,2,3,\ldots\}}$.
- The integers are the whole numbers and their negatives: ${\{\ldots,-2,-1,0,1,2,\ldots\}}$.
- A rational number is a number that can be written as a fraction ${\dfrac{p}{q}}$, where ${p}$ and ${q}$ are integers and ${q\ne 0}$. For example, ${\dfrac{3}{4}}$, ${-\dfrac{5}{2}}$, and ${7=\dfrac{7}{1}}$ are rational.
- An irrational number is a real number that is not rational. For example, ${\sqrt{2}}$ and ${\pi}$ are irrational.
- The real numbers are all the rational and irrational numbers together.
Decimals
Every real number has a decimal form. The decimal form tells us whether the number is rational:
- A rational number has a decimal that ends or repeats. For example, ${\dfrac{1}{4}=0.25}$ ends, and ${\dfrac{1}{3}=0.333\ldots}$ repeats.
- An irrational number has a decimal that never ends and never repeats. For example, ${\pi=3.14159\ldots}$ goes on with no pattern.
A bar over digits means they repeat forever. For example, ${0.\overline{3}}$ means ${0.333\ldots}$, and ${0.\overline{27}}$ means ${0.272727\ldots}$ with "27" repeating.
Example 1: List the sets that each number belongs to.
${-7}$, ${0}$, ${\dfrac{2}{3}}$, ${\sqrt{9}}$, ${\sqrt{5}}$, ${0.\overline{12}}$
Solution:
- ${-7}$ is an integer. So it is also rational and real.
- ${0}$ is a whole number. So it is also an integer, rational, and real.
- ${\dfrac{2}{3}}$ is rational and real. It is not an integer.
- ${\sqrt{9}=3}$. So it is a natural number, a whole number, an integer, rational, and real.
- ${\sqrt{5}=2.2360679\ldots}$ never ends or repeats. So it is irrational and real.
- ${0.\overline{12}}$ is a repeating decimal. So it is rational and real.
Watch out: a square root is not always irrational. ${\sqrt{9}}$ is a natural number, because ${9}$ is a perfect square.
Example 2: Write ${0.\overline{27}}$ as a fraction.
Solution:
Let ${x=0.\overline{27}}$. Two digits repeat, so multiply both sides by ${100}$:
$\begin{align*}x&=0.272727\ldots\\100x&=27.272727\ldots\end{align*}$
Subtract the first equation from the second. The repeating parts cancel:
$\begin{align*}100x-x&=27\\99x&=27\\x&=\dfrac{27}{99}=\dfrac{3}{11}\end{align*}$
So ${0.\overline{27}=\dfrac{3}{11}}$. This shows that a repeating decimal is a rational number.
The real number line
We can picture the real numbers as points on a line, called the real number line. The point for ${0}$ is called the origin. Positive numbers are to the right of ${0}$, and negative numbers are to the left.
Numbers increase from left to right. If ${a}$ is to the left of ${b}$ on the number line, we say ${a}$ is less than ${b}$. We use these symbols to compare numbers:
| Symbol | Meaning | Example |
|---|---|---|
| ${a<b}$ | ${a}$ is less than ${b}$ | ${-3<1}$ |
| ${a>b}$ | ${a}$ is greater than ${b}$ | ${\pi>3}$ |
| ${a\le b}$ | ${a}$ is less than or equal to ${b}$ | ${2\le 2}$ |
| ${a\ge b}$ | ${a}$ is greater than or equal to ${b}$ | ${5\ge -1}$ |
Statements like these are called inequalities. A negative number is always less than a positive number. For example, ${-100<1}$, even though ${100}$ is bigger than ${1}$.
Properties of real numbers
The rules of arithmetic have names. Here ${a}$, ${b}$, and ${c}$ are any real numbers:
| Property | Rule |
|---|---|
| Commutative | ${a+b=b+a}$ ${ab=ba}$ |
| Associative | ${(a+b)+c=a+(b+c)}$ ${(ab)c=a(bc)}$ |
| Identity | ${a+0=a}$ ${a\cdot 1=a}$ |
| Inverse | ${a+(-a)=0}$ ${a\cdot\dfrac{1}{a}=1}$ (${a\ne 0}$) |
- Commutative: the order does not matter.
- Associative: the grouping (the parentheses) does not matter.
- Identity: adding ${0}$ or multiplying by ${1}$ does not change a number.
- Inverse: ${-a}$ is the additive inverse (the opposite) of ${a}$. ${\dfrac{1}{a}}$ is the multiplicative inverse (the reciprocal) of ${a}$.
One more property connects addition and multiplication. It is called the distributive property:
${a(b+c)=ab+ac}$
Subtraction and division are not commutative. For example, ${5-3=2}$, but ${3-5=-2}$.
These rules for negatives are also useful:
- ${-(-a)=a}$
- ${(-a)b=-(ab)}$
- ${(-a)(-b)=ab}$
- ${-(a+b)=-a-b}$
Example 3: Use the distributive property to remove the parentheses.
(a) ${3(x+4)}$
(b) ${-2(5-y)}$
Solution:
(a) Multiply each term inside the parentheses by ${3}$:
${3(x+4)=3x+12}$
(b) Multiply each term by ${-2}$. Be careful with the signs:
$\begin{align*}&-2(5-y)\\&=(-2)(5)+(-2)(-y)\\&=-10+2y\end{align*}$
Absolute value
The absolute value of a number ${a}$, written ${|a|}$, is its distance from ${0}$ on the number line. A distance is never negative. For example, ${|5|=5}$ and ${|-5|=5}$, because both ${5}$ and ${-5}$ are ${5}$ units from ${0}$.
As a formula:
$|a|=\begin{cases}a, & \text{if } a\ge 0\\-a, & \text{if } a<0\end{cases}$
This formula has two cases. If ${a}$ is not negative, ${|a|}$ is just ${a}$. If ${a}$ is negative, ${|a|=-a}$, which is positive. For example, ${|-5|=-(-5)=5}$.
The distance between two numbers ${a}$ and ${b}$ on the number line is
${d(a,b)=|b-a|}$.
Example 4: Find each value.
(a) ${|3-\pi|}$
(b) ${|-2|-|-6|}$
(c) the distance between ${-4}$ and ${7}$
Solution:
(a) Since ${\pi\approx 3.14}$, the number ${3-\pi}$ is negative. So use the second case, ${|a|=-a}$:
${|3-\pi|=-(3-\pi)=\pi-3}$
(b) Find each absolute value first:
${|-2|-|-6|=2-6=-4}$
The answer is negative. That is fine: the absolute values are positive, but their difference is not.
(c) Use the distance formula:
${d(-4,7)=|7-(-4)|=|11|=11}$
Check on the number line: from ${-4}$ to ${0}$ is ${4}$ units, and from ${0}$ to ${7}$ is ${7}$ units. In total, ${4+7=11}$.
Intervals
An interval is the set of all real numbers between two numbers, called its endpoints. We write intervals in interval notation:
- A parenthesis, ( or ), means the endpoint is not included. On a graph, we draw an open circle.
- A bracket, [ or ], means the endpoint is included. On a graph, we draw a solid dot.
- The symbol ${\infty}$ (infinity) means the interval goes on without end. It is not a number, so it always gets a parenthesis.
| Interval | Inequality | Graph |
|---|---|---|
| ${(a,b)}$ | ${a<x<b}$ | |
| ${[a,b]}$ | ${a\le x\le b}$ | |
| ${[a,b)}$ | ${a\le x<b}$ | |
| ${(a,b]}$ | ${a<x\le b}$ | |
| ${(a,\infty)}$ | ${x>a}$ | |
| ${[a,\infty)}$ | ${x\ge a}$ | |
| ${(-\infty,b)}$ | ${x<b}$ | |
| ${(-\infty,b]}$ | ${x\le b}$ | |
| ${(-\infty,\infty)}$ | all real numbers |
Example 5: Write each inequality in interval notation, and graph it.
(a) ${-2\le x<3}$
(b) ${x>1}$
Solution:
(a) The endpoint ${-2}$ is included (${\le}$), so it gets a bracket. The endpoint ${3}$ is not included (${<}$), so it gets a parenthesis:
${[-2,3)}$
(b) The numbers greater than ${1}$ go on without end to the right. The endpoint ${1}$ is not included:
${(1,\infty)}$
Summary
- Natural numbers ${\subset}$ whole numbers ${\subset}$ integers ${\subset}$ rational numbers. (The symbol ${\subset}$ means "is part of".) Every real number is either rational or irrational.
- A rational number has a decimal that ends or repeats. An irrational number has a decimal that never ends and never repeats.
- On the number line, ${a<b}$ means ${a}$ is to the left of ${b}$.
- The commutative, associative, identity, inverse, and distributive properties are the rules of arithmetic.
- ${|a|}$ is the distance from ${a}$ to ${0}$. The distance between ${a}$ and ${b}$ is ${|b-a|}$.
- In interval notation, a bracket includes the endpoint and a parenthesis does not.