How to Convert Complex Numbers to Polar Form in Excel

Introduction to the Polar Form of Complex Numbers

Complex numbers are commonly written in x+iy format, where i stands for √(-1), x is the real number part and y is the imaginary coefficient.

In mathematics, we can plot complex numbers in both the Cartesian (x,y) and Polar (r,θ) coordinate systems. In this article, we will focus just on the Polar form of complex numbers.

For example, let’s assume a complex number,

z=3+4i

If this number is plotted in a Cartesian coordinate system, it will display as follows:

complex number in cartesian system

If a line is added from (0,0) to (3,4), it will be the hypotenuse of a right-angle triangle whose base and vertical are x and y respectively.

So hypotenuse r= √(x2+y2), according to the Pythagorean theorem.

If the hypotenuse makes an angle θ, then θ= tan-1(y/x) or arctan(y/x).

Now, z=x+iy.

So for the complex number, z=3+4i, x=3, and y=4.

If we substitute x and y in terms of r, x will be rcosθ and y will be rsinθ.

So z=rcosθ+yisinθ

⇒ z=r(cosθ+isinθ)

r=√(x2+y2)=√(25)=5

And θ= arctan(y/x)=arctan(4/3)=53°.

So the Polar form of the number is:

5(cos53°+isin53°)


How to Convert Complex Numbers to Polar Form in Excel

Here we will convert complex numbers to Polar form by means of the COMPLEX, IMABS, and IAMARGUMENT functions, using the following dataset containing some x and y values.

sample data

We will convert them into complex numbers in Rectangular form first, then into Polar form.


Step 1 – Generate Complex Numbers Using the COMPLEX Function

  • Use the following formula to convert input numbers into some complex numbers.
=COMPLEX(B5,C5,"i")

Generating Complex Numbers Using the COMPLEX Function

The syntax of the COMPLEX function is: =COMPLEX(real_num,i_num,[suffix]).

The value in cell B5 is the real number part, the value in cell C5 is the imaginary coefficient part, and the last argument is optional (enclosed by []). You can fix either i or j as the imaginary number indicator.

  • Drag the Fill Handle icon to obtain the outputs for the rest of the column.

Step 2 – Convert Complex Numbers to Polar Form

  • Use the following formula to convert the complex numbers generated in the Step 1 to Polar form:
=ROUNDDOWN(IMABS(D5),2)&"(cos "&ROUNDDOWN(DEGREES(IMARGUMENT(D5)),2)&CHAR(176)&" +isin "&ROUNDDOWN(DEGREES(IMARGUMENT(D5)),2)&CHAR(176)&")"

Converting Complex Numbers to Polar Form

  • Drag the Fill Handle icon to auto-fill the other outputs.

Formula Explanation:

The first output is: 9.05(cos 83.65° + isin 83.65°).

This formula is made using the IMABS & IMARGUMENT functions. The rest of the functions used here (ROUNDDOWN, DEGREES, and CHAR) are used to make the output look better.

  • The IMABS function returns the modulus (r) of a complex number. So IMABS(D5) will return the modulus of the complex number in cell D5. The ROUNDDOWN function formats the output to two-decimal places.
  • The IMARGUMENT function returns the argument or θ angle of a complex number’s Polar form. Since Excel uses radian unit for angles by default and there is no way to change this default setting, we use the DEGREES function to make them look better. To display the degree symbol (°), we add CHAR(176) inside the larger formula.
  • Alternatively, the following formula can be used to avoid the extra functions used here:
=IMABS(D5)&"(cos "&IMARGUMENT(D5)&" + isin "&IMARGUMENT(D5)&")"

The output will be: 9.05538513813742(cos 1.460139105621 + isin 1.460139105621).


How to Convert Complex Numbers from Polar to Rectangular Form in Excel

Let’s deal with a reverse case, ie we have some complex numbers in Polar form (angles in radian unit) and want them in Rectangular form.

Steps:

  • Extract the magnitude or modulus from the Polar form using the following formula:
=VALUE(LEFT(B5,5))

  • Extract the argument θ using the following formula:
=VALUE(MID(B5,FIND("cos",B5)+3,8))

  • Use the following formula to return the Rectangular complex number formats:
=IMEXP(COMPLEX(LN(C5),D5,"i"))


Download Practice Workbook


<< Go Back to | Complex Number in ExcelExcel for Math | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Masum Mahdy
Masum Mahdy

Abu Talha Masum Mahdy (Assistant Project Manager, ExcelDemy) has been working with the ExcelDemy family for over 2 years. He wrote 30+ articles and reviewed more than 1300 others for ExcelDemy. Currently, he is responsible for reviewing articles from 2 writing teams of ExcelDemy. He ensures correctness and fluency in his team write-ups. Mahdy holds a BSc in Naval Architecture and Marine Engineering from BUET. His interests are Project Management, Content Writing, SEO, Digital Marketing, Data Analytics and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo