Composition R∘S & inverse R⁻¹
The composition S∘R contains (a,c) whenever there is a b with (a,b) ∈ R and (b,c) ∈ S — you follow R first, then S, matching the function convention (g∘f)(x) = g(f(x)). The inverse R⁻¹ simply reverses every pair. Composition is associative but not commutative, and (S∘R)⁻¹ = R⁻¹∘S⁻¹, with the order reversing exactly as it does for matrices.
✓ 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.
- Fix the order conventionCheck whether your course writes S∘R or R;S. The pairs are the same relation but the notation order differs, and marks depend on consistency.
- Build compositions by chasing middlesFor each (a,b) ∈ R, find every (b,c) ∈ S and record (a,c). Work through R pair by pair so nothing is missed.
- Invert by swappingR⁻¹ = {(b,a) : (a,b) ∈ R}. Nothing else changes, and (R⁻¹)⁻¹ = R.
- Use matrices for larger relationsComposition corresponds to Boolean matrix multiplication, and inversion to transposition — much faster than chasing pairs by hand.
Worked example
On {1,2,3}, R = {(1,2),(2,3)} and S = {(2,1),(3,3)}. Compute S∘R and R⁻¹.
- Take (1,2) ∈ R. In S, pairs starting at 2: (2,1). So (1,1) ∈ S∘R.
- Take (2,3) ∈ R. In S, pairs starting at 3: (3,3). So (2,3) ∈ S∘R.
- No other pairs in R, so S∘R = {(1,1), (2,3)}.
- Reversing R gives R⁻¹ = {(2,1), (3,2)}.
Answer. S∘R = {(1,1), (2,3)} and R⁻¹ = {(2,1), (3,2)}.
Where marks get dropped
These are the specific errors that cost credit on composition r∘s & inverse r⁻¹ questions — QED's rubric penalises each of them separately.
- Composing in the wrong order. S∘R applies R first — writing the pairs in the reading order of the symbols gives the other relation entirely.
- Assuming (S∘R)⁻¹ = S⁻¹∘R⁻¹. The order reverses: it is R⁻¹∘S⁻¹.
- Missing pairs when one element has several outgoing edges. Every matching middle element produces its own pair.
Practise this until it is automatic
Unlimited fresh questions
QED generates new composition r∘s & inverse r⁻¹ 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.
Composition R∘S & inverse R⁻¹ — frequently asked questions
Is composition commutative?
No. In the example S∘R = {(1,1),(2,3)} while R∘S = {(2,2)}, which is a different relation entirely.
Is R∘R⁻¹ the identity?
Not in general — that only holds for bijective functions. For a general relation R∘R⁻¹ contains (a,a) for every a in the range, plus extra pairs when elements share a partner.
How does this connect to matrices?
Represent relations by 0/1 matrices; composition is Boolean matrix product (using OR for addition), and R⁻¹ is the transpose. This makes computation mechanical.
The rest of Relations
Properties of relations, composition, and representations. Each subtopic below has its own method, worked example and mark-losing traps.
- 1Reflexive, symmetric, antisymmetric & transitive
- 2Checking properties for a given relation
- 3Composition R∘S & inverse R⁻¹
- 4Matrix & digraph representations
- 5Reflexive & transitive closures
- 6Relations as subsets of A × B
- 7Powers Rⁿ & reachability
- 8Warshall’s transitive closure algorithm
- 9Counting relations with a given property
- 10Union, intersection & complement of relations
- 11n-ary relations & the relational data model
- 12Restricting a relation to a subset
- 13Symmetric closure vs transitive closure
Ready to make composition r∘s & inverse r⁻¹ 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 →