Skip to main content

What Is The Cartesian Product AXB?

by
Last updated on 8 min read

What Is The Cartesian Product AXB?

The Cartesian product AXB is the set of all ordered pairs (a, b) where a is in set A and b is in set B — it combines every element of A with every element of B exactly once.

What is AxB?

AxB (also written A × B) is the Cartesian product of set A and set B — it is the set of all possible ordered pairs where the first element comes from A and the second element comes from B.

Imagine it like making all possible handshakes between two groups of people. Say A is the group of mathematicians at a conference and B is the group of physicists — AxB is the complete list of every possible mathematician-physician greeting. This concept was formalized by the 17th-century philosopher and mathematician René Descartes, which is why we call it “Cartesian.”

What is the Cartesian value of AxB?

The Cartesian value of AxB is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B, written mathematically as AxB = {(a, b) | a ∈ A and b ∈ B}.

It’s called a “product” because its size (its cardinality) is the product of the sizes of A and B. For instance, if A has 3 elements and B has 4, AxB will have 12 elements. This idea sits at the heart of set theory and shows up everywhere from database design to machine learning. The concept is foundational in discrete mathematics and has been rigorously explored in texts like Britannica’s overview of set theory.

What is the Cartesian product AxB XC?

The Cartesian product of AxB and set C, written (A × B) × C, is the set of all ordered pairs where the first component is an ordered pair from A × B and the second component is an element from C — so each element looks like ((a, b), c).

This triple product is what we use to describe points in 3D space with three coordinates (x, y, z) using the Cartesian plane. It’s also how calculus defines functions of multiple variables: f(x, y, z) takes an input from R³, which is essentially R × R × R. The pattern continues for higher dimensions. According to Math is Fun, this construction is essential for visualizing multi-dimensional data.

Is Cartesian product AxB BxA?

No — AxB isn’t equal to BxA unless A = B or one of the sets is empty, because order matters in ordered pairs.

Take A = {1, 2} and B = {3, 4}. Then AxB = {(1,3), (1,4), (2,3), (2,4)}, while BxA = {(3,1), (3,2), (4,1), (4,2)}. They’re mirror images. This asymmetry is why we say the Cartesian product isn’t commutative. It’s a small detail, but it matters in databases or coordinate systems where direction affects the outcome. As Khan Academy explains, this non-commutativity is a core property of vector spaces.

What is Cartesian product example?

A Cartesian product example is A = {apple, banana} and B = {red, green}, so AxB = {(apple, red), (apple, green), (banana, red), (banana, green)}.

Think of another everyday example: choosing a shirt color (set of colors) and pants (set of styles). The Cartesian product is all possible outfits you could create. In programming, this appears in nested loops — for every item in list A, pair it with every item in list B. It’s a simple concept with surprisingly broad applications, including Cartesian joins in SQL. I’ve used this myself when building small combinatorial tools — it’s a surprisingly handy trick in data analysis.

Why is it called Cartesian product?

It’s called the Cartesian product after René Descartes, the French philosopher and mathematician who invented analytic geometry in the 17th century.

Descartes showed that you could describe a point in a plane using two numbers (x, y) — the coordinates we still use today. This pairing of numbers to represent points led directly to the modern definition of the Cartesian product. Fun fact: Descartes’ famous phrase “I think, therefore I am” was originally written in French — “Je pense, donc je suis.” His work is foundational in mathematics and philosophy, as noted by Stanford Encyclopedia of Philosophy.

What is the Cartesian product of 3 sets?

The Cartesian product of three sets A, B, and C is the set of all ordered triples (a, b, c) where a ∈ A, b ∈ B, and c ∈ C — written A × B × C = {(a, b, c) | a ∈ A, b ∈ B, c ∈ C}.

This is how we represent a point in 3D space with three coordinates. It’s also how we define functions of three variables in calculus, or store RGB colors in a computer (each color channel is a set of values). The pattern scales: four sets give ordered quadruples, and so on. According to Britannica, this generalization is a natural extension of Descartes’ original insight.

What property is AxB XC ax Bxc?

AxB XC does not generally equal BxC — the Cartesian product is not associative, unlike addition or multiplication.

For example, if A = {1}, B = {2}, C = {3}, then (A × B) × C = {((1, 2), 3)} while A × (B × C) = {(1, (2, 3))}. These aren’t the same. That’s why we use parentheses to be explicit about grouping when working with multiple Cartesian products. This non-associativity is a subtle but important point in abstract algebra — Wolfram MathWorld provides a clear explanation of why order of operations matters here.

How many relations are there in AxB?

If A has m elements and B has n elements, there are 2^(m×n) possible relations from A to B, including the empty relation and the full relation.

This comes from the fact that a relation is any subset of AxB, and a set with k elements has 2^k subsets. Say A = {1, 2} and B = {3, 4} — then AxB has 4 elements and there are 2^4 = 16 possible relations. This idea is central in database theory and formal logic. The National Institute of Standards and Technology (NIST) defines relations this way in its Dictionary of Algorithms and Data Structures.

How do you find the cardinality of a Cartesian product?

To find the cardinality of a Cartesian product, multiply the number of elements in each set: |A × B| = |A| × |B|.

Say A has 5 elements and B has 7 — then AxB has 35 elements. This works because for each of the |A| choices in the first coordinate, you have |B| choices in the second. It’s the same principle that makes a deck of cards have 52 elements — 13 ranks × 4 suits. The rule scales to any number of sets: |A × B × C| = |A| × |B| × |C|. This is a basic but powerful principle in combinatorics, as outlined by Math is Fun.

What is the Cartesian product of a set with itself?

The Cartesian product of a set with itself, X × X, is often written as X² — it’s the set of all ordered pairs where both elements come from X.

For example, if X = {true, false}, then X² = {(true, true), (true, false), (false, true), (false, false)}. This construction defines the plane of real numbers, R², which underlies all coordinate geometry and calculus. It’s also the foundation of pixel grids in digital images, where each pixel is a pair of coordinates. As Britannica notes, this self-product is a key building block in analytic geometry.

How do you find the Cartesian product of two sets?

To find the Cartesian product of two sets A and B, pair every element of A with every element of B and collect the results as ordered pairs — the result is A × B = {(a, b) | a ∈ A and b ∈ B}.

  1. List the elements of set A and set B.
  2. Create ordered pairs by taking each element from A as the first component and each element from B as the second.
  3. Collect all pairs into a single set — this is your Cartesian product.
  4. Check the size — it should be |A| × |B| elements.

In code, this is a nested loop: for each a in A, for each b in B, append (a, b) to the result. This simple algorithm underpins combinatorics, probability, and relational databases. Honestly, this is one of those elegant ideas that’s deceptively simple but incredibly powerful. I’ve implemented this in Python for small data projects — it’s a great way to generate test cases or explore combinations.

Why is a cross b not equal to b cross a?

In vector algebra, A × B (the cross product) is not equal to B × A because the result is a vector perpendicular to both inputs, and its direction depends on the order of the vectors.

The cross product is anti-commutative: A × B = - (B × A). This property is crucial in physics for calculating torques and angular momentum — the direction of the torque vector tells you which way the object will rotate. It’s also used in computer graphics to compute surface normals for lighting calculations. The magnitude stays the same either way, but the direction flips. According to Physics Tutorials, this directional dependence is what makes the cross product so useful in real-world applications.

Which set are not empty?

A non-empty set is any set that contains at least one element — for example, {0}, {apple}, or the set of all prime numbers less than 10.

Any grouping that satisfies the set axioms and has at least one member qualifies. The empty set, written ∅, is the only set that is empty — it contains no elements at all. In 2026, this definition remains unchanged from the 19th-century work of Georg Cantor, who formalized the idea of infinite sets. The Stanford Encyclopedia of Philosophy traces the evolution of these foundational concepts in mathematics.

Edited and fact-checked by the FixAnswer editorial team.
Joel Walsh

Known as a jack of all trades and master of none, though he prefers the term "Intellectual Tourist." He spent years dabbling in everything from 18th-century botany to the physics of toast, ensuring he has just enough knowledge to be dangerous at a dinner party but not enough to actually fix your computer.