QED
Relations · step 6 of 13

Relations as subsets of A × B

Formally a relation from A to B is just a subset of A × B — no more structure than that. The domain is the set of first coordinates actually used, the range (or image) the set of second coordinates. Because a relation is a set, all the usual set operations apply, and the number of relations from A to B is 2^(|A|·|B|), since each pair is independently in or out.

Unlimited questions · marked criterion by criterion · no card needed

Method: how to approach it

The order below is what examiners expect to see, and each step carries its own marks.

  1. List the pairs explicitlyWhether the relation is given by a rule or a picture, writing the pairs makes domain and range immediate for finite cases.
  2. Domain = first coordinatesdom(R) = {a : ∃b, (a,b) ∈ R}. It is a subset of A and need not equal A.
  3. Range = second coordinatesran(R) = {b : ∃a, (a,b) ∈ R}, a subset of B. The codomain B is given; the range is computed.
  4. Take images of subsetsR[X] = {b : ∃a ∈ X, (a,b) ∈ R}. The range is R[A], the image of the whole domain.

Worked example

Let A = {1,2,3}, B = {p,q,r} and R = {(1,p),(1,q),(3,q)}. Give dom(R), ran(R), R[{1}] and the number of relations from A to B.

  1. First coordinates used: 1 and 3, so dom(R) = {1,3} — note 2 is absent.
  2. Second coordinates used: p and q, so ran(R) = {p,q}; r is unused.
  3. R[{1}] collects partners of 1: {p, q}.
  4. |A × B| = 9, and each of the 9 pairs is independently in or out.

Answer. dom(R) = {1,3}, ran(R) = {p,q}, R[{1}] = {p,q}, and there are 2⁹ = 512 relations from A to B.

Where marks get dropped

These are the specific errors that cost credit on relations as subsets of a × b questions — QED's rubric penalises each of them separately.

Practise this until it is automatic

Unlimited fresh questions

QED generates new relations as subsets of a × b problems on demand at warm-up, exam and challenge level, so you can drill this one skill until it stops costing you marks.

Marked like an examiner

Every answer is scored against a point-by-point rubric with partial credit, so you see exactly which step of the method broke down — not just a tick or a cross.

Answer in real notation

A one-tap symbol palette, a visual equation editor and a truth-table builder — or photograph your handwritten working and QED converts it to LaTeX.

Saved to your library

Every question you generate is kept and re-takeable as a timed exam, and your Relations mastery is tracked so you know when this is exam-ready.

Relations as subsets of A × B — frequently asked questions

When is a relation a function?

Exactly when every element of A appears as a first coordinate exactly once — totality plus single-valuedness. R above fails both: 2 is missing and 1 has two partners.

How many relations are there on a set of size n?

2^(n²), since a relation on A is a subset of A × A which has n² elements. For n = 3 that is 512.

Is the empty set a relation?

Yes — it is a subset of A × B, with empty domain and empty range. It is vacuously symmetric, antisymmetric and transitive.

The rest of Relations

Properties of relations, composition, and representations. Each subtopic below has its own method, worked example and mark-losing traps.

Ready to make relations as subsets of a × b exam-proof?

Generate your first questions free — no card, no setup, no personal data stored. Practise until the method is second nature.

Start practising free →