If $(a, 0)$ and $(0, b)$ are two diagonal vertices of a square, then find the other two vertices. I want to solve it with complex numbers. Here's my take:
Diagonal vertex $1$ $= a$
Diagonal vertex $2  $= bi$
Diagonal $= a-bi$
I multiply it by $${e^\frac{i{\pi}}{4}}$$ to rotate diagonal $45^\circ$ and then scale it down to obtain side. (i.e. divide by $\sqrt 2$)
$$\frac{(a-bi)(1+i)}{\sqrt 2 \cdot \sqrt 2} = \frac{a+b}{2} + \frac{i(a-b)}{2}$$
Similarly, the other side by multiplying $${e^\frac{-i{\pi}}{4}}$$
Therefore one of my vertex is $$\left(\frac{a+b}{2}, \frac{a-b}{2}\right)$$
But the answer is given as $$\left(\frac{a+b}{2}, \frac{a+b}{2}\right)$$ and $$\left(\frac{a-b}{2}, \frac{b-a}{2}\right)$$ Where am I doing wrong?
 A: Take $x = a+0(i) $ and $y=0+bi $. Let $X$ and $Y$ be the vertices represented by $x$ and $y$ respectively. Then $y-x$ represents the vector $\overrightarrow{XY}$. On $\mathbb{C}^2$, multiplying a complex number by $i$ means rotation by 90 degrees anticlockwise. Thus $\vec{v}$ obtained by rotating $\overrightarrow{XY}$ ninety degrees to the left is given by $i(y-x)$.
If $x$ and $y$ are opposite vertices on the diagonal, then $\frac{y+x}{2}$ is the center of the square, $\overrightarrow{XY}$ is the diagonal and $\vec{v}$ is the other diagonal. The other two vertices are obtained by traveling from the center half the diagonal along $\vec{v}$ in both directions. Hence they are given by $$\boxed {\frac{y+x}{2}\pm i\frac{y-x}{2}}$$ Hope it helps. 
A: I get it. As @AnuragA commented, I'm getting a vector when I multiply it by ${e^\frac{-i{\pi}}{4}}$ which is pointed from 'bi' to the actual vertex. So if the actual vertex is x, then what I'm getting is x - bi. So I just need to add bi in both the vertices I get and it gets me to correct answer.
