Cartesian squares and relations

This post was first published on WordPress at
https://explainingmaths.wordpress.com/2021/07/27/cartesian-squares-and-relations/

I'm continuing to transfer some selected posts from the Piazza forum for my Autumn 2020 first-year pure module Foundations of Pure Mathematics (FPM) to my two blogs (on WordPress and on Blogger).

Don't forget that videos from this module are available (complete sets of recordings from the 2014-15, 2018-19 and 2019-20 editions of FPM).

Here is a question and answer concerning Cartesian squares and relations.

Question

Hi, can someone please explain how are Cartesian squares and relations connected and why the number of relations on a finite set \(S\) is the same as the number of subsets of \(S \times S\)?

My answer

Hi,
The relevant lecture is Lecture 8, Cartesian Products and Relations
Let \(S\) be a set (usually non-empty). Then \(S \times S\) (the Cartesian square of \(S\)) is the set of all ordered pairs whose co-ordinates are both in \(S\), so \[S \times S = \{(x,y):x,y \in S\}\,.\] Now suppose that \(S\) is a non-empty, finite set with exactly \(n\) elements for some \(n \in \mathbb{N}\). With the usual notation, we have \(|S|=n\). Then \(|S \times S|=n^2\).
Now, suppose you want to form a subset, say \(M\), of \(S \times S\). Then, for each \((x,y)\in S \times S\), you have two choices: either \((x,y)\) is in \(M\) or it isn't. You can make this choice separately for each of the \(n^2\) points of \(S \times S\), and if you change even one decision, you change the subset \(M\). So there are exactly \(2^{n^2}\) possible subsets of \(S \times S\).
What about relations on \(S\)?  Suppose we want to define a relation \(R\) on \(S\). Then, for each ordered pair \((x,y) \in S \times S\), we have to decide whether \(x\,R\,y\) or not. We can make this choice separately for each of the \(n^2\) points of \(S \times S\), and if you change even one decision, you change the relation. Does that look familiar?
In fact, the Pure Mathematician's definition of a relation on \(S\) is just a subset of \(S \times S\). But this is like the abstract definition of a function: we usually work with some sort of practical rule instead of the abstract formulation. Still, there is certainly a bijection between relations on \(S\) and subsets of \(S \times S\): given a relation \(R\) on \(S\) you can define a corresponding subset \(M\) of \(S \times S\) by setting \[M=\{(x,y) \in S \times S: x\,R\,y\,\}.\] For the inverse function: given a subset \(M\) of \(S \times S\), you can define a corresponding relation \(R\) by \[x\,R\,y \Leftrightarrow (x,y) \in M\,.\] Whichever way you think about it, the number of relations on \(S\) is still \(2^{n^2}\).

If, instead, \(S\) is an infinite set, the bijection above still works (and this fits with the discussions in Lecture 8). But then if we start counting we are looking at cardinalities of infinite sets, and this is no longer in the FPM syllabus. (It was covered in Lectures 19 and 20 of the old syllabus, see for example the 2014 G11FPM lectures on YouTube.)

Best wishes,
Dr Feinstein

Comments

Popular posts from this blog

Sums and integration against counting measure: Part I

Discussion of the proof that the uniform norm really is a norm

Revisiting liminf and limsup