DGS Studio

Sets & Venn Diagrams

Union

Shade both circles and list every element that belongs to A or B.

The sets in the input are A = {3, 4, 5}, B = {5, 6, 7}. The union is {3, 4, 5, 6, 7}.

Elements are written once. The diagram shades the region that the operation names, and the result list follows the arithmetic of the sets rather than the order the numbers were typed.

Equation

A = {3,4,5}
B = {5,6,7}
A ∪ B

How the set operation is read

A Venn diagram example defines sets with braces, then asks for an operation. Union collects elements that appear in either set. Intersection keeps only the shared elements. Difference removes one set from the other. Complement needs a universal set named U.

The same element is never listed twice, and order does not matter. An empty result is the empty set, written ∅, not the number 0. DGS draws the diagram with clipped regions so the shading matches the operation on the card.

Reading the input

Try a change

Generate Graph draws the Venn diagram for the operation in the input and reports the resulting set. Empty results use the empty-set symbol.

Edit and generate

Generate Graph opens the studio homepage and runs this field. Open in DGS Studio loads the same text and waits for you to generate it. The equation is sent once, as a query parameter.

Related examples