\begin{tikzpicture}
\coordinate (1) at (0,0);
\coordinate (2) at (2,0);
\coordinate (3) at (2,2);
\coordinate (4) at (0,2);
\coordinate (5) at (0,0);
\coordinate (6) at ($(1)!.5!(2)$);
\coordinate (7) at ($(2)!.5!(3)$);
\coordinate (8) at ($(3)!.5!(4)$);
\coordinate (9) at ($(4)!.5!(1)$);
\foreach \i in {1,2}
\fill (\i) circle (1pt) node [below] {\tiny \i};
\foreach \i in {3,4}
\fill (\i) circle (1pt) node [above] {\tiny \i};
\foreach \i in {6}
\fill (\i) circle (1pt) node [below] {\tiny 5};
\foreach \i in {7}
\fill (\i) circle (1pt) node [right] {\tiny 6};
\foreach \i in {8}
\fill (\i) circle (1pt) node [above] {\tiny 7};
\foreach \i in {9}
\fill (\i) circle (1pt) node [left] {\tiny 8};
\draw (1)--(2)--(3)--(4)--(5);
\end{tikzpicture}
The above code for right side square I want to make the mid point which is giving in left square point(9)?



\coordinate (9) at ($(4)!.5!(1)$);. Do you understand what that does? (I suspect you wanted\coordinate (9) at ($(1)!.5!(3)$);.) Also, have you noticed that you've placed the5coordinate in the origin? And thecoordinates6,7,8,9 is located where the numbers 5,6,7,8, respectively, are placed. – Torbjørn T. May 08 '14 at 05:15