*If you are in Hong Kong and you need help for university mathematics courses, please visit www.all-r-math.com.*

It is a well-known story among mathematics lovers, but relative unknown to outsiders:

"A guy gets a map of a treasure island. On the map, it writes: There are an oak, a pine and a gallows. Walk from the gallows to the oak, counting the steps, turn 90 degrees right and walk the counted number of steps, then mark the position. Walk from the gallows to the pine, counting the steps, turn 90 degrees left and walk the counted number of steps, then again mark the position. The midpoint of the two marks is where the treasure buried.

The guy arrives at the island, he find the oak and the pine, but the gallows is already gone without a trace..."

Simply google "treasure and complex number" and you will find many websites on this question. The pure geometric solution is not hard but a bit complicated. The simplest solution involves using the complex numbers.

A complex number is an entity of the form $a+bi$, where $a$ and $b$ are the usual real numbers and $i=\sqrt{-1}$ is a square root of $-1$. Indeed, each complex number $a+bi$ can be identified with the point $(a,b)$ on the plane.

If $Z=a+bi$ is a complex number, then $Zi=-b+ai$ is the complex number obtained by rotating $Z$ with 90 degrees left about the origin, whereas $Z(-i)=b-ai$ is the complex number obtained by rotating $Z$ with 90 degrees right about the origin.

If $Y=c+di$ is another complex number, then $W=Z+Y=(a+c)+(b+d)i$ is the complex number obtained by moving $ZO$ to $WY$.

Now, we take the midpoint between the oak and the pine as the origin, and take the oak and the pine as the $1$ and $-1$ respectively on the complex plane. Now, we let $G$ to be the gallows. The first mark is therefore $-i(G-1)+1$ and the second mark is $i(G+1)-1$ (Check them yourself!), and so the treasure is at $((-i(G-1)+1)+i(G+1)-1))/2=i$, independent of the position of the gallows.
The solution!