Find 3rd and 4th co-ordinates for a square given co-ordinates of two points? To construct a square we need 4 points . In my problem 2 points are given we can find 3rd and 4th point . 
e.g. A (1,2) B(3,5) what should be the co-ordinate of 3rd (C) and 4th (D) points . Please provide a formula to calculate third point and fourth point .
As i know there will be two pairs of C and D both will be in opposite direction as 
If C and D is above the given line (AB) then other pair C' and D' is below the given line(AB) .  AB is not diagonal for given square  .

For the sake of completeness, here is a solution if we were not given the edge $AB$, but the diagonal $AC$ with $A=(1,2), C=(3,5)$.
The centroid of the square and intersection of the diagonals is 
$$M = \frac{1}{2}(A+C) = \frac{1}{2} (1+3,2+5)=(2,3.5)$$
The vector of $M$ to $C$ is 
$$mc = C-M = (3,5)-(2,3.5)=(1,1.5)$$
The two perpendiculars of $mc$ with equal length are $v_1=(1.5,-1)$ and $v_2=(-1.5,1)$.
We can use $M$, $v_1$ and $v_2$ to describe the second diagonal. Therefore:
$$B=M+v_1 = (2,3.5)+(1.5,-1)=(3.5,2.5)$$
$$D=M+v_2 = (2,3.5)+(-1.5,1)=(0.5,4.5)$$
