The idempotent graph of a ring R, denoted by I(R), is a graph whose vertices are all non-trivial idempotents of R and two distinct vertices x and y are adjacent if andonly if xy = yx = 0. We give some necessary condition for connectedness of M2(R).Also for any even number n, we give an example of a ring R in which I(Mn(R)) is disconnected. Also we determine the vertices of distance two in direct summand graph which is module analogue of idempotent graph