- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Relations of a Set

**Relations** may exist between objects of the same set or between objects of two or more sets.

## Definition and Properties

A binary relation R from set x to y (written as xRy or R(x,y)) is a subset of the Cartesian product x × y. If the ordered pair of G is reversed, the relation also changes.

Generally an n-ary relation R between sets A_{1}, ... ,\ and\ A_{n} is a subset of the n-ary product A_{1} × ... × A_{n}. The minimum cardinality of a relation R is Zero and the maximum is n^{2} in this case.

A binary relation R on a single set A is a subset of A × A.

For two distinct sets, A and B, having cardinalities *m* and *n* respectively, the maximum cardinality of a relation R from A to B is *mn*.

## Domain and Range

If there are two sets A and B, and relation R have order pair (x, y), then −

The

**domain**of R, Dom(R), is the set { x | (x, y) ∈ R for some y in B }The

**range**of R, Ran(R), is the set { y | (x, y) ∈ R for some x in A}

## Examples

Let, A = { 1, 2, 9 } and B = { 1, 3, 7 }

**Case 1**− If relation R is 'equal to' then R = { (1, 1), (3, 3) }Dom(R) = { 1, 3 } , Ran(R) = { 1, 3 }

**Case 2**− If relation R is 'less than' then R = { (1, 3), (1, 7), (2, 3), (2, 7) }Dom(R) = { 1, 2 } , Ran(R) = { 3, 7 }

**Case 3**− If relation R is 'greater than' then R = { (2, 1), (9, 1), (9, 3), (9, 7) }Dom(R) = { 2, 9 }, Ran(R) = { 1, 3, 7 }

- Related Questions & Answers
- Practice Set for Recurrence Relations
- Find the Number of Reflexive Relations on a Set using C++
- Types of Relations
- Explain Set relations and operations in TOC?
- Representation of Relations using Graph
- Discrete Mathematics Relations
- Explain the unary operations of algebra relations in DBMS?
- What are the requirements to become a Public Relations Officer?
- What are Precedence Relations in Operator Grammar?
- Program to find mutual followers from a relations list in Python
- Types of a Set
- Cardinality of a Set
- Partitioning of a Set
- How to check if a set is a subset of another set in R?
- Set title of a modal in Bootstrap