Graph theory, a branch of mathematics that studies relationships between objects using vertices and edges, the union and intersection of graphs are operations where the union combines all vertices and edges from two graphs, while the intersection includes only the vertices and edges common to both.
Union Operation
Let G1(V1, E1) and G2(V2, E2) be two graphs as shown below in the diagram.
The union of G1 and G2 is a graph G = G1 ∪ G2, where the vertex set V = V1 ∪ V2 and the edge set E = E1 ∪ E2.

For the above two graphs G1 and G2, we have vertices and edges as V1 = { A, B, C, D, E, F } and E1 = { 1, 2, 3, 4, 5, 6, 7 }, and V2 = {B, C, D, E, G} and E2 = {3, 6, 8, 9, 10} respectively.
So, in order to find the union of graphs G1 and G2, which can be denoted as G = G1 ∪ G2.
The vertex set of graph G will be V = V1 ∪ V2 = {A, B, C, D, E, F, G}, and the edge set of graph G will be E = E1 ∪ E2 ={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
The resultant union graph G with all the vertices of set V and edges of set E will be as shown:

Be careful to retain the original order of vertices and edges as in the original graph.
Intersection Operation
Let G1(V1,E1) and G2(V2,E2) be two graphs. Then the intersection of G1 and G2 is a graph G = G1 ∩ G2, whose vertex set V = V1 ∩ V2 and edge set E = E1 ∩ E2.

For the above two graphs G1 and G2, we have vertices and edges as V1 = { A, B, C, D, E } and E1= { 1, 2, 3, 4, 5, 6, 7 } and V2= {B, C, D, E, F} and E2 = {3, 5, 7, 8, 9, 10, 11} respectively.
So, in order to find the intersection of graphs G1 and G2, which can be denoted as G = G1∩G2.
The vertex set of graph G will be V = V1 ∩ V2 = {B, C, D, E} and the edge set of graph G will be E = E1 ∩ E2 = {3, 5, 7}.
The resultant intersection graph G with all the vertices of set V and edges of set E will be as shown:

Be careful to retain the original order of vertices and edges as in the original graph in the resultant graph.