Difference of sets

To calculate the difference of sets, it is necessary to determine what this concept means. The third set, which is obtained from «subtraction» of one set (A) from another (U) and consists of elements of one of the two sets, excluding common elements, is called the difference of sets (U and A). It is recorded as follows: U\A. The result largely depends on which set «is subtracted».

Example
Given set U={2,5,6,7,9} and set A={4,5,7,8,9}.
• Difference of sets U\A={2,6}, since 5, 7, and 9 are in set (A).
• And conversely, the difference of sets A\U={4,8}, since the same 5, 7, and 9 are in set (U).

If the elements of the sets do not match, the difference will be similar to the elements of the «minuend» set.

Example
Given set U={2,5,6,7,9} and set A={1,3,4,8}.
• Difference of sets U\A={2,5,6,7,9}
• And conversely, the difference of sets A\U={1,3,4,8}.

If all elements of both sets are similar, the result will be an empty set.

For calculating the difference of sets, the optimal solution – is to use the online calculator. In practice, the difference of sets is applied in 3D graphics, for example: creating a volumetric ring. Or for finding IP-addresses that are in different sets (of sets) data.



Enter the elements of the set separated by commas, U
Enter the elements of the set separated by commas, A


Difference of sets U \ A