Calculator
Formula used
- Domain: Domain(R) = { x ∈ X | ∃ y ∈ Y : (x,y) ∈ R }.
- Range: Range(R) = { y ∈ Y | ∃ x ∈ X : (x,y) ∈ R }.
- Reflexive: ∀a ∈ A, (a,a) ∈ R. Irreflexive: ∀a ∈ A, (a,a) ∉ R.
- Symmetric: (a,b) ∈ R ⇒ (b,a) ∈ R. Antisymmetric: (a,b),(b,a) ∈ R ⇒ a=b.
- Transitive: (a,b),(b,c) ∈ R ⇒ (a,c) ∈ R.
- Equivalence: reflexive + symmetric + transitive. Partial order: reflexive + antisymmetric + transitive.
- Function (X→Y): each x ∈ X has exactly one image in Y.
- Matrix: M[i,j]=1 iff (X[i],Y[j]) ∈ R, else 0.
How to use this calculator
- Enter elements of Set A, and Set B if needed.
- Select the relation type: A×A, A×B, or B×A.
- Paste ordered pairs using any supported pair format.
- Choose extra outputs like matrix, complement, or closures.
- Press Submit to see results above the form.
- Use the download buttons to save CSV or PDF reports.
Example data table
| Example | Set A | Set B | Type | Pairs R | Highlights |
|---|---|---|---|---|---|
| 1 | { 1, 2, 3 } | — | A×A | { (1,1), (1,2), (2,2), (2,3), (3,3) } | Reflexive, transitive, not symmetric. |
| 2 | { a, b, c } | { 1, 2, 3 } | A×B | { (a,1), (b,2), (c,3) } | Function, injective, surjective, bijective. |
| 3 | { x, y } | — | A×A | { (x,y), (y,x) } | Symmetric, not reflexive, not transitive. |
FAQs
1) What is a relation between two sets?
A relation is any subset of the Cartesian product X×Y. It is represented by ordered pairs (x,y) where x comes from the source set and y comes from the target set.
2) Why are some pairs ignored in the results?
Pairs are validated against the selected product set. If an element is not inside the chosen source or target set, the pair is excluded to keep the analysis consistent.
3) When can I test reflexive and transitive properties?
Those properties apply to relations on a single set, like A×A. If you choose A×B or B×A, the calculator focuses on domain, range, and function behavior.
4) What does “total (connex)” mean?
For a relation on A, total means every two different elements are comparable. For all a≠b, at least one of (a,b) or (b,a) must be in the relation.
5) What is an equivalence relation?
An equivalence relation is reflexive, symmetric, and transitive. It partitions the set into equivalence classes, grouping elements that relate to each other under the same rule.
6) What is a partial order?
A partial order is reflexive, antisymmetric, and transitive. It models “≤” style comparisons where some pairs may be incomparable, unlike a total order.
7) How does the calculator decide if R is a function?
For X→Y, every x in X must map to exactly one y in Y. If any x has no image or multiple different images, it is not a function.
8) What do closures add to my relation?
Closures add the smallest set of pairs to achieve a property. Reflexive closure adds (a,a). Symmetric closure adds reversed pairs. Transitive closure adds implied links discovered by chaining pairs.