In 2016, Anderson and Lewis in [13] introduced the congruence-based zero-divisor graph \(\Gamma _{\thicksim }(R)=\Gamma (R/\thicksim)\), where \(\thicksim \) is a multiplicative congruence relation on *R* and showed that \(R/\thicksim \) is a commutative semigroup with zero. They showed that the zero-divisor graph of *R*, the compressed zero-divisor graph of *R*, and the ideal based zero-divisor graph of *R* are examples of the congruence-based zero-divisor graphs of *R*. In this paper, we are interested in the multiplicative congruence relation \(\thicksim \) on *R*, which is an equivalence relation on the multiplicative monoid *R* with the additional property that if *x*,*y*,*z*,*w*∈*R* with \(x\thicksim y\) and \(z\thicksim w\), then \(xz\thicksim yw\).

The equivalence unit dot product graph of *U*(*R*) was introduced in [12], where *R*=*A*×*A* and \(A=\mathbb {Z}_{n}\). The equivalence relation \(\thicksim \) on *U*(*R*) was defined such that \(x\thicksim y\), where *x*,*y*∈*U*(*R*), if *x*=(*c*,*c*)*y* for some (*c*,*c*)∈*U*(*R*). Let *E**U*(*R*) be the set of all distinct equivalence classes of *U*(*R*). If *X*∈*E**U*(*R*), then ∃ *a*∈*U*(*A*) such that \(X=[(1,a)]_{\thicksim }=\{u(1,a)\,|\,u\in U(A)\}\). Thus, the equivalence unit dot product graph of *U*(*R*) is the (undirected) graph *E**U**D*(*R*) with vertices *E**U*(*R*). Two distinct vertices *X* and *Y* are adjacent if and only if *x*·*y*=0∈*A*, where *x*·*y* denotes the normal dot product of *x* and *y*.

From the definition of the congruence relation, we find that the relation defined by Abdulla is not only an equivalence relation but also a congruence relation. In fact, let \(x \thicksim y\) and \(w \thicksim v\). So, *x*=(*c*_{1},*c*_{1})*y* and *w*=(*c*_{2},*c*_{2})*v* for some (*c*_{1},*c*_{1}),(*c*_{2},*c*_{2})∈*U*(*R*). Then, *x**w*=(*c*_{1},*c*_{1})*y*(*c*_{2},*c*_{2})*v*=(*c*_{1},*c*_{1})(*c*_{2},*c*_{2})*y**v*=(*c*,*c*)*y**v* and hence \(xw \thicksim yv\). We denote this congruence unit dot product graph by *C**U**D*(*R*), and its set of vertices is the set of all distinct congruence classes of *U*(*R*), denoted by *C**U*(*R*).

In this section, we characterize the generalized case of the congruence unit dot product graph *C**U**D*(*R*), as we will apply the congruence relation on the unit dot product graph we introduced in the first section.

###
**Theorem 4**

Let *R*=*R*_{2m}×*R*_{2m}. Then, CUD(R) is the union of *m* disjoint *K*_{1,1}’s.

###
*Proof*

For each *a*∈*U*(*R*_{2m}), let *V*_{a} and *W*_{a} be as in the proof of Theorem 2. Then, *V*_{a},*W*_{a}∈*C**U*(*R*). Indeed, for each *a*∈*U*(*R*_{2m}), there exist *V*_{a} and *W*_{a}∈*C**U*(*R*) each has cardinality 2*m*. We conclude that each *K*_{2m,2m} of *U**D*(*R*) is a *K*_{1,1} of *C**U**D*(*R*). From Theorem 2 the result follows. □

###
**Example 2**

In Example 1, we graphed the unit dot product graph of *R*_{2}×*R*_{2}, and now, we graph the congruence dot product graph of the same ring. This graph will be a complete graph of 2 vertices as *R*_{2} is isomorphic to \(\mathbb {Z}\). So, we will have only two congruence classes \([(1,1)]_{\thicksim }=\{(1,1),(-1,-1)\}\) and \([(1,-1)]_{\thicksim }=\{(1,-1),(-1,1)\}\) (Fig. 2).

###
**Theorem 5**

Let *R*=*A*×*A*. If the order of *U*(*A*) is odd, then *C**U**D*(*R*) is the union of \(\frac {m-1}{2}\) disjoint *K*_{1,1}’s and one *K*_{1}.

###
*Proof*

For each *a*∈*U*(*A*), let *V*_{a} and *W*_{a} be as in the proof of Theorem 3. Then, *V*_{a},*W*_{a}∈*C**U*(*R*). Indeed, for each *a*∈*U*(*R*) and *a*≠1, there exist *V*_{a} and *W*_{a}∈*C**U*(*R*) each of cardinality *m*. For *a*=1, we have one congruence class *V*, where *V*={*u*(*a*,*a*) | *u*∈*U*(*A*)}. We conclude that each *K*_{m,m} of *U**D*(*R*) is a *K*_{1,1} of *C**U**D*(*R*), and each *K*_{m} of *U**D*(*R*) is a *K*_{1} of *C**U**D*(*R*). From Theorem 3, the result follows. □

Let \(R=\mathbb {Z}_{n}\times \mathbb {Z}_{n}\). We make a little change on the congruence relation defined above by taking the vertices from the whole ring *R* not only from *U*(*R*). Define a relation on *R* such that \(x \thicksim y\), where *x*,*y*∈*R*, if *x*=(*c*,*c*)*y* for some (*c*,*c*)∈*U*(*R*). It is clear that \(\thicksim \) is an equivalence relation on *R* and also a congruence relation.

The congruence total dot product graph of *R* is defined to be the undirected graph *C**T**D*(*R*), and its vertices are the congruent classes of all the elements of *R* induced by the defined congruence relation \(\thicksim \). Two distinct classes \([X]_{\thicksim }\) and \([Y]_{\thicksim }\) are adjacent if and only if \(x\cdot y= 0\in \mathbb {Z}_{n}\), where *x*·*y* denotes the normal dot product of *x* and *y*. Also, the congruence zero-divisor dot product graph, denoted by *C**Z**D*(*R*), is defined to be an undirected graph whose vertices are the congruent classes of the nonzero zero-divisor elements in *R* and adjacency between distinct vertices remains as defined before.

Obviously, this congruence relation is well-defined. Indeed, let *x*,*x*^{′},*y*,*y*^{′}∈*R* be such that *y*=(*y*_{1},*y*_{2}) and *y*^{′}=(*y*1′,*y*2′) and let *u*,*u*^{′}∈*U*(*R*) be such that *u*=(*c*_{1},*c*_{1}) and *u*^{′}=(*c*1′,*c*1′), where \(y_{1}, y_{1}', y_{2}, y_{2}', c_{1}, c_ 1' \in \mathbb {Z}_{n}\). Assume that \(x\thicksim y\) and \(x'\thicksim y'\). Then, *x*·*x*^{′}=0 if and only if (*c*_{1}*y*_{1})(*c*1′*y*1′)+(*c*_{1}*y*_{2})(*c*1′*y*2′)=0. This happens if and only if *y*_{1}*y*1′+*y*_{2}*y*2′=0, since *c*_{1}*c*1′ is a unit in \(\mathbb {Z}_{n}\).

###
**Theorem 6**

Let \(A=\mathbb {Z}_{p}\), where *p* is a prime number and *R*=*A*×*A*. Then, *C**T**D*(*R*) is disconnected and \(CZD(R)=\Gamma _{\thicksim }(R)\) is a complete graph of 2 vertices.

###
*Proof*

If *C**T**D*(*R*) was connected, then ∃ *x*,*y*∈*R* such that *x* is adjacent to *y*. *x*·*y*=0 if and only if *x**y*=0, leads to a contradiction with (Theorem 2.1, [11]). So, \(CZD(R)=\Gamma _{\thicksim }(R)\) is connected. Since *A* is a field, then all the nonzero zero-divisors in *R* will be in two classes only, which are \([(a,0)]_{\thicksim }\) and \([(0,b)]_{\thicksim }\), ∀ *a*,*b*∈*U*(*A*) and since (*a*,0)·(0,*b*)=0, so it is a complete graph of two vertices. □

If \(A=\mathbb {Z}_{p}\) and \(R=\mathbb {Z}_{p}\times... \times \mathbb {Z}_{p}\), *k* times and *k*<*∞*, then the diameter and girth of *C**Z**D*(*R*) and *C**T**D*(*R*) are the same as the case of *T**D*(*R*) and *Z**D*(*R*), which was discussed before in [11]. This reduces the number of vertices but adjacency is the same in both cases.

###
**Example 3**

If \(A=\mathbb {Z}\), then R=\(\mathbb {Z}\times \mathbb {Z}\). Here, the only units in the form (*c*,*c*) are (1,1) and (-1,-1) so the classes of the zero-divisors will be in the form \([(a,0)]_{\thicksim }=\{(a,0),(-a,0)\}\) and \([(0,a)]_{\thicksim }=\{(0,a),(0,-a)\}\), ∀ *a*∈*U*(*A*). For two distinct vertices (*a*,0)·(*b*,0)≠0, because *a**b*≠0. Then, there will be an edge only between classes in the form \([(a,0)]_{\thicksim }\) and \([(0,b)]_{\thicksim }\), which means diam(*C**Z**D*(*R*))=2 and gr(*C**Z**D*(*R*))=4.

###
**Theorem 7**

Let \(R=\mathbb {Z}_{n}\times \mathbb {Z}_{n}\) for \(n\in \mathbb {N}\) and *n* is not a prime number. Then, *C**T**D*(*R*) is a connected graph with diam(*C**T**D*(*R*))=3 and gr(*C**T**D*(*R*))=3.

###
*Proof*

The proof is similar to that of Theorem 2.3 [11], taking into consideration that the vertices we used are in distinct classes. □