Wireless sensor networks is collection of small nodes with computation, sensing, and wireless communications capabilities. The modern networks are bi-directional, also enabling control of sensor activity. Energy awareness is an essential design issue in WSN. Routing protocols in WSNs might differ depending on the application and network architecture. In Grid network, each node is connected with neighboring nodes along one or more dimensions. Grid network, known as a toroidal network when an n-dimensional grid network is connected circularly in more than one dimension. In Proposed system , we are improving the performance of grid network using energy optimal routing with square matrix in WSN. In our work, we will use vertical and horizontal approach. In this approach ,first move one step horizontally and the one step vertically