Skip to main content
Mathematics LibreTexts

9.5: Cartesian Product

  • Page ID
    83449
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Definition: Cartesian product

    the set of all possible ordered pairs of elements from two given sets \(A\) and \(B\text{,}\) where the first element in a pair is from \(A\) and the second is from \(B\)

    Definition: \(A \times B\)

    the Cartesian product of \(A\) and \(B\text{:}\) \(A \times B = \{(a,b) \vert a\in A,\; b\in B\} \)

    For “small” sets, we can list the elements of the Cartesian product by listing all ways of combining an element from the first with an element from the second.

    Example \(\PageIndex{1}\): A Cartesian product of “small” sets.

    Suppose \(A = \{ 1, 2 \}\) and \(B = \{ a, b, c \}\text{.}\) Then

    \begin{equation*} A \times B = \{ (1,a), (1,b), (1,c), (2,a), (2,b), (2,c) \} \text{.} \end{equation*}

    Example \(\PageIndex{2}\): A special subset of a certain Cartesian product.

    Let \(\mathbb{N}^+\) represent the positive natural numbers: \(\mathbb{N}^+ = \mathbb{N} \setminus \{0\}\text{.}\) Then we can describe the Cartesian product \(\mathbb{Z} \times \mathbb{N}^+\) as

    \begin{equation*} \mathbb{Z} \times \mathbb{N}^+ = \{(m,n) \vert m,n \in \mathbb{Z}, \; n>0 \} \subseteq \mathbb{Z} \times \mathbb{Z} \text{.} \end{equation*}
    Consider the subset

    \begin{equation*} A = \{(m,n) \in \mathbb{Z} \times \mathbb{N}^+ \vert n \text{ has no divisors in common with } \vert m \vert\} \subseteq \mathbb{Z} \times \mathbb{N}^+\text{.} \end{equation*}
    Does \(A\) resemble some more familiar set …?

    Extend.

    Define \(A \times B \times C = \{(a,b,c) \vert a \in A\text{, } b\in B\text{, } c\in C \}\text{.}\)

    Example \(\PageIndex{3}\)

    Suppose \(A = \{ 1, 2 \}\text{,}\) \(B = \{ a, b, c \}\text{,}\) \(C = \{ \alpha, \beta \}\text{.}\) Then,
    \begin{align*} A \times B \times C = \{ \;\; & (1,a,\alpha), \, (1,a,\beta), \, (1,b,\alpha), \, (1,b,\beta), \, (1,c,\alpha), \, (1,c,\beta), \,\\ & (2,a,\alpha), \, (2,a,\beta), \, (2,b,\alpha), \, (2,b,\beta), \, (2,c,\alpha), \, (2,c,\beta) \;\; \} \end{align*}

    Remark \(\PageIndex{1}\)

    Technically, there is a difference between the elements of each of the sets

    \begin{align*} (A \times B) \times C & = \{((a,b),c) \vert a \in A\text{, } b\in B\text{, } c\in C \} \text{,} \\ A \times (B \times C) & = \{(a,(b,c)) \vert a \in A\text{, } b\in B\text{, } c\in C \} \text{,} \\ A \times B \times C & = \{(a,b,c) \vert a \in A\text{, } b\in B\text{, } c\in C \} \text{,} \end{align*}
    but it is rare that anyone actually observes this technicality. Usually, we consider these three sets to be the same set.

    We use special notation for Cartesian products of a set with itself.

    Definition: \(A^2\)

    notation to mean \(A \times A\)

    Definition: \(A^3\)

    notation to mean \(A \times A \times A\)

    Definition: \(A^n\)

    notation to mean \(A \times A \times \ldots \times A\) involving \(n\) “factors” of \(A\)

    And so on.

    Example \(\PageIndex{4}\): Cartesian products in linear algebra.

    You have probably already encountered the notation

    \begin{align*} \mathbb{R}^2 & = \{(x,y) \vert x,y \in \mathbb{R}\} \text{,}\\ \mathbb{R}^3 & = \{(x,y,z) \vert x,y,z \in \mathbb{R}\} \text{,}\\ & \vdots \\ \mathbb{R}^n & = \{(x_1,x_2,\ldots ,x_n) \vert x_j \in \mathbb{R}\} \text{,}\\ & \vdots \end{align*}
    used to represent \(2\)-, \(3\)-, and higher-dimensional (real) vector spaces.


    This page titled 9.5: Cartesian Product is shared under a GNU Free Documentation License 1.3 license and was authored, remixed, and/or curated by Jeremy Sylvestre via source content that was edited to the style and standards of the LibreTexts platform.