Cartesian Product Calculator

Enter the elements of set A and set B, separated by commas.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

The Cartesian product of two sets A and B, written A × B, is the set of every possible ordered pair (a, b) where a comes from A and b comes from B — if A has m elements and B has n elements, the product has exactly m×n pairs. This calculator takes two comma-separated lists, generates every ordered pair between them, and reports the total pair count.

The concept is foundational across discrete mathematics, combinatorics and computer science: it's how a plane's coordinate grid (ℝ × ℝ) is formally defined, how programmers reason about nested loops that iterate over two collections, and — perhaps most practically — the mathematical basis of the SQL CROSS JOIN, where a database engine pairs every row of one table with every row of another. Students meet it early in set theory courses as the building block for relations and functions, since any relation between two sets is technically defined as a subset of their Cartesian product.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators