# On the idempotent graph of matrix ring

Avinash Patil1,a, P.S. Momaleb and C.M. Jadhavc $A$ Department of Mathematics,
JET’s Z. B. Patil College, Dhule-424 002, India<EMAIL_ADDRESS>$B$
Department of Mathematics, P. V. P. College, Pravaranagar-413713, India
<EMAIL_ADDRESS>$C$ Department of Mathematics, S.V.S Dadasaheb Rawal
College, Dhondaicha, India<EMAIL_ADDRESS>
###### Abstract.

Let $\mathbb{F}$ be a finite field and $R=M_{2}(\mathbb{F})$ be $2\times 2$
matrix ring over $\mathbb{F}$. In this paper, we explicitly determine all the
idempotents in $R$. Using these idempotents, we study the idempotent graph of
$R$ whose vertex set is the set of non-trivial idempotents in $R$ and two
idempotents $e,f$ are adjacent if $ef=0$ or $fe=0$. It is proved that the
idempotent graph of $R$ is connected regular graph with diameter 2. Its girth
is also characterized. Further, we determine the Wiener and Harary index of
the idempotent graph of $R$.

11footnotetext: Corresponding author

Keywords: idempotent elements, idempotent graph, Winer Index, Harary Index

MSC(2010):05C25,05C15

##  1\. Introduction

All the rings in this paper are associative, having unity and all graphs are
simple. An element $h\in R$ such that $h^{2}=h$ is an idempotent and it is a
central idempotent if it commutes with each element of $R$. Two idempotents
$h$ and $k$ are orthogonal if $hk=kh=0$. In any ring with unity, 0 and 1 are
idempotents called as trivial idempotents. Let $Id(R)$ be the set of
idempotents in $R$. In 1988, Beck [4] introduced the zero-divisor graph
$\Gamma(R)$ of a commutative ring $R$ and conjectured that $\Gamma(R)$ is
weakly perfect whenever $\omega(\Gamma(R))<\infty$. He proved that reduced
rings and principal ideal rings are the ones for which the conjecture is true.
However, Anderson et al. [1] gave a counterexample of a commutative local ring
for which the conjecture is not true. In [3], Anderson et al. modified Beck’s
definition of zero-divisor graph of a commutative ring $R$ to the now standard
definition: $\Gamma(R)$ is the simple graph with vertices the nonzero zero-
divisors of $R$, and vertices $x$ and $y$ are adjacent if $xy=0$.

Cvetko-Vah et al. [5] assigned a simple graph $G(R)$ to $R$ whose vertex set
is $Id(R)$, and two vertices $e$ and $f$ are adjacent if and only if :

  1. (1)

$ef=fe=0$, and

  2. (2)

$eRf\neq 0$ or $fRe\neq 0$.

It is evident from the second condition that if the idempotents of $R$ are
central, then $G(R)$ has no edges. Akbari et al. [2] defined the idempotent
graph $I(R)$ of a ring $R$ as the graph whose vertices are the nontrivial
idempotents of $R$, and two distinct vertices $h$ and $k$ are adjacent if and
only if $hk=kh=0$. Observe that $h+k$ is an idempotent of $R$ whenever $h$ and
$k$ are orthogonal idempotents, which is a notable algebraic property.
Clearly, for a commutative ring, $I(R)$ is a subgraph of $\Gamma(R)$. The
interplay between the algebraic properties of $R$ and graph-theoretic
properties of $I(R)$ has been studied in [2, 5]. For example, if $D$ is a
division ring, then the clique number of $I(M_{n}(D))(n\geq 2)$ is $n$, and
for any commutative Artinian ring $R$ the clique number and the chromatic
number of $I(R)$ are equal to the number of maximal ideals of $R$. Also, for a
division ring $D$, it proved that $diam(I(M_{n}(D)))=4$ for all natural
numbers $n\geq 4$ and $diam(I(M_{3}(D)))=5$. Patil et al. [8] studied the weak
perfectness of $I(R)$ and gave its applications to zero-divisor graphs.

Let $R=M_{2}(\mathbb{F})$ be $2\times 2$ matrix ring over $\mathbb{F}$, where
$\mathbb{F}$ is a finite field. In this paper, we explicitly determine all the
idempotents in $R$ in terms of elements of $\mathbb{F}$. Using these
idempotents, we study the variation of idempotent graph of $R$ whose vertex
set is the set of non-trivial idempotents in $R$ and two idempotents $e,f$ are
adjacent if $ef=0$ or $fe=0$. It is prove that the idempotent graph of $R$ is
connected regular graph with diameter 2. Its girth is also characterized.
Further, we determine the Wiener index and Harary index of the idempotent
graph of $R$.

We begin with the necessary concepts and terminology. For the vertices $a$ and
$b$ of a graph $G$, the distance $d(a,b)$ between $a$ and $b$ is the number of
edges in the shortest path between $a$ and $b$. The largest distance among all
distances between pairs of the vertices of a graph $G$ is the diameter of $G$,
denoted by $diam(G)$. A graph $G$ is connected if for any vertices $x$ and $y$
of $G$ there is a path between $x$ and $y$. For $x\in V(G)$-the set of
vertices of $G$, the set of neighbors of $x$ in $G$ is denoted by
$N(x)=\\{y\in V(G)~{}|~{}y\textnormal{ is adjacent to }x\textnormal{ in
}G\\}$. The girth of $G$ is the length of the shortest cycle in $G$ and is
denoted by $gr(G)$. If $G$ has no cycles, then the girth of $G$ is infinite.
The degree of a vertex $v$ in $G$, denoted by $d(v)$, is the number of
vertices adjacent to $v$ in $G$. A graph $G$ is regular if each of its vertex
have the same degree. A graph is complete if any two of its vertices are
adjacent. The complete graph on $m$ vertices is denoted by $K_{m}$. Henceforth
we use $a\sim b$ to denote the vertices $a$ and $b$ are adjacent, $\mathbb{F}$
to denote a finite field with $n=|\mathbb{F}|$, $\boldsymbol{0}$ to denote
$2\times 2$ zero matrix and $\boldsymbol{1}$ to denote $2\times 2$ identity
matrix.

##  2\. Idempotent in Matrix ring

First we determine the number of idempotents in $R$.

######  Theorem 2.1.

Let $R=M_{2}(\mathbb{F})$. Then $R$ contains exactly $n^{2}+n+2$ idempotents.

###### Proof.

Let $R=M_{2}(\mathbb{F})$, where $\mathbb{F}$ is a finite field. Then $R$ is
vector space over $\mathbb{F}$. Let $A=\left[\begin{array}[]{lr}a&b\\\
c&d\end{array}\right]$ be an idempotent in $R$, i.e $A^{2}=A$, which gives
$(\det A)^{2}=\det A$, i.e. $\det A$ is an idempotent in $\mathbb{F}$. Hence
$\det A\in\\{0,1\\}$. If $\det A=1$, then $A$ is invertible in $R$. This
together with $A^{2}=A$ gives $A=\left[\begin{array}[]{lr}1&0\\\
0&1\end{array}\right]$. Suppose that $\det A=0$. Then $ad-bc=0$. If $A$ is
non-zero, then $A^{2}-A=\boldsymbol{0}$, which gives $tr(A)=1$, i.e. $a+d=1$
in $\mathbb{F}$. Then $ad=bc$ gives $a(1-a)=bc$. Now there are following two
cases.
Case 1. Since $a(1-a)=bc$, we must have either $b=0$ or $c=0$ if and only if
$a\in\\{0,1\\}$. Hence $A$ is of the form $\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right],~{}\left[\begin{array}[]{lr}0&b\\\
0&1\end{array}\right],~{}\left[\begin{array}[]{lr}1&0\\\
c&0\end{array}\right],~{}\left[\begin{array}[]{lr}1&b\\\
0&0\end{array}\right]$, for some $b,c\in\mathbb{F}$. In this case the number
of choices for distinct $A=n+(n-1)+n+(n-1)=4n-2$.
Case 2. Suppose that $b\neq 0$ and $c\neq 0$, which yields $a\notin\\{0,1\\}$.
Then $a(1-a)=bc$ gives $c=a(1-a)b^{-1}$. Hence
$A=\left[\begin{array}[]{lr}a&b\\\ a(1-a)b^{-1}&1-a\end{array}\right]$.
Moreover, for each $a\in\mathbb{F}\backslash\\{0,1\\}$ and non-zero
$b\in\mathbb{F}$, we get an idempotent in $R$. Hence the number of idempotents
in this case = $(n-2)(n-1)$.

Thus the total number of idempotents in $R$ (including trivial idempotents)=
$4n-2+(n-2)(n-1)+2=n^{2}+n+2$. ∎

Recently Masaklar et al. [7] also determined the idempotents in the matrix
rings.

Notation: Let $E_{ij}$ be the matrix units, where $i,j\in\\{1,2\\}$, i.e.,
$E_{ij}=[e_{kl}]_{2\times 2}$, where
$e_{kl}=\left\\{\begin{array}[]{cl}1,&\textnormal{ if }k=i,~{}l=j\\\
0,&\textnormal{ otherwise }\end{array}\right.$ Then we can write
$A=\left[\begin{array}[]{lr}a&b\\\
c&d\end{array}\right]=aE_{11}+bE_{12}+cE_{21}+dE_{22}$.

######  Remark 2.2.

We get a partition of $Id(R)$ as
$\displaystyle{Id(R)=P_{0}\dot{\cup}P_{1}\dot{\cup}\cdots\dot{\cup}P_{7}}$,
where

$P_{0}=\left\\{\left[\begin{array}[]{lr}0&0\\\
0&0\end{array}\right],\left[\begin{array}[]{lr}1&0\\\
0&1\end{array}\right]\right\\},P_{1}=\left\\{E_{11}\right\\},~{}P_{2}=\left\\{E_{22}\right\\},$
$P_{3}=\left\\{\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right]=cE_{21}+E_{22}~{}|~{}\textnormal{ for }\\\
c\in\mathbb{F}\backslash\\{0\\}\right\\},$
$P_{4}=\left\\{\left[\begin{array}[]{lr}0&b\\\
0&1\end{array}\right]=bE_{12}+E_{22}~{}|\textnormal{ for
}b\in\mathbb{F}\backslash\\{0\\}\right\\},$
$P_{5}=\left\\{\left[\begin{array}[]{lr}1&0\\\
c&0\end{array}\right]=E_{11}+cE_{21}~{}|\textnormal{ for
}c\in\mathbb{F}\backslash\\{0\\}\right\\},$
$P_{6}=\left\\{\left[\begin{array}[]{lr}1&b\\\
0&0\end{array}\right]=E_{11}+bE_{12}~{}|\textnormal{ for
}b\in\mathbb{F}\backslash\\{0\\}\right\\}$

and

$P_{7}=\left\\{\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]~{}|\textnormal{ for
}a\in\mathbb{F}\backslash\\{0,1\\}\textnormal{ and
}b\in\mathbb{F}\backslash\\{0\\}\right\\}.$

Observe that $\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]=aE_{11}+bE_{12}+(a(1-a)b^{-1})E_{21}+(1-a)E_{22}$.
Also, $|P_{1}|=|P_{2}|=1$, $|P_{3}|=|P_{4}|=|P_{5}|=|P_{6}|=n-1$ and
$|P_{7}|=(n-2)(n-1)$.

##  3\. Variation of Idempotent graph

Akbari et al. [2] introduced the idempotent graph $I(R)$ of a ring $R$ as the
graph whose vertices are the nontrivial idempotents of $R$, and two distinct
vertices $h$ and $k$ are adjacent if and only if $hk=kh=0$.

We consider the following variation of the idempotent graph.

######  Definition 3.1.

Let $R$ be a ring. We assign a graph $G_{Id}(R)$ to $R$ whose vertices are the
nontrivial idempotents of $R$, and two distinct vertices $h$ and $k$ are
adjacent if and only if $hk=0$ or $kh=0$.

Note : Let $R$ be a ring $R$. Then the graphs $I(R)$ and $G_{Id}(R)$ have the
same vertex set. In fact, $I(R)$ is a subgraph of $G_{Id}(R)$. Moreover, if
$R$ is an abelian ring, then the two graphs are identical.

######  Example 3.2.

Let $R=M_{2}(\mathbb{Z}_{2})$. Then
$Id(R)^{*}=Id(R)\backslash\\{\boldsymbol{0},\boldsymbol{1}\\}=\\{e_{1},e_{2},\cdots,e_{6}\\}$,
where $e_{1}=\left[\begin{array}[]{lr}1&0\\\
0&0\end{array}\right],e_{2}=\left[\begin{array}[]{lr}0&0\\\
0&1\end{array}\right],e_{3}=\left[\begin{array}[]{lr}0&0\\\
1&1\end{array}\right],e_{4}=\left[\begin{array}[]{lr}0&1\\\
0&1\end{array}\right],e_{5}=\left[\begin{array}[]{lr}1&1\\\
0&0\end{array}\right]$ and $e_{6}=\left[\begin{array}[]{lr}1&0\\\
1&0\end{array}\right]$. The graphs $I(R)$ and $G_{Id}(R)$ are as depicted in
Figure 1.

$e_{4}$$e_{5}$$e_{1}$$e_{2}$$e_{3}$$e_{6}$$I(R)$$e_{4}$$e_{5}$$e_{1}$$e_{2}$$e_{3}$$e_{6}$$G_{Id}(R)$
Figure 1. Idempotent graph of $M_{2}(\mathbb{Z}_{2})$ and its variation

Note: Since $\left[\begin{array}[]{lr}x&y\\\
z&w\end{array}\right]\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right]=\boldsymbol{0}$ if and only if
$\left[\begin{array}[]{lr}0&c\\\
0&1\end{array}\right]\left[\begin{array}[]{lr}x&y\\\
z&w\end{array}\right]^{t}=\boldsymbol{0}$ and
$\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right]\left[\begin{array}[]{lr}x&y\\\
z&w\end{array}\right]=\boldsymbol{0}$ if and only if
$\left[\begin{array}[]{lr}x&y\\\
z&w\end{array}\right]^{t}\left[\begin{array}[]{lr}0&c\\\
0&1\end{array}\right]=\boldsymbol{0}$,
$deg\left(\left[\begin{array}[]{lr}0&b\\\
0&1\end{array}\right]\right)=deg\left(\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right]\right)$. Similarly,
$deg\left(\left[\begin{array}[]{lr}1&0\\\
c&0\end{array}\right]\right)=deg\left(\left[\begin{array}[]{lr}1&b\\\
0&0\end{array}\right]\right)$.

Now we will determine the paths and distance between every pair of elements of
the partitioning sets given Remark 2.2.

######  Lemma 3.3.

Let $R=M_{2}(\mathbb{F})$, where $\mathbb{F}$ is a finite field and
$P_{0},\cdots,P_{7}$ as in Remark 2.2. Then the following statements hold in
$G_{Id}(R)$.

  1. (1)

$\displaystyle{d(E_{11},f)=\left\\{\begin{array}[]{cl}1,&\textnormal{ if
}f\in\cup_{i=2}^{4}P_{i}\\\ 2,&\textnormal{ if
}f\in\cup_{i=5}^{7}P_{i}\end{array}\right.}$ and $deg(E_{11})=2n-1$.

  2. (2)

$\displaystyle{d(E_{22},f)=\left\\{\begin{array}[]{cl}1,&\textnormal{ if }f\in
P_{1}\cup P_{5}\cup P_{6}\\\ 2,&\textnormal{ if }f\in P_{3}\cup P_{4}\cup
P_{7}\end{array}\right.}$ and $deg(E_{22})=2n-1$.

  3. (3)

Let $E=\left[\begin{array}[]{lr}a&b\\\ a(1-a)b^{-1}&1-a\end{array}\right]\in
P_{7}$ and $A$ is a nontrivial idempotent not in $P_{7}$. Then $E$ and $A$ are
adjacent if and only if
$A\in\mathbf{A}=\left\\{\left[\begin{array}[]{lr}0&0\\\
(a-1)b^{-1}&1\end{array}\right],~{}\left[\begin{array}[]{lr}0&-a^{-1}b\\\
0&1\end{array}\right],~{}\left[\begin{array}[]{lr}1&(a-1)^{-1}b\\\
0&0\end{array}\right],\left[\begin{array}[]{lr}1&0\\\
-ab^{-1}&0\end{array}\right]\right\\}$.

  4. (4)

Let $A_{1}=\left[\begin{array}[]{lr}0&0\\\ c&1\end{array}\right]\in P_{3}$.

    1. (a)

If $\displaystyle{B_{1}\in\cup_{i=3}^{6}P_{i}}$, then
$\displaystyle{d(A_{1},B_{1})=\left\\{\begin{array}[]{cl}1,&\textnormal{ if
}B_{1}\in P_{5}\cup\\{x_{1}\\}\\\ 2,&\textnormal{ if }B_{1}\in\left(P_{3}\cup
P_{4}\cup P_{6}\right)\backslash\\{x_{1},A_{1}\\}\end{array}\right.}$, where
$x_{1}=\left[\begin{array}[]{lr}0&-c^{-1}\\\ 0&1\end{array}\right]$.

    2. (b)

If $B_{1}=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\in P_{7}$, then
$d(A_{1},B_{1})=\left\\{\begin{array}[]{cl}1,&\textnormal{ if }B_{1}=x_{2}\\\
2,&\textnormal{ if }B_{1}\in P_{7}\backslash\\{x_{2}\\}\end{array}\right.$,
where $x_{2}=\left[\begin{array}[]{lr}a&-(1-a)c^{-1}\\\
-ac&1-a\end{array}\right]$.

  5. (5)

Let $A_{2}=\left[\begin{array}[]{lr}0&c\\\ 0&1\end{array}\right]\in P_{4}$.

    1. (a)

If $\displaystyle{B_{2}\in\cup_{i=3}^{6}P_{i}}$, then
$\displaystyle{d(A_{2},B_{2})=\left\\{\begin{array}[]{cl}1,&\textnormal{ if
}B_{2}\in P_{6}\cup\\{x_{3}\\}\\\ 2,&\textnormal{ if }B_{2}\in\left(P_{3}\cup
P_{4}\cup P_{5}\right)\backslash\\{x_{3},A_{2}\\}\end{array}\right.}$, where
$x_{3}=\left[\begin{array}[]{lr}0&0\\\ -c^{-1}&1\end{array}\right]$.

    2. (b)

If $B_{2}=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\in P_{7}$, then
$d(A_{2},B_{2})=\left\\{\begin{array}[]{cl}1,&\textnormal{ if }B_{2}=x_{4}\\\
2,&\textnormal{ if }B_{2}\in P_{7}\backslash\\{x_{4}\\}\end{array}\right.$,
where $x_{4}=\left[\begin{array}[]{lr}a&-ac\\\
(a-1)c^{-1}&1-a\end{array}\right]$.

  6. (6)

Let $A_{3}=\left[\begin{array}[]{lr}1&0\\\ c&0\end{array}\right]\in P_{5}$.

    1. (a)

If $\displaystyle{B_{3}\in\cup_{i=3}^{6}P_{i}}$, then
$\displaystyle{d(A_{3},B_{3})=\left\\{\begin{array}[]{cl}1,&\textnormal{ if
}B_{3}\in P_{3}\cup\\{x_{5}\\}\\\ 2,&\textnormal{ if }B_{3}\in\left(P_{4}\cup
P_{5}\cup P_{6}\right)\backslash\\{x_{5},A_{3}\\}\end{array}\right.}$, where
$x_{5}=\left[\begin{array}[]{lr}1&-c^{-1}\\\ 0&0\end{array}\right]$.

    2. (b)

If $B_{3}=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\in P_{7}$, then
$d(A_{3},B_{3})=\left\\{\begin{array}[]{cl}1,&\textnormal{ if }B_{3}=x_{6}\\\
2,&\textnormal{ if }B_{3}\in P_{7}\backslash\\{x_{6}\\}\end{array}\right.$,
where $x_{6}=\left[\begin{array}[]{lr}a&-ac^{-1}\\\
(a-1)c&1-a\end{array}\right]$.

  7. (7)

Let $A_{4}=\left[\begin{array}[]{lr}1&c\\\ 0&0\end{array}\right]\in P_{6}$.

    1. (a)

If $\displaystyle{B_{4}\in\cup_{i=3}^{6}P_{i}}$, then
$\displaystyle{d(A_{4},B_{4})=\left\\{\begin{array}[]{cl}1,&\textnormal{ if
}B_{4}\in P_{4}\cup\\{x_{7}\\}\\\ 2,&\textnormal{ if }B_{4}\in\left(P_{3}\cup
P_{5}\cup P_{6}\right)\backslash\\{x_{7},A_{4}\\}\end{array}\right.}$, where
$x_{7}=\left[\begin{array}[]{lr}1&0\\\ -c^{-1}&0\end{array}\right]$.

    2. (b)

If $B_{4}=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\in P_{7}$, then
$d(A_{3},B_{3})=\left\\{\begin{array}[]{cl}1,&\textnormal{ if }B_{3}=x_{8}\\\
2,&\textnormal{ if }B_{3}\in P_{7}\backslash\\{x_{8}\\}\end{array}\right.$,
where $x_{8}=\left[\begin{array}[]{lr}a&(a-1)c\\\
-ac^{-1}&1-a\end{array}\right]$.

###### Proof.

(1) Observe that $E_{11}=\left[\begin{array}[]{lr}1&0\\\
0&0\end{array}\right]$ is adjacent to $\left[\begin{array}[]{lr}0&0\\\
0&1\end{array}\right],~{}\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right]$ and $\left[\begin{array}[]{lr}0&b\\\
0&1\end{array}\right]$ only, where $b,c\in\mathbb{F}\backslash\\{0\\}$. Hence
$E_{11}$ is adjacent to every element of $\displaystyle{\cup_{i=2}^{4}P_{i}}$
and $E_{11}$ is not adjacent to every element of
$\displaystyle{\cup_{i=5}^{7}P_{i}}$. Also for any $f\in P_{5}\cup P_{6}$,
$E_{11}\sim E_{22}\sim f$ is a path in $G_{Id}(R)$. Let
$x=\left[\begin{array}[]{lr}a&b\\\ a(1-a)b^{-1}&1-a\end{array}\right]\in
P_{7}$. Then $E_{11}$ and $x$ are non-adjacent and $E_{11}\sim g\sim x$ is a
path (since $E_{11}g=gx=\boldsymbol{0}$), where
$g=\left[\begin{array}[]{lr}0&0\\\ (a-1)b^{-1}&1\end{array}\right]\in P_{3}$.
Hence $d(E_{11},x)=2$, $\forall x\in P_{7}$. Therefore
$\displaystyle{d(E_{11},f)=\left\\{\begin{array}[]{cl}1,&\textnormal{ if
}f\in\cup_{i=2}^{4}P_{i}\\\ 2,&\textnormal{ if
}f\in\cup_{i=5}^{7}P_{i}\end{array}\right.}$.
(2) Observe that $E_{22}=\left[\begin{array}[]{lr}0&0\\\
0&1\end{array}\right]$ is adjacent to is adjacent to
$\left[\begin{array}[]{lr}1&0\\\
0&0\end{array}\right],~{}\left[\begin{array}[]{lr}1&b\\\
0&0\end{array}\right]$ and $\left[\begin{array}[]{lr}1&0\\\
c&0\end{array}\right]$ only, where $b,c\in\mathbb{F}\backslash\\{0\\}$, i.e.
$E_{22}$ is adjacent to every element of $P_{1}\cup P_{5}\cup P_{6}$ and
$E_{22}$ is not adjacent to any element of $P_{3}\cup P_{4}\cup P_{7}$. Also,
for any $f\in P_{3}\cup P_{4}$, $E_{22}\sim E_{11}\sim f$ is a path in
$G_{Id}(R)$(since $E_{11}E_{22}=\boldsymbol{0}=fE_{11}$). Let
$y=\left[\begin{array}[]{lr}a&b\\\ a(1-a)b^{-1}&1-a\end{array}\right]\in
P_{7}$. Then $E_{22}$ and $y$ are non-adjacent and $E_{22}\sim h\sim y$ is a
path (since $E_{22}h=hy=\boldsymbol{0}$), where
$h=\left[\begin{array}[]{lr}1&(a-1)^{-1}b\\\ 0&0\end{array}\right]\in P_{6}$.
Hence $d(E_{22},y)=2$, $\forall y\in P_{7}$. Therefore
$d(E_{22},f)=\left\\{\begin{array}[]{cl}1,&\textnormal{ if }f\in P_{1}\cup
P_{5}\cup P_{6}\\\ 2,&\textnormal{ if }f\in P_{3}\cup P_{4}\cup
P_{7}\end{array}\right..$
(3) Observe that $E=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]$ is not adjacent to $E_{11}$ and $E_{22}$.
Also, for nonzero $c\in\mathbb{F}$, we have $\left[\begin{array}[]{lr}1&0\\\
c&0\end{array}\right]E\neq\boldsymbol{0}$, $E\left[\begin{array}[]{lr}1&c\\\
0&0\end{array}\right]\neq\boldsymbol{0}$, $\left[\begin{array}[]{lr}0&c\\\
0&1\end{array}\right]E\neq\boldsymbol{0}$ and
$E\left[\begin{array}[]{lr}0&0\\\ c&1\end{array}\right]\neq\boldsymbol{0}$.
Let $\left[\begin{array}[]{lr}0&0\\\ c&1\end{array}\right]E=\boldsymbol{0}$.
Which gives $\left[\begin{array}[]{lr}0&0\\\
ac+a(1-a)b^{-1}&bc+1-a\end{array}\right]=\boldsymbol{0}$, which yields
$ac+a(1-a)b^{-1}=0$ and $bc+1-a=0$. Consequently, $c=(a-1)b^{-1}$. Thus
$\left[\begin{array}[]{lr}0&0\\\ c&1\end{array}\right]E=\boldsymbol{0}$ if and
only if $c=(a-1)b^{-1}$. Next, let $E\left[\begin{array}[]{lr}1&0\\\
c&0\end{array}\right]=\boldsymbol{0}$. Which gives
$\left[\begin{array}[]{lr}a+bc&0\\\
a(1-a)b^{-1}+c(1-a)&0\end{array}\right]=\boldsymbol{0}$ which yields
$a(1-a)b^{-1}+c(1-a)=0$ and $a+bc=0$. Consequently, $c=-ab^{-1}$. Thus
$E\left[\begin{array}[]{lr}1&0\\\ c&0\end{array}\right]=\boldsymbol{0}$ if and
only if $c=-ab^{-1}$. Similarly $E\left[\begin{array}[]{lr}1&c\\\
0&0\end{array}\right]E=\boldsymbol{0}$ gives $c=(a-1)^{-1}b$; and
$E\left[\begin{array}[]{lr}0&c\\\ 0&1\end{array}\right]=\boldsymbol{0}$ gives
$c=-a^{-1}b$. Therefore, if $A$ is a nontrivial idempotent not in $P_{7}$,
then $E$ is adjacent to $A$ if and only if
$A\in\mathbf{A}=\left\\{\left[\begin{array}[]{lr}0&0\\\
(a-1)b^{-1}&1\end{array}\right],~{}\left[\begin{array}[]{lr}0&-a^{-1}b\\\
0&1\end{array}\right],~{}\left[\begin{array}[]{lr}1&(a-1)^{-1}b\\\
0&0\end{array}\right],\left[\begin{array}[]{lr}1&0\\\
-ab^{-1}&0\end{array}\right]\right\\}$.
(4) (a) Let $A_{1}=\left[\begin{array}[]{lr}0&0\\\ c&1\end{array}\right]$,
$\displaystyle{B_{1}\in\cup_{i=3}^{6}P_{i}}$ and
$x_{1}=\left[\begin{array}[]{lr}0&-c^{-1}\\\ 0&1\end{array}\right]$. Since
$A_{1}x_{1}=\boldsymbol{0}=\left[\begin{array}[]{lr}1&0\\\
b&0\end{array}\right]A_{1}$, for every nonzero $b\in\mathbb{F}$, we have
$A_{1}$ adjacent to $x_{1}$ and to every element of $P_{5}$. On the other
hand, $A_{1}$ is not adjacent to any element of $P_{3}\cup P_{4}\cup P_{6}$
(since $A_{1}B_{1}\neq\boldsymbol{0}$ and $B_{1}A_{1}\neq\boldsymbol{0}$, for
every $B_{1}\in(P_{3}\cup P_{4}\cup P_{6})\backslash\\{x_{1}\\}$). If
$B_{1}\in(P_{3}\cup P_{4})\backslash\\{x_{1}\\}$, then $E_{11}$ is a common
neighbour of $A_{1}$ and $B_{1}$. If $B_{1}=\left[\begin{array}[]{lr}1&b\\\
0&0\end{array}\right]\in P_{6}$, then $A_{1}\sim y\sim B_{1}$ is a path(since
$yA_{1}=B_{1}y=\boldsymbol{0}$), where $y=\left[\begin{array}[]{lr}1&0\\\
-b^{-1}&0\end{array}\right]\in P_{5}$. Hence the result.
(b) Let $B_{1}=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\in P_{7}$. Then
$B_{1}A_{1}\neq\boldsymbol{0}$, since $b$ is nonzero. Let
$A_{1}B_{1}=\boldsymbol{0}$, i.e., $\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right]\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]=\boldsymbol{0}$. Which gives
$\left[\begin{array}[]{lr}0&0\\\
ac+a(1-a)b^{-1}&bc+1-a\end{array}\right]=\boldsymbol{0}$ if and only if
$b=(a-1)c^{-1}$, i.e. $B_{1}=x_{2}$. Suppose that $B_{1}\neq x_{2}$. Then
$A_{1}\sim y_{1}\sim B_{1}$ is a path (since
$y_{1}A_{1}=B_{1}y_{1}=\boldsymbol{0}$), where
$y_{1}=\left[\begin{array}[]{lr}1&0\\\ -ab^{-1}&0\end{array}\right]$. Hence
the result.
(5) (a) Let $A_{2}=\left[\begin{array}[]{lr}0&c\\\ 0&1\end{array}\right]$,
$\displaystyle{B_{2}\in\cup_{i=3}^{6}P_{i}}$ and
$x_{3}=\left[\begin{array}[]{lr}0&0\\\ -c^{-1}&1\end{array}\right]$. Since
$x_{3}A_{2}=\boldsymbol{0}=A_{2}\left[\begin{array}[]{lr}1&b\\\
0&0\end{array}\right]$, for every nonzero $b\in\mathbb{F}$, we have $A_{2}$
adjacent to $x_{3}$ and to every element of $P_{6}$. On the other hand,
$A_{2}$ is not adjacent to any element of $(P_{3}\cup P_{4}\cup
P_{5})\backslash\\{x_{3}\\}$ (since $A_{2}B_{2}\neq\boldsymbol{0}$ and
$B_{2}A_{2}\neq\boldsymbol{0}$, for every $B_{2}\in(P_{3}\cup P_{4}\cup
P_{5})\backslash\\{x_{3}\\}$). If $B_{2}\in(P_{3}\cup
P_{4})\backslash\\{x_{3}\\}$, then $E_{11}$ is a common neighbour of $A_{2}$
and $B_{2}$. If $B_{2}=\left[\begin{array}[]{lr}1&0\\\
b&0\end{array}\right]\in P_{5}$, then $A_{2}\sim y^{\prime}\sim B_{2}$ is a
path(since $A_{2}y^{\prime}=y^{\prime}B_{2}=\boldsymbol{0}$), where
$y^{\prime}=\left[\begin{array}[]{lr}1&-b^{-1}\\\ 0&0\end{array}\right]\in
P_{6}$. Hence the result.
(b) Let $B_{2}=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\in P_{7}$. Then
$A_{2}B_{2}\neq\boldsymbol{0}$, since $1-a$ is nonzero. Let
$B_{2}A_{2}=\boldsymbol{0}$, i.e., $\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\left[\begin{array}[]{lr}0&c\\\
0&1\end{array}\right]=\boldsymbol{0}$. Which gives
$\left[\begin{array}[]{lr}0&ac+b\\\
0&ac(1-a)b^{-1}+(1-a)\end{array}\right]=\boldsymbol{0}$ if and only if
$b=-ac$, i.e. $B_{2}=x_{4}$. Suppose that $B_{2}\neq x_{4}$. Then $A_{2}\sim
y_{2}\sim B_{2}$ is a path (since $A_{2}y_{2}=y_{2}B_{2}=\boldsymbol{0}$),
where $y_{2}=\left[\begin{array}[]{lr}1&(a-1)^{-1}\\\ 0&0\end{array}\right]$.
Hence the result.
(6) (a) Let $A_{3}=\left[\begin{array}[]{lr}1&0\\\ c&0\end{array}\right]$,
$\displaystyle{B_{3}\in\cup_{i=3}^{6}P_{i}}$ and
$x_{5}=\left[\begin{array}[]{lr}1&-c^{-1}\\\ 0&0\end{array}\right]$. Since
$x_{5}A_{3}=\boldsymbol{0}=A_{3}\left[\begin{array}[]{lr}0&0\\\
b&1\end{array}\right]$, for every nonzero $b\in\mathbb{F}$, we have $A_{3}$
adjacent to $x_{5}$ and to every element of $P_{3}$. On the other hand,
$A_{3}$ is not adjacent to any element of $(P_{4}\cup P_{5}\cup
P_{6})\backslash\\{x_{5}\\}$ (since $A_{3}B_{3}\neq\boldsymbol{0}$ and
$B_{3}A_{3}\neq\boldsymbol{0}$, for every $B_{3}\in(P_{4}\cup P_{5}\cup
P_{6})\backslash\\{x_{5}\\}$). If $B_{3}\in(P_{5}\cup
P_{6})\backslash\\{x_{5}\\}$, then $E_{22}$ is a common neighbour of $A_{3}$
and $B_{3}$. If $B_{3}=\left[\begin{array}[]{lr}0&b\\\
0&1\end{array}\right]\in P_{4}$, then $A_{3}\sim y^{\prime\prime}\sim B_{3}$
is a path (since
$A_{3}y^{\prime\prime}=\boldsymbol{0}=y^{\prime\prime}B_{3}$), where
$y^{\prime\prime}=\left[\begin{array}[]{lr}0&0\\\
-b^{-1}&1\end{array}\right]\in P_{3}$. Hence the result.
(b) Let $B_{3}=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\in P_{7}$. Then
$A_{3}B_{3}\neq\boldsymbol{0}$, since $a$ is nonzero. Let
$B_{3}A_{3}=\boldsymbol{0}$, i.e., $\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\left[\begin{array}[]{lr}1&0\\\
c&0\end{array}\right]=\boldsymbol{0}$. Which gives
$\left[\begin{array}[]{lr}a+bc&0\\\
a(1-a)b^{-1}+c(1-a)&0\end{array}\right]=\boldsymbol{0}$ if and only if
$b=-ac^{-1}$, i.e. $B_{3}=x_{6}$. Suppose that $B_{3}\neq x_{6}$. Then
$A_{3}\sim y_{3}\sim B_{3}$ is a path (since
$A_{3}y_{3}=y_{3}B_{3}=\boldsymbol{0}$), where
$y_{3}=\left[\begin{array}[]{lr}0&0\\\ (a-1)b^{-1}&1\end{array}\right]\in
P_{3}$. Hence the result.
(7) (a) Let $A_{4}=\left[\begin{array}[]{lr}1&c\\\ 0&0\end{array}\right]$,
$\displaystyle{B_{4}\in\cup_{i=3}^{6}P_{i}}$ and
$x_{7}=\left[\begin{array}[]{lr}1&0\\\ -c^{-1}&0\end{array}\right]$. Since
$A_{4}x_{7}=\boldsymbol{0}=\left[\begin{array}[]{lr}0&b\\\
0&1\end{array}\right]A_{4}$, for every nonzero $b\in\mathbb{F}$, we have
$A_{4}$ adjacent to $x_{7}$ and to every element of $P_{4}$. On the other
hand, $A_{4}$ is not adjacent to any element of $(P_{3}\cup P_{5}\cup
P_{6})\backslash\\{x_{7}\\}$ (since $A_{4}B_{4}\neq\boldsymbol{0}$ and
$B_{4}A_{4}\neq\boldsymbol{0}$, for every $B_{4}\in(P_{3}\cup P_{5}\cup
P_{6})\backslash\\{x_{7}\\}$). If $B_{4}\in(P_{5}\cup
P_{6})\backslash\\{x_{7}\\}$, then $E_{22}$ is a common neighbour of $A_{4}$
and $B_{4}$. If $B_{4}=\left[\begin{array}[]{lr}0&0\\\
b&1\end{array}\right]\in P_{3}$, then $A_{4}\sim\tilde{y}\sim B_{4}$ is a path
(since $\tilde{y}A_{4}=\boldsymbol{0}=B_{4}\tilde{y}$), where
$\tilde{y}=\left[\begin{array}[]{lr}0&-b^{-1}\\\ 0&1\end{array}\right]\in
P_{6}$. Hence the result.
(b) Let $B_{4}=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\in P_{7}$. Then
$B_{4}A_{4}\neq\boldsymbol{0}$, since $a$ is nonzero. Let
$A_{4}B_{4}=\boldsymbol{0}$, i.e., $\left[\begin{array}[]{lr}1&c\\\
0&0\end{array}\right]\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]=\boldsymbol{0}$. Which gives
$\left[\begin{array}[]{lr}a+ac(1-a)^{-1}&b+c(1-a)\\\
0&0\end{array}\right]=\boldsymbol{0}$ if and only if $b=-(1-a)c$, i.e.
$B_{4}=x_{8}$. Suppose that $B_{4}\neq x_{8}$. Then $A_{4}\sim y_{4}\sim
B_{4}$ is a path (since $y_{4}A_{4}=B_{4}y_{4}=\boldsymbol{0}$), where
$y_{4}=\left[\begin{array}[]{lr}0&-a^{-1}b\\\ 0&1\end{array}\right]\in P_{3}$.
Hence the result. ∎

######  Corollary 3.4.

Let $R=M_{2}(\mathbb{F})$, where $\mathbb{F}$ is a finite field and
$P_{0},\cdots,P_{7}$ as in Remark 2.2. Then $\deg(A)=2n-1$, for each
$\displaystyle{A\in\cup_{i=1}^{6}P_{i}}$.

###### Proof.

Clearly, for any vertex $x$ in a graph $G$, $\deg(x)=\left|\\{y\in
V(G)~{}|~{}d(x,y)=1\\}\right|$. By Lemma 3.3(1), we get
$\deg(E_{11})=|P_{2}|+|P_{3}|+|P_{4}|=1+n-1+n-1=2n-1$. Similarly, by Lemma
3.3(2), $\deg(E_{22})=|P_{1}|+|P_{5}|+|P_{6}|=1+n-1+n-1=2n-1$.

Suppose that $A\in P_{3}$. Then $A_{1}=\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right]$, for some nonzero $c\in\mathbb{F}$. Hence $A$ is
adjacent to every element of $P_{5}\cup\\{E_{11},x_{1}\\}$, where
$x_{1}=\left[\begin{array}[]{lr}0&-c^{-1}\\\ 0&1\end{array}\right]$. Also, by
Lemma 3.3(4), $A$ is adjacent to $\left[\begin{array}[]{lr}a&-(1-a)c^{-1}\\\
-ac&1-a\end{array}\right]$, for every $a\in\mathbb{F}\backslash\\{0,1\\}$,
i.e. $A$ is adjacent to $n-2$ elements from $P_{7}$. Hence
$\deg(A)=|P_{5}\cup\\{E_{11},x_{1}\\}|+n-2=|P_{5}|+2+n-2=n-1+n=2n-1$ (since
$|P_{5}|=n-1$). Similarly, $\deg(A)=2n-1$, when $A\in P_{i}$, for $i=4,5,6$.
Hence the result follows. ∎

From Lemma 3.3(3), it is clear that an element $E$ of $P_{7}$ is adjacent to
only 4 elements from $\displaystyle{\cup_{i=1}^{6}P_{i}}$. The following
result gives the elements of $P_{7}$ that are adjacent to $E$.

######  Lemma 3.5.

Let $E=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right],~{}E_{i}=\left[\begin{array}[]{lr}a_{i}&b_{i}\\\
a_{i}(1-a_{i})b_{i}^{-1}&1-a_{i}\end{array}\right]\in P_{7}$, for $i=1,2$.
Then

  1. (1)

$EE_{1}=\boldsymbol{0}$ if and only if $b_{1}=-(1-a_{1})a^{-1}b$.

  2. (2)

$E_{2}E=\boldsymbol{0}$ if and only if $b_{2}=-a_{2}(1-a)^{-1}b$.

Moreover, $\deg(E)=2n-1$.

###### Proof.

(1) Suppose that $EE_{1}=\boldsymbol{0}$, i.e.,
$\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\left[\begin{array}[]{lr}a_{1}&b_{1}\\\
a_{1}(1-a_{1})b_{1}^{-1}&1-a_{1}\end{array}\right]=\boldsymbol{0}$, which
gives
$\left[\begin{array}[]{lr}aa_{1}+a_{1}(1-a_{1})bb_{1}^{-1}&ab_{1}+b(1-a_{1})\\\
a(1-a)a_{1}b^{-1}+(1-a)a_{1}(1-a_{1})b_{1}^{-1}&a(1-a)b^{-1}b_{1}+(1-a)(1-a_{1})\end{array}\right]=\boldsymbol{0}$,
which yields

$\begin{array}[]{rc}aa_{1}+a_{1}(1-a_{1})bb_{1}^{-1}&=0\\\
ab_{1}+b(1-a_{1})&=0\\\ a(1-a)a_{1}b^{-1}+(1-a)a_{1}(1-a_{1})b_{1}^{-1}&=0\\\
a(1-a)b^{-1}b_{1}+(1-a)(1-a_{1})&=0\end{array}.$
Consequently, $b_{1}=-(1-a_{1})a^{-1}b$. Thus, in this case, $E$ is adjacent
to
$\left[\begin{array}[]{lr}a_{1}&-(1-a_{1})a^{-1}b\\\
-a_{1}ab^{-1}&1-a_{1}\end{array}\right]$, for each
$a_{1}\in\mathbb{F}\backslash\\{0,1\\}$, i.e. $E$ has $n-2$ distinct neighbour
in this case.
(2) Suppose that $E_{2}E=\boldsymbol{0}$, i.e.,
$\left[\begin{array}[]{lr}a_{2}&b_{2}\\\
a_{2}(1-a_{2})b_{2}^{-1}&1-a_{2}\end{array}\right]\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]=\boldsymbol{0}$, which gives (by taking
transpose) $\left[\begin{array}[]{lr}a&a(1-a)b^{-1}\\\
b&1-a\end{array}\right]\left[\begin{array}[]{lr}a_{2}&a_{2}(1-a_{2})b_{2}^{-1}\\\
b_{2}&1-a_{2}\end{array}\right]=\boldsymbol{0}$. By (1) above, we have
$\left[\begin{array}[]{lr}a&a(1-a)b^{-1}\\\ b&1-a\end{array}\right]$ is
adjacent to $\left[\begin{array}[]{lr}a_{2}&a_{2}(1-a_{2})b_{2}^{-1}\\\
b_{2}&1-a_{2}\end{array}\right]$ if and only if
$a_{2}(1-a_{2})b_{2}^{-1}=-(1-a_{2})a^{-1}[a(1-a)b^{-1}],\textnormal{ i.e.
~{}~{}}b_{2}=-a_{2}(1-a)^{-1}b$. Hence
$E_{2}=\left[\begin{array}[]{lr}a_{2}&-a_{2}(1-a)^{-1}b\\\
-(1-a_{2})(1-a)b^{-1}&1-a_{2}\end{array}\right]$ is adjacent to $E$, for each
$a_{2}\in\mathbb{F}\backslash\\{0,1\\}$, i.e. $E$ has $n-2$ distinct neighbour
in this case.

Next, we will determine the degree of $E$. Observe that, if
$EE_{2}=\boldsymbol{0}$, then $E_{2}$ was also counted in case (1) above.
Hence to get distinct $E_{2}$, we should omit the case when
$EE_{2}=\boldsymbol{0}$ also, i.e. the case when,
$EE_{2}=\boldsymbol{0}=E_{2}E$. Then $EE_{2}=\boldsymbol{0}$ gives (by (1)
above) $b_{2}=-(1-a_{2})a^{-1}b$ and $E_{2}E=\boldsymbol{0}$ gives (by (2)
above) $b_{2}=-a_{2}(1-a)^{-1}b$. Hence $-(1-a_{2})a^{-1}b=-a_{2}(1-a)^{-1}b$,
i.e.,$(1-a_{2})a^{-1}=a_{2}(1-a)^{-1}$, which gives $(1-a_{2})(1-a)=a_{2}a$,
which yields $a_{2}=1-a$. Then $b_{2}=-a_{2}(1-a)^{-1}b=-(1-a)(1-a)^{-1}b$
giving $b_{2}=-b$. Thus $EE_{2}=\boldsymbol{0}$ and $E_{2}E=\boldsymbol{0}$ if
and only if $E_{2}=\boldsymbol{1}-E$.

Let $\mathbf{A}$ be as given Lemma 3.3(3). Then
$\deg(E)=|\mathbf{A}|+n-2+n-2-1=4+2n-5=2n-1$. ∎

######  Proposition 3.6.

Let $R=M_{2}(\mathbb{F})$, where $\mathbb{F}$ is a finite field. Then for any
nonzero idempotent $E\in R$, $AE=EA=\boldsymbol{0}$ if and only if
$A=\boldsymbol{1}-E$.

###### Proof.

Let $E$ be a nonzero idempotent in $R$ and $P_{1},P_{2},\cdots,P_{7}$ be as in
Remark 2.2. Clearly $\boldsymbol{1}-E$ is a nonzero idempotent in $R$ such
that $E(\boldsymbol{1}-E)=(\boldsymbol{1}-E)E=\boldsymbol{0}$. Since
$V(G_{Id}(R))=\dot{\cup}_{i=1}^{7}P_{i}$, we have the following cases.
Case 1) If $E=E_{11}$, then $\boldsymbol{1}-E=E_{22}$. Let $A$ be a nonzero
idempotent in $R$. If $A\in P_{3}$, then $A=\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right]$, for some nonzero $c\in\mathbb{F}$. Then
$EA=\boldsymbol{0}$, but $AE\neq\boldsymbol{0}$. On the other hand, if $A\in
P_{4}$, then $A=\left[\begin{array}[]{lr}0&c\\\ 0&1\end{array}\right]$, for
some nonzero $c\in\mathbb{F}$. Then $AE=\boldsymbol{0}$, but
$EA\neq\boldsymbol{0}$. If $\displaystyle{A\in\cup_{i=5}^{7}P_{i}}$, then
$EA\neq\boldsymbol{0}$ and $AE\neq\boldsymbol{0}$ (by Lemma 3.3(1)). Thus
$EA=\boldsymbol{0}$ and $AE=\boldsymbol{0}$ if and only if
$A=E_{22}=\boldsymbol{1}-E$.
Case 2) Suppose that $E=E_{22}$. Hence $\boldsymbol{1}-E=E_{11}$. If $A\in
P_{5}$, then $A=\left[\begin{array}[]{lr}1&0\\\ c&0\end{array}\right]$, for
some nonzero $c\in\mathbb{F}$. Then $AE=\boldsymbol{0}$, but
$EA\neq\boldsymbol{0}$. On the other hand, if $A\in P_{6}$, then
$A=\left[\begin{array}[]{lr}1&c\\\ 0&0\end{array}\right]$, for some nonzero
$c\in\mathbb{F}$. Then $EA=\boldsymbol{0}$, but $AE\neq\boldsymbol{0}$. If
$A\in P_{3}\cup P_{4}\cup P_{7}$, then $EA\neq\boldsymbol{0}$ and
$AE\neq\boldsymbol{0}$ (by Lemma 3.3(2)). Thus $EA=\boldsymbol{0}$ and
$AE=\boldsymbol{0}$ if and only if $A=E_{11}=\boldsymbol{1}-E$.
Case 3) Suppose that $E\in P_{3}$, i.e. $E=\left[\begin{array}[]{lr}0&0\\\
c&1\end{array}\right]$, for some nonzero $c\in\mathbb{F}$. Hence
$\boldsymbol{1}-E=\left[\begin{array}[]{lr}1&0\\\ -c&0\end{array}\right]\in
P_{5}$. Observe that $E_{11}E=\boldsymbol{0}$, but
$EE_{11}\neq\boldsymbol{0}$; $EE_{22}\neq\boldsymbol{0}$ and
$E_{22}E\neq\boldsymbol{0}$. If $A\in(P_{3}\cup P_{4}\cup P_{6}\cup
P_{7})\backslash\\{x_{1},x_{2}\\}$, where
$x_{1}=\left[\begin{array}[]{lr}0&-c^{-1}\\\
0&1\end{array}\right],~{}x_{2}=\left[\begin{array}[]{lr}a&-(1-a)c^{-1}\\\
-ac&1-a\end{array}\right]$, for any nonzero $a\in\mathbb{F}$, then
$EA\neq\boldsymbol{0}$ and $AE\neq\boldsymbol{0}$. Also,
$x_{1}E\neq\boldsymbol{0}$ and $x_{2}E\neq\boldsymbol{0}$. If $A\in P_{5}$,
then $AE=\boldsymbol{0}$. But $EA\neq\boldsymbol{0}$ if
$A\neq\boldsymbol{1}-E$. Thus , in this case also, $EA=\boldsymbol{0}$ and
$AE=\boldsymbol{0}$ if and only if $A=E_{11}=\boldsymbol{1}-E$.

Similarly, the result follows when $E\in P_{i}$, for $i=4,5,6$.

If $A\in P_{7}$, then the result follows from the second-last para of proof of
Lemma 3.5. ∎

Next we give the structure of the idempotent graph $I(R)$.

######  Theorem 3.7.

Let $R=M_{2}(\mathbb{F})$. Then $I(R)$ is a disjoint union of
$\frac{n(n+1)}{2}$ copies of $K_{2}$.

###### Proof.

The proof follows from Theorem 2.1 and Proposition 3.6. ∎

We close the section by giving the structure of $G_{Id}(R)$.

######  Theorem 3.8.

Let $R=M_{2}(\mathbb{F})$, where $\mathbb{F}$ is a finite field. Then
$G_{Id}(R))$ is a connected regular graph of degree $2n-1$. Moreover,
$diam(G_{Id}(R))=2$ and

$gr(G_{Id}(R))=\left\\{\begin{array}[]{cl}4,&\textnormal{ if
}\mathbb{F}=\mathbb{Z}_{2}\\\ 3,&\textnormal{ otherwise }\end{array}\right..$

###### Proof.

Let $P_{1},P_{2},\cdots P_{7}$ be the sets as in Remark 2.2. It is clear that
$V(G_{Id}(R))=\dot{\cup}_{i=1}^{7}P_{i}$. From Lemma 3.3 it is clear that a
vertex $E_{11}$ is connected to every other vertex by a path of length at most
2, hence $G_{Id}(R))$ is connected. Also, from Lemma 3.3(1),(2), Corollary 3.4
and Lemma 3.5, it follows that $\deg(v)=2n-1$, $\forall v\in V(G_{Id}(R))$.
Therefore $G_{Id}(R))$ is a regular graph of degree $2n-1$.

Now by Lemma 3.3, it is evident that $E_{11}$ and $E_{22}$ have no common
neighbour in $V(G_{Id}(R))$. It also follows that no two adjacent vertices in
$\displaystyle{\cup_{i=1}^{6}P_{i}}$ have common neighbour in
$\displaystyle{\cup_{i=1}^{6}P_{i}}$. Suppose that
$\mathbb{F}=\mathbb{Z}_{2}$. By Remark 2.2, $|P_{7}|=0$, i.e.,
$P_{7}=\emptyset$. Let $A=\left[\begin{array}[]{lr}1&0\\\
1&0\end{array}\right],B=\left[\begin{array}[]{lr}0&0\\\
1&1\end{array}\right]$. Then $AE_{22}=AB=E_{11}B=E_{11}E_{22}=\boldsymbol{0}$,
hence $E_{11}\sim E_{22}\sim A\sim B\sim E_{11}$ is a 4-cycle in $G_{Id}(R)$.
Suppose that $\mathbb{F}\neq\mathbb{Z}_{2}$. Then $P_{7}$ is a non-empty set.
Let $A_{1}=\left[\begin{array}[]{lr}0&0\\\ c&1\end{array}\right]\in
P_{3},A_{2}=\left[\begin{array}[]{lr}a&-(1-a)c^{-1}\\\
-ac&1-a\end{array}\right]\in P_{7}$ and $A_{3}=\left[\begin{array}[]{lr}1&0\\\
a(1-a)^{-1}c&0\end{array}\right]\in P_{5}$. Then $A_{1}\sim A_{2}\sim
A_{3}\sim A_{1}$ is a 3-cycle in $G_{Id}(R)$ (since
$A_{1}A_{2}=A_{2}A_{3}=A_{3}A_{1}=\boldsymbol{0}$). Hence the result of girth
follows.

From Lemma 3.3, it follows that any two vertices in
$\displaystyle{\cup_{i=1}^{6}P_{i}}$ are either adjacent or have at least one
common neighbour from $\displaystyle{\cup_{i=1}^{6}P_{i}}$. Also, by Lemma
3.3, it is clear that a vertex in $\displaystyle{\cup_{i=1}^{6}P_{i}}$ is
adjacent to any vertex in $P_{7}$ by a path of length at most 2. Hence to
prove the result, it remains to show that any two non-adjacent vertices in
$P_{7}$ are connected by a path of length two. Let
$w_{i}=\left[\begin{array}[]{lr}a_{i}&b_{i}\\\
a_{i}(1-a_{i})b_{i}^{-1}&1-a_{i}\end{array}\right]$, for $i=1,2$, be two
elements in $P_{7}$ that are non-adjacent in $G_{Id}(R)$. We will show that
there exists $z=\left[\begin{array}[]{lr}a&b\\\
a(1-a)b^{-1}&1-a\end{array}\right]\in P_{7}$ such that $w_{1}z=\boldsymbol{0}$
and $zw_{2}=\boldsymbol{0}$. Let $zw_{2}=\boldsymbol{0}$. By Lemma 3.5, we get
$b_{2}=-(1-a_{2})a^{-1}b$, which yields $b=-a(1-a_{2})^{-1}b_{2}$. Whereas
$w_{1}z=\boldsymbol{0}$ gives (by Lemma 3.5 again) $b=-(1-a)a_{1}^{-1}b_{1}$.
Hence we get $-(1-a)a_{1}^{-1}b_{1}=-a(1-a_{2})^{-1}b_{2}$, which gives
$a(1-a)^{-1}=(1-a_{2})a_{1}^{-1}b_{1}b_{2}^{-1}$.
Thus choose $a,b$ and $z$ such that
$a(1-a)^{-1}=(1-a_{2})a_{1}^{-1}b_{1}b_{2}^{-1}$, $b=-a(1-a_{2})^{-1}b_{2}$
and $z=\left[\begin{array}[]{lr}a&b\\\ a(1-a)b^{-1}&1-a\end{array}\right]$.
Then $z\in P_{7}$ and $w_{1}\sim z\sim w_{2}$ is a path in $G_{Id}(R)$(since
$w_{1}z=zw_{2}=\boldsymbol{0}$). Hence $d(w_{1},w_{2})=2$. This completes the
proof. ∎

##  4\. Wiener and Harary Index

The Wiener index of the graph $G$, denoted by $W(G)$, is defined to be the sum
of all distanced between any two vertices of $G$. Let $d_{G}(v)$ denote the
sum of distances of the vertex $v$ from all the vertices of $G$, then the
Wiener index can be redefined as $W(G)=\frac{1}{2}\sum_{v\in V(G)}d_{G}(v)$.
The Wiener index of a graph $G$ was first introduced by Wiener [10] in 1947.
The Wiener index $W(G)$ is an oldest topological index. The Harary index
$H(G)$ of a graph $G$, has been introduced independently by Plavšić et al. [9]
and by Ivanciuc et al. [6] in 1993. The Harary index of a graph $G$ is defined
as: $\displaystyle{H(G)=\sum_{u,v\in V}\frac{1}{d(u,v)}}$, where the summation
runs over all unordered pairs of vertices of graph $G$(see [11]). Let
$d^{\prime}_{G}(v)$ denote the sum of reciprocal of distances of the vertex
$v$ from all the vertices of $G$, then the Harary index can be redefined as
$\displaystyle{H(G)=\sum_{v\in V(G)}d^{\prime}_{G}(v)}$.

In this section we determine the Wiener index and Harary index of $G_{Id}(R)$.

######  Proposition 4.1.

Let $G$ be regular graph of degree $r$ and $diam(G)=2$. Then the number of
vertices at a distance $2$ from a vertex $v$ are $|V(G)|-r-1$.

###### Proof.

Let $N(v)=\\{u\in V(G)~{}|~{}\textnormal{ if }uv\in E(G)\\}$. Since $G$ is
regular graph of degree $r$ and $diam(G)=2$, a vertex $u$ is at a distance 2
from the vertex $v$ if and only if $u\in
V(G)\backslash\Big{(}N(v)\cup\\{v\\}\Big{)}$. Since $\deg(v)=|N(v)|$, the
result follows. ∎

The following result gives the sum of the distances and the sum of the
reciprocal of distances of each vertex from other vertices in $G_{Id}(R)$.

######  Corollary 4.2.

Let $R=M_{2}(\mathbb{F})$, where $\mathbb{F}$ is a finite field. Then for each
nontrivial idempotent in $R$, $d_{G_{Id}(R)}(A)=2n^{2}-1$ and
$d^{\prime}_{G_{Id}(R)}(A)=\frac{1}{2}(n^{2}+3n-2)$.

###### Proof.

By Theorem 2.1 and Theorem 3.8, $G_{Id}(R)$ is a connected, regular graph of
degree $2n-1$ on $n^{2}+n$ vertices and $diam(G_{Id}(R))=2$. Hence for each
nontrivial idempotent $A\in R$, the number of vertices at a distance 2 from
$A$ are $n^{2}+n-(2n-1)-1=n^{2}-n$. Therefore $d_{G_{Id}(R)}(A)=\deg(A)+$2(the
number of vertices at a distance 2 from $A$) $=2n-1+2(n^{2}-n)=2n^{2}-1$. On
the other hand, $d^{\prime}_{G_{Id}(R)}(A)=\deg(A)+\frac{1}{2}$(the number of
vertices at a distance 2 from $A$)
$=2n-1+\frac{1}{2}(n^{2}-n)=\frac{1}{2}(n^{2}+3n-2)$. ∎

We conclude by giving the Wiener index and Harary index of $G_{Id}(R)$.

######  Theorem 4.3.

Let $R=M_{2}(\mathbb{F})$, where $\mathbb{F}$ is a finite field. Then
$W(G_{Id}(R))=\frac{1}{2}(n^{2}+n)(2n^{2}-1)$ and
$H(G_{Id}(R))=\frac{1}{2}(n^{2}+n)(n^{2}+3n-2)$.

###### Proof.

The Wiener index of $G_{Id}(R)$ is given by
$\displaystyle{\begin{array}[]{ll}W(G_{Id}(R))&=\frac{1}{2}\left(\sum\limits_{A\in
V(G_{Id}(R))}d_{G_{Id}(R)}(A)\right)\\\
&=\frac{1}{2}\left(|V(G_{Id}(R))|\times d_{G_{Id}(R)}(A)\right)\hskip
56.9055pt\cdots\textnormal{ by Corollary }\ref{c2}\\\
&=\frac{1}{2}(n^{2}+n)(2n^{2}-1).\end{array}}$

The Harary index of $G_{Id}(R)$ is given by
$\displaystyle{\begin{array}[]{ll}H(G_{Id}(R))&=\sum\limits_{A\in
V(G_{Id}(R))}d^{\prime}_{G_{Id}(R)}(A)\\\ &=|V(G_{Id}(R))|\times
d^{\prime}_{G_{Id}(R)}(A)\hskip 79.6678pt\cdots\textnormal{ by Corollary
}\ref{c2}\\\ &=\frac{1}{2}(n^{2}+n)(n^{2}+3n-2).\end{array}}$

∎

## References

  * [1] Anderson D. D. and Naseer M., Beck’s coloring of a commutative ring, J. Algebra 159 (1993) 500-514.
  * [2] S. Akbari, M.Habibi, A. Majidinya, and R. Manaviyat, On the idempotent graph of a ring, J. Algebra Appl. 12 (6), 1350003 (14 pages)(2013).
  * [3] D. F. Anderson and P. S. Livingston, The zero-divisor graph of a commutative ring, J. Algebra 217 (1999) 434-447.
  * [4] I. Beck, Coloring of commutative rings, J. Algebra 116 (1988) 208-226.
  * [5] K. Cvetko-Vah and D. Dolzan, Indecomposability graphs of rings, Bull. Aust. Math. Soc. 77, 151-159 (2008).
  * [6] O. Ivanciuc, T.S. Balaban and A.T. Balaban, Reciprocal distance matrix, related local vertex invariants and topological indices, J. Math. Chem. 12 (1993) 309–318.
  * [7] K.Masalkar, A. Khairnar, A. Lande, L. Kadam, On spectrum of the zero-divisor graph of matrix ring, https://doi.org/10.48550/arXiv.2312.09934.
  * [8] A. Patil and P. Momale, Idempotent graphs, weak perfectness, and zero-divisor graphs, Soft computing 25(15) (2021) 10083-10088.
  * [9] D. Plavšić, S. Nikolić, N. Trinajstić and Z. Mihalić, On the Harary index for the characterization of chemical graphs, J. Math. Chem. 12 (1993) 235–250.
  * [10] H. Wiener, Structural determination of paraffin boiling point, J. Amer. Chem. Soc. 69 (1947) 17–20.
  * [11] K. Xu and K.Ch. Das, On Harary index of graphs, Discrete Appl. Math. 159 (2011) 1631–1640.