We can derive Machin's formula by inspecting the complex number relation (1).
Essentially, what we are doing is relating each quantity of Machin's formula to the argument of a complex number.
First, we recall that the sum of arguments of complex numbers is the argument of their product, and the argument of a complex number raised to a power is simply that number times the argument. That is, the relations , and hold for all .
Taking the argument of both sides of (1), we get Since , RHS .
So we have the following relation: as required.
It is also possible to derive other Machin-like formulas via the same method using complex numbers. You can try deriving the following formulas as an exercise:
Euler's Hermann's Hutton's