# Cartesian product of graphs

The Cartesian product of graphs.

In graph theory, the Cartesian product G ${\displaystyle \square }$ H of graphs G and H is a graph such that

• the vertex set of G ${\displaystyle \square }$ H is the Cartesian product V(G) × V(H); and
• two vertices (u,u' ) and (v,v' ) are adjacent in G ${\displaystyle \square }$ H if and only if either
• u = v and u' is adjacent to v' in H, or
• u' = v' and u is adjacent to v in G.

The operation is associative, as the graphs (F ${\displaystyle \square }$ G) ${\displaystyle \square }$ H and F ${\displaystyle \square }$ (G ${\displaystyle \square }$ H) are naturally isomorphic. The operation is commutative as an operation on isomorphism classes of graphs, and more strongly the graphs G ${\displaystyle \square }$ H and H ${\displaystyle \square }$ G are naturally isomorphic, but it is not commutative as an operation on labeled graphs.

The notation G × H has often been used for Cartesian products of graphs, but is now more commonly used for another construction known as the tensor product of graphs. The square symbol is an intuitive and unambiguous notation for the Cartesian product, since it shows visually the four edges resulting from the Cartesian product of two edges.[1]

### Examples

• The Cartesian product of two edges is a cycle on four vertices: K2 ${\displaystyle \square }$ K2 = C4.
• The Cartesian product of K2 and a path graph is a ladder graph.
• The Cartesian product of two path graphs is a grid graph.
• The Cartesian product of n edges is a hypercube:
${\displaystyle (K_{2})^{\square n}=Q_{n}.}$
Thus, the Cartesian product of two hypercube graphs is another hypercube: Q i ${\displaystyle \square }$ Q j = Q i+j.
• The Cartesian product of two median graphs is another median graph.
• The graph of vertices and edges of an n-prism is the Cartesian product graph K2 ${\displaystyle \square }$ Cn.
• The rook's graph is the Cartesian product of two complete graphs.

### Properties

If a connected graph is a Cartesian product, it can be factorized uniquely as a product of prime factors, graphs that cannot themselves be decomposed as products of graphs.[2] However, Imrich & Klavžar (2000) describe a disconnected graph that can be expressed in two different ways as a Cartesian product of prime graphs:

(K 1 + K 2 + K 2 2) ${\displaystyle \square }$ (K 1 + K 2 3) = (K 1 + K 2 2 + K 2 4) ${\displaystyle \square }$ (K 1 + K 2),

where the plus sign denotes disjoint union and the superscripts denote exponentiation over Cartesian products.

A Cartesian product is vertex transitive if and only if each of its factors is.[3]

A Cartesian product is bipartite if and only if each of its factors is. More generally, the chromatic number of the Cartesian product satisfies the equation

χ(G ${\displaystyle \square }$ H) = max {χ(G), χ(H)}. [4]

The Hedetniemi conjecture states a related equality for the tensor product of graphs. The independence number of a Cartesian product is not so easily calculated, but as Vizing (1963) showed it satisfies the inequalities

α( G)α( H) + min{|V( G)|-α( G),|V( H)|-α( H)} ≤ α( G ${\displaystyle \square }$ H) ≤ min{α( G) |V( H)|, α( H) |V( G)|}.

The Vizing conjecture states that the domination number of a Cartesian product satisfies the inequality

γ( G ${\displaystyle \square }$ H) ≥ γ( G)γ( H).

The Cartesian product of unit distance graphs is another unit distance graph.[5]

Cartesian product graphs can be recognized efficiently, in linear time.[6]

### Algebraic graph theory

Algebraic graph theory can be used to analyse the Cartesian graph product. If the graph ${\displaystyle G_{1}}$ has ${\displaystyle n_{1}}$ vertices and the ${\displaystyle n_{1}\times n_{1}}$ adjacency matrix ${\displaystyle \mathbf {A} _{1}}$, and the graph ${\displaystyle G_{2}}$ has ${\displaystyle n_{2}}$ vertices and the ${\displaystyle n_{2}\times n_{2}}$ adjacency matrix ${\displaystyle \mathbf {A} _{2}}$, then the adjacency matrix of the Cartesian product of both graphs is given by

${\displaystyle \mathbf {A} _{1\square 2}=\mathbf {A} _{1}\otimes \mathbf {I} _{n_{2}}+\mathbf {I} _{n_{1}}\otimes \mathbf {A} _{2}}$,

where ${\displaystyle \otimes }$ denotes the Kronecker product of matrices and ${\displaystyle \mathbf {I} _{n}}$ denotes the ${\displaystyle n\times n}$ identity matrix.[7] The adjacency matrix of the Cartesian graph product is therefore the Kronecker sum of the adjacency matrices of the factors.

### History

According to Imrich & Klavžar (2000), Cartesian products of graphs were defined in 1912 by Whitehead and Russell. They were repeatedly rediscovered later, notably by Gert Sabidussi (1960).