Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1.3: Sets of numbers

In Chapter 1.2, we covered the set-builder notation for sets, and introduced the set of integers, Z\mathbb{Z}, and real numbers, R\mathbb{R}. Here, we’ll discuss these sets, and other sets of numbers, in more detail. In this course, we’ll almost always work with the set of real numbers, but it’s important to understand how these sets are all related.

Let’s start with an activity to refresh our understanding of set-builder notation from Chapter 1.2.


Building the number systems

Natural numbers: N\mathbb N

Natural numbers count discrete objects. They answer questions that ask “how many”: how many students are in the class? How many vehicles crossed the bridge?

Here, we’ll use the convention

N={0,1,2,3,}.\mathbb N=\{0,1,2,3,\ldots\}.

Thus 0N0\in\mathbb N. Other sources sometimes begin the natural numbers at 1, and say the whole numbers are the natural numbers including 0.

Integers: Z\mathbb Z

The integers include the natural numbers and their negative counterparts:

Z={,2,1,0,1,2,}.\mathbb Z=\{\ldots,-2,-1,0,1,2,\ldots\}.

All natural numbers are integers, so NZ\mathbb N\subseteq\mathbb Z. But, not all integers are natural numbers: -2 is an integer, but not a natural number.

Rational numbers: Q\mathbb Q

The rational numbers are the numbers that can be written as a ratio of integers. The set of rationals is best described using set-builder notation, since it’s difficult to enumerate them:

Q={pq:p,qZ, q0}.\mathbb Q= \left\{ \frac{p}{q}:p,q\in\mathbb Z,\ q\ne0 \right\}.

Every integer is rational: for example, 3=3/1-3=-3/1. Terminating and repeating decimals are rational too. This means that ZQ\mathbb{Z} \subseteq \mathbb{Q} (and so NQ\mathbb{N} \subseteq \mathbb{Q} as well).

Real numbers: R\mathbb R

The real numbers are all the numbers on the usual number line. They include all of the rational numbers, and also include the set of irrational numbers, which includes numbers like 2\sqrt2 and π-\pi. Irrational numbers are those that cannot be written as a ratio of integers.

Real numbers are useful for modeling physical quantities such as distance, time, and temperature. More on this idea of the real numbers as the number line in a moment. The key idea is that most numbers you’ve seen before – 2,13,2026,94.53134132, \frac{1}{3}, \sqrt{2026}, -94.5313413, and so on – are real numbers.

Complex numbers: C\mathbb C

Real numbers are not the end of the story. Enter the complex numbers. A complex number is an expression of the form

a+bi,a + bi,

where aa and bb are real numbers, and ii is the imaginary unit, which satisfies

i2=1.i^2=-1.

Complex numbers allow us to extend the real numbers to a larger set of numbers that solves problems that cannot be solved using real numbers alone. For example, if asked to use the quadratic formula to find the roots of the quadratic equation

x2+5x+8=0,x^2 + 5x + 8 = 0,

you’d find that the solutions are

x=5±25322=5±72.x = \frac{-5 \pm \sqrt{25 - 32}}{2} = \frac{-5 \pm \sqrt{-7}}{2}.

But, the square root of -7 is not a real number, because such a real number would have to satisfy x2=7x^2 = -7, and the squares of all real numbers are greater than or equal to 0.

7i\sqrt{7}i is a number whose square is -7. Using the fact that i2=1i^2=-1, we have:

(7i)2=(7)2i2=7(1)=7.(\sqrt{7}i)^2 = (\sqrt{7})^2 \cdot i^2 = 7 \cdot (-1) = -7.

So, the solutions to x2+5x+8=0x^2 + 5x + 8 = 0 are

x=5±7i2.x = \frac{-5 \pm \sqrt{7}i}{2}.

Both 5+7i2\frac{-5 + \sqrt{7}i}{2} and 57i2\frac{-5 - \sqrt{7}i}{2} are complex numbers.

Complex numbers appear naturally in electrical engineering, signal processing, waves, and differential equations. You do not need to master them now. The important point is that linear algebra is not limited to real-valued quantities, even though real numbers will be our main focus. You will get more practice with complex numbers in various homework assignments in this course.

How the sets fit together

Each number system above contains the previous one:

NZQRC.\mathbb N \subseteq \mathbb Z \subseteq \mathbb Q \subseteq \mathbb R \subseteq \mathbb C.

The diagram below places one number in each newly added region.

Image produced in Jupyter

Euclidean space

The real line

Back to the real numbers, which are our focus in this course. The real numbers R\mathbb R can be viewed geometrically as the real number line, where each real number corresponds to one point.

Image produced in Jupyter

Aside: Cartesian product

The Cartesian product of two sets AA and BB is the set of all ordered pairs whose first entry comes from AA and whose second entry comes from BB:

A×B={(x,y):xA, yB}.A\times B=\{(x,y):x\in A,\ y\in B\}.

For example, if A={1,2}A=\{1,2\} and B={x,y,z}B=\{x,y,z\}, then

A×B={(1,x),(1,y),(1,z),(2,x),(2,y),(2,z)}.A\times B = \{(1,x),(1,y),(1,z),(2,x),(2,y),(2,z)\}.

Think of A×BA \times B as containing all possible combinations of one element from AA and one element from BB.

Two-dimensional Euclidean space

The space R2\mathbb R^2pronounced “R-two” – is the set of all ordered pairs of real numbers, resulting from the Cartesian product of R\mathbb{R} with itself:

R2=R×R.\mathbb R^2=\mathbb R\times\mathbb R.

In set-builder notation,

R2={(x,y):xR, yR}.\mathbb R^2=\{(x,y):x\in\mathbb R,\ y\in\mathbb R\}.

The exponent of 2 on R\mathbb{R} means that we are looking at pairs of real numbers.

Just as R\mathbb R can be thought of as the real number line, R2\mathbb R^2 can be thought of as the Euclidean plane. Its elements are points with an xx-coordinate and a yy-coordinate. The term Euclidean is named after Euclid, an ancient Greek mathematician who was a pivotal figure in geometry. The Euclidean plane obeys the familiar rules of plane geometry, including the Pythagorean theorem, which we will see once again shortly.

Image produced in Jupyter

The order of the two coordinates matters. The points (2,3)(2,3) and (3,2)(3,2) are different elements of R2\mathbb R^2. This is unlike sets, where order does not matter: {2,3}={3,2}\{2,3\}=\{3,2\}.

Three-dimensional Euclidean space

R3\mathbb R^3 – pronounced “R-three” – is the set of all ordered triples of real numbers:

R3={(x,y,z):x,y,zR}.\mathbb R^3=\{(x,y,z):x,y,z\in\mathbb R\}.

Think of R3\mathbb{R}^3 as three-dimensional Euclidean space.

Loading...

nn-dimensional Euclidean space

We can generalize beyond two and three dimensions. The nn-dimensional Euclidean space, again pronounced “R-nn”, is the set of all ordered nn-tuples of real numbers (assuming nn is a positive integer):

Rn={(x1,,xn):x1,,xnR}.\mathbb R^n = \{(x_1,\ldots,x_n):x_1,\ldots,x_n\in\mathbb R\}.

(“Tuple” is a generalization of “pair” and “triple” for any number of entries.)

Equivalently, Rn\mathbb R^n is the Cartesian product of R\mathbb R with itself nn times. The exponent on R\mathbb{R} tells us the number of real numbers each ordered tuple holds.

When might we want to work with elements of Rn\mathbb{R}^n? Often, in fact! Suppose we recorded 5 pieces of information for each student in Math 124:

  • Their age.

  • Their height.

  • Their shoe size.

  • Their number of siblings.

  • Their number of followers on Instagram.

Then, each student’s data can be represented as an ordered 5-tuple of real numbers, and we can represent them as elements of R5\mathbb{R}^5. We can’t visualize data in R5\mathbb{R}^5 directly, since as humans we’re limited to 3 dimensions. But, that’s the beauty of mathematics! We can define objects like 5-dimensional spaces algebraically, even though we can’t draw or picture them. This idea, of thinking in high dimensions, is one that we will return to throughout the course.

But for the remainder of Chapters 1 and 2, we will return our focus to R2\mathbb{R}^2 and R3\mathbb{R}^3, that is, the two- and three- dimensional Euclidean spaces. With that, we’re ready to finally introduce the concept of a vector! Keep reading for more.