The Cartesian product and the Cartesian plane
Learning Objectives
- Distinguish an ordered pair \((a, b)\) from the set \(\{a, b\}\).
- Define the Cartesian product \(A \times B\) and list its elements for small sets.
- Identify the Cartesian plane \(\mathbb{R} \times \mathbb{R}\) with the coordinate system.
- Plot points in the Cartesian plane given their coordinates.
- Describe the historical significance of Descartes' coordinate idea.
Motivation
In the previous lesson we defined a function as a rule that assigns to each element of one set exactly one element of another. Soon we will want to collect all these input-output assignments into a single mathematical object — the graph — and, when the sets are subsets of \(\mathbb{R}\), to draw that object in the plane.
Both ideas depend on a construction we have not yet made precise: pairing two objects into an ordered pair, and collecting all such pairs into a Cartesian product. That is the subject of this lesson.
Ordered pair
An ordered pair \((a, b)\) is a pair of objects in which the order matters: the first component is \(a\) and the second component is \(b\).
Two ordered pairs are equal if and only if their corresponding components are equal:
\[(a, b) = (c, d) \quad \Longleftrightarrow \quad a = c \;\text{ and }\; b = d.\]
In particular, \((1, 2) \neq (2, 1)\) — reversing the components produces a different pair. This is what distinguishes an ordered pair from the set \(\{a, b\}\), where \(\{1, 2\} = \{2, 1\}\) because sets do not record order.
Ordered pairs vs. sets
Compare:
\((3, 7) = (3, 7)\) — same components in the same positions. ✓
\((3, 7) \neq (7, 3)\) — the first components differ (\(3 \neq 7\)). ✗
\(\{3, 7\} = \{7, 3\}\) — as sets, these are equal. But \((3, 7) \neq (7, 3)\) as ordered pairs.
\((5, 5)\) is a perfectly valid ordered pair. Both components happen to be equal, but the pair still records two positions.
Cartesian product
Let \(A\) and \(B\) be two sets. The Cartesian product of \(A\) and \(B\), written \(A \times B\), is the set of all ordered pairs whose first component comes from \(A\) and whose second component comes from \(B\):
\[A \times B = \{\,(a, b) \mid a \in A \text{ and } b \in B\,\}.\]
If \(A\) has \(m\) elements and \(B\) has \(n\) elements, then \(A \times B\) has \(m \cdot n\) elements — every element of \(A\) can be paired with every element of \(B\).
Cartesian product of finite sets
Let \(A = \{1, 2\}\) and \(B = \{a, b, c\}\). Then
\[A \times B = \{(1,a),\; (1,b),\; (1,c),\; (2,a),\; (2,b),\; (2,c)\}.\]
There are \(2 \times 3 = 6\) pairs. Note that \(B \times A\) is a different set:
\[B \times A = \{(a,1),\; (a,2),\; (b,1),\; (b,2),\; (c,1),\; (c,2)\}.\]
The pairs in \(A \times B\) have a number first and a letter second; those in \(B \times A\) have a letter first and a number second. In general, \(A \times B \neq B \times A\) unless \(A = B\).
Cartesian product with itself
Let \(A = \{0, 1\}\). Then
\[A \times A = \{(0,0),\; (0,1),\; (1,0),\; (1,1)\}.\]
We sometimes write \(A^2\) for \(A \times A\). This set has \(2^2 = 4\) elements.
René Descartes and the birth of coordinates
The Cartesian product is named after the French mathematician and philosopher René Descartes (1596–1650). In his work La Géométrie (1637), Descartes introduced the idea of describing geometric figures by numbers — by fixing two perpendicular axes and recording each point's position as a pair of distances from those axes.
Before Descartes, algebra and geometry were largely separate disciplines. Algebra dealt with equations; geometry dealt with shapes and constructions. Descartes' insight was that every geometric problem can be translated into an algebraic one (find the equation of the curve) and every algebraic equation can be visualised as a geometric object (draw the curve). This bridge between algebra and geometry — analytic geometry — is one of the most consequential ideas in the history of mathematics.
The coordinate system he introduced, and the plane it defines, now bear his name.
The Cartesian plane
The Cartesian plane is the Cartesian product \(\mathbb{R} \times \mathbb{R}\), also written \(\mathbb{R}^2\). Its elements are ordered pairs of real numbers \((x, y)\), called points.
We represent the Cartesian plane by drawing two perpendicular number lines — the axes:
The horizontal axis (the \(x\)-axis, or abscissa axis).
The vertical axis (the \(y\)-axis, or ordinate axis).
The point where the axes cross is the origin \(O = (0, 0)\).
Each point \(P = (x, y)\) in the plane is located by moving \(x\) units along the horizontal axis and \(y\) units along the vertical axis. The number \(x\) is the abscissa (or \(x\)-coordinate) and \(y\) is the ordinate (or \(y\)-coordinate) of \(P\).
Points in the Cartesian plane
The diagram below shows the Cartesian plane with several points plotted. Each point is located by its coordinates \((x, y)\): move \(x\) units along the horizontal axis and \(y\) units along the vertical axis.
Notice the placement of each point:
\((2, 2)\) — two units right, two up.
\((-1, 1)\) — one unit left, one up.
\((-2, -1)\) — two units left, one down.
\((1, -2)\) — one unit right, two down.
\(O = (0, 0)\) — the origin, where the axes cross.
The four quadrants
The two axes divide the plane into four regions called quadrants, numbered counter-clockwise starting from the upper right:
Quadrant I (upper right): \(x > 0\) and \(y > 0\). Both coordinates are positive.
Quadrant II (upper left): \(x < 0\) and \(y > 0\). The \(x\)-coordinate is negative, the \(y\)-coordinate is positive.
Quadrant III (lower left): \(x < 0\) and \(y < 0\). Both coordinates are negative.
Quadrant IV (lower right): \(x > 0\) and \(y < 0\). The \(x\)-coordinate is positive, the \(y\)-coordinate is negative.
Points that lie on an axis do not belong to any quadrant. For instance, \((3, 0)\) is on the \(x\)-axis and \((0, -5)\) is on the \(y\)-axis — neither lives in a quadrant.
A quick way to remember the sign pattern: start in Quadrant I where everything is positive \((+, +)\), then go counter-clockwise — the \(x\)-coordinate flips first \((-, +)\), then \(y\) flips too \((-, -)\), then \(x\) flips back \((+, -)\).
Why this matters for functions
In the next lesson, we will define the graph of a function \(f \colon A \to B\) as a subset of \(A \times B\). When \(A\) and \(B\) are subsets of \(\mathbb{R}\), the graph lives inside \(\mathbb{R}^2\) — the Cartesian plane — and we can draw it. The concepts of this lesson — ordered pairs, Cartesian product, coordinates, axes — are the language that makes that possible.
Connection to Computer Science
Ordered pairs are ubiquitous in programming: a pixel on the screen is located by a pair \((x, y)\) of coordinates, a database row is selected by a pair (table, key), and a point in a video game's world is stored as a tuple of numbers. The Cartesian product is what programmers call a "cross join" in database terminology — every row from one table paired with every row from another.
Is \(A \times B\) the same as \(B \times A\)?
We saw above that \(A \times B \neq B \times A\) in general. But could it happen that \(A \times B = B \times A\)?
Yes: if \(A = B\), then \(A \times B = A \times A = B \times A\). There is also the degenerate case where \(A\) or \(B\) is empty, making both products the empty set. But these are the only cases — if \(A \neq B\) and both are non-empty, then there exists an element in one that is not in the other, and that element shows up in the first component on one side but the second component on the other, producing a pair that belongs to one product but not the other.
This is a small but telling example of why order matters in mathematics. The passage from sets (where \(\{a, b\} = \{b, a\}\)) to ordered pairs (where \((a, b) \neq (b, a)\) in general) is a genuine increase in structure.
Exercises
Exercise 1
Decide whether each statement is true or false.
Exercise 2
Let \(A = \{1, 2, 3\}\) and \(B = \{x, y\}\). Answer the following questions about \(A \times B\).
Exercise 3
Let \(M = \{a, b\}\) and \(N = \{1, 2, 3\}\).
Exercise 4
Determine the quadrant in which each point lies.
Exercise 5
Let \(A\) and \(B\) be non-empty sets. Decide whether each statement is true or false.
Summary
An ordered pair \((a, b)\) records two objects in a fixed order. \((a, b) = (c, d)\) iff \(a = c\) and \(b = d\).
The Cartesian product \(A \times B = \{(a,b) \mid a \in A,\; b \in B\}\). If \(|A| = m\) and \(|B| = n\), then \(|A \times B| = mn\).
In general \(A \times B \neq B \times A\).
The Cartesian plane is \(\mathbb{R}^2 = \mathbb{R} \times \mathbb{R}\), represented by two perpendicular axes. Each point is an ordered pair \((x, y)\).
The axes divide the plane into four quadrants.
This framework, due to Descartes, is what allows us to draw the graph of a function in the next lesson.