Hassan Raza Khan^{1}
(^{1}) Hassan Raza Khan is a highschool student at The City School DHA Campus, Lahore.
AlKhwarizmi (780850), in his work Algebra, provided solutions to various types of quadratic equations, with geometricbased proofs. Under the caliph alMa’mun, alKhwarizmi became a member of the House of Wisdom, an academy of scientists in Baghdad. This algebraic knowledge reached Italy through translations by Gerard of Cremona (11141187) and the work of Leonardo da Pisa (Fibonacci) (11701250).
Scipione del Ferro (d. 1526) solved the general cubic equation . His formula, passed to Antonio Maria Fiore, initiated a mathematical contest against Tartaglia, who rediscovered the formula and won. Gerolamo Cardano, learning of this, signed an oath of secrecy and later published the formula in his Ars Magna (1545).
Rafael Bombelli (15261572) tackled cubic equations in l’Algebra (1572). He fully discussed the casus irreducibilis, demonstrating the expression and Cardan's formula.
René Descartes (15961650), a philosopher, applied algebra to geometry in his work "La Géométrie," laying the foundations for Cartesian geometry (Descartes, 1637). Pressed by friends, he wrote the treatise "Discours de la méthode pour bien conduire sa raison et chercher la vérité dans les sciences" (1637), where he associated imaginary numbers with geometric impossibility. Descartes coined the term "imaginary," emphasizing the lack of a corresponding quantity for imagined roots (Descartes, 1637).
John Wallis (16161703) noted in his "Algebra" that negative numbers, long viewed skeptically, have a physical explanation based on a line with a zero mark. He also made progress in giving a geometric interpretation to (Wallis, 1693).
Abraham de Moivre (16671754), seeking religious refuge in London, befriended Newton. In 1698, he mentioned Newton's knowledge of an equivalent expression to what is now known as de Moivre's theorem (Moivre, 1707).
Leonhard Euler (17071783) introduced the notation . He visualized complex numbers as points with rectangular coordinates and explored the roots of as vertices of a regular polygon. Euler defined the complex exponential and proved the identity (Euler, 1748).
These historical works, spanning from AlKhwarizmi to Gauss, reflect a collective focus on unraveling the complex number . Despite this rich history, a contemporary challenge persists—finding a quick and efficient method for computing the values of basic complex number exponents. Mathematics can always be simpler.
Say you want to find the value of i) ; ii) ; iii) ; iv) ;
and there are like 20 seconds left in the exam, and this paper does not allow calculators. You start solving it something like this:

and before you know it, the 20 seconds are over. You couldn't even answer any of the questions.
The student next to you, the class topper, recognizes that we can find the value of such a large number of using polar coordinates, by using Euler's formula (Euler, 1748). He starts writing:



He now starts using De Moivre's Theorem (Moivre, 1707)

By now, not only does he realize he needs a calculator to use sin and cos, but the proctor also marches down the aisle and snatches his paper. He could not even solve one of the 4 parts. None of the students was able to solve any part within less than 20 seconds. It was a shame considering how all 4 parts of this question could well be solved within less than 20 seconds using The Algorithm, and no working required.
The algorithm involves three steps:
To demonstrate that only the last two digits are necessary for determining the value of , where is a large exponent, we can take advantage the periodicity of powers of .
Consider the powers of when raised to successive positive integer exponents:

We can see that the powers of repeat in cycles of four: . This periodicity implies that the value of depends only on the remainder when is divided by 4.
Now, let's consider the exponent . We want to find :

Consider . We can express this as , where is an integer and is the remainder when is divided by . In this case, .
Now, let's break down further:

Since has two zeros and is divisible by 100, and since 100 is divisible by 4, we can deduce that is divisible by 4.
Therefore,
Now, simplifies to since any power of with an exponent divisible by 4 is equal to 1. Therefore, we have:

So, basically, is congruent to . This demonstrates a general pattern: for any large exponent , is congruent to , where is the remainder when is divided by 4. Thus, only the last two digits of the exponent ( in this case) are necessary for determining the value of .
This observation allows for a more efficient approach when dealing with large exponentiation of without the need to calculate the entire exponent. The periodic nature of simplifies the computation, making it feasible to focus solely on the last two digits of the exponent.
The threestep algorithm can be used like so:
In Table 1, we present a matrix which shows the relationship between the final and initial numbers corresponding to different values of the complex unit . The table categorizes the initial and final numbers as either even or odd and the resulting values of for each combination. This matrix is basically a summary of this entire concept of periodicity of and its cyclic behavior based on the evenness or oddness of the exponents. Initial Number is the raw form of the last two digits of the exponent of , while Final Number is the value of the last two digits of the exponent of after being processed by the Algorithm ( if is even, and if is Odd)
Initial Number  
Even  Odd  
Final Number  Even  1  
Odd  1 
The divisional remainder and its congruent complex number counterpart can be expressed as below:

The odd/even analysis serves is an approach that efficiently determine the divisional remainder of the numbers in the context of complex exponentiation. By focusing solely on the last two digits of the exponent, we can evaluate whether the number is divisible by 4.
For instance, consider an exponent with the last two digits being 32. If we divide 32 by 2, we obtain 16, an even number. This indicates that the original exponent is divisible by 2 twice, meaning it is divisible by 4. Therefore, the number is congruent to 0 modulo 4.
On the contrary, let's take another example with the last two digits being 34. If we divide 34 by 2, we get 17, an odd number. In this case, 34 can only be divided by 2 once while remaining a whole number. Consequently, it is congruent to 2 modulo 4.
The same approach is applied to odd numbers, where they are subtracted by 1 in order to align them with their even counterparts. This adjustment ensures that odd numbers maintain their distinctive properties in the modulo 4 arithmetic.
One could also add 1 instead of subtracting 1 from the odd number. However, by adopting the subtraction approach, the signs no longer become universally positive for even final numbers and negative for odd final numbers. That is why subtracting helps with the association of odd numbers with negative results and even numbers with positive results, making it a more straightforward interpretation of the outcomes.
I want to express my sincere appreciation for the the support and encouragement I received from my friends, family, and teachers throughout the entire research process.
I extend my gratitude to the dedicated reviewers and editors at the Journal of Dawning Research for their insightful feedback, which played a crucial role in refining and improving my paper.
Lastly, I would like to express gratitude to Dr Javed Hussain from IBA Sukkur University for his expert guidance. As a high school student new to research papers, his assistance was invaluable. He not only helped me with the basics of research but also instilled in me the importance of intellectual curiosity and hard work.
Khan, H. R. (2023, October). Efficient Algorithm for Identifying Repeating Patterns Modulo 4 and its Application in Complex Numbers. Source
Merino, O. (2006, January). A Short History of Complex Numbers. University of Rhode Island.
Euler, L. (1748). Introductio in analysin infinitorum. Apud MarcumMichaelem Bousquet & Socios.
De Moivre, A. (1730). Miscellanea Analytica de Seriebus et Quadraturis [Analytical Miscellany on Series and Integration].
Zhou, X. (2017). Number Theory  Modular Arithmetic: Math for Gifted Students. CreateSpace Independent Publishing Platform.
Halmos, P. (1980). The Heart of Mathematics. American Mathematical Monthly, 87, 519–524.
Nahin, P. (1998). An Imaginary Tale: The Story of New Jersey: Princeton University Press.
Mazur, Barry & Pesic, Peter & Sabbagh, Karl. (2004). "Imagining Numbers" (Particularly the Square Root of Minus Fifteen). The American Mathematical Monthly. 111. 75. 10.2307/4145034.
Needham, T. (1997). Visual Complex Analysis. New York: Oxford University Press.
Dunham, W. (1999). Euler, The Master of Us All, The Dolciani Mathematical Expositions, Number 22, Mathematical Association of America.
Argand, R. (Reprinted 1971). Essai sur une Maniere de Representer Les Quantites Imaginaires dans Les Constructions Geometriques. A. Blanchard.
Descartes, R. (1952). La Geometrie, translated from French and Latin by D. E. Smith and M. Latham. Open Court Publishing Company, La Salle, Illinois.
Crowe, M. (1967). A History of Vector Analysis. U. of Notre Dame Press, Notre Dame.
van der Waerden, B. L. (1985). A History of Algebra. Springer Verlag, NY.
Wallis, J. (1685). Treatise on Algebra.
Andreescu, T., & Andrica, D. (2007). Complex Numbers: An Introduction. Birkhäuser.
Andreescu, T., & Andrica, D. (2009). Complex Numbers from A to ...Z. Birkhäuser.
Richeson, D. S. (2008). Euler's Gem: The Polyhedron Formula and the Birth of Topology. Princeton University Press.
Boyer, C. B. (1968). A History of Mathematics. John Wiley & Sons.
Carr, V. (1996). Complex Numbers Made Simple. Elsevier Science. (Original work published 1996)
Published on 19/12/23
Submitted on 15/11/23
Volume 5, 2023
Licence: CC BYNCSA license