The sum of the square of distance between all pairs of vertices in G is denoted by S(G). In this paper, we give the relation between S(G) and S(L(G))when G is a path, cycle or a graph with minimum degree at least two, by using the structure property between graph G and line graph L(G).