Roots of Complex Numbers – Examples and Explanation

Roots of Complex Numbers – Examples and Explanation Техника

Roots of Complex NumbersComplex numbers, as with real numbers, have roots too. We’ve learned how to solve equations in the past, but we’ve disregarded the complex roots. This time, we’ll focus our attention on finding all the roots – both real and complex.

We can find the roots of complex numbers easily by taking the root of the modulus and dividing the complex numbers’ argument by the given root.

This means that we can easily find the roots of different complex numbers and equations with complex roots when the complex numbers are in polar form.

  1. Converting complex numbers in the rectangular form to polar form, and the other way around.
  2. Understanding how De Moivre’s theorem works and applies to finding a complex number’s roots.

Check out the links we’ve provided as well in case we need to take a refresher. For now, why don’t we go ahead and dive right into the fundamentals of complex numbers and their roots?

What is the roots of complex numbers?

You’ll learn how to find these complex roots in the next sections, so why don’t we go ahead and jump right in?

How to find roots of complex numbers?

Don’t worry. We’ll break down the important steps in the next section to make sure we know how to find the roots of complex numbers algebraically and geometrically.

Finding roots of complex numbers

As we have mentioned, we can either find the roots using the formula derived from De Moivre’s theorem, or we can find the roots by graphing them on a complex plane.

Finding the roots of complex numbers geometrically.

Here are some helpful steps to remember when finding the roots of complex numbers.

  1. If the complex number is still in rectangular form, make sure to convert it to polar form.
  2. Find the $n$th root of $r$ or raise $r$ to the power of $\dfrac{1}{n}$.
  3. If we need to find the $n$th root, we’ll use $k = \{0, 1, 2… n-1\}$ in the formula we’ve provided above.
  4. Start by finding the argument of the first root by dividing $\theta$ by $n$.
  5. Repeat the same process, but this time, work with $\theta + 2\pi k$ or $\theta + 360^{\circ}k$ until we have $n$ roots.

Finding the roots of complex numbers geometrically.

It’s also possible to find the roots of complex numbers by graphing these roots on a complex plane.

  1. If the complex number is still in rectangular form, make sure to convert it to polar form.
  2. Divide $2\pi$ or $360^{\circ}$ by $n$.
  3. Draw the first root on the complex plane by joining the origin with a segment $r$ units long.
  4. Plot the first complex root by using the complex root formula, where $k = 0$.
  5. Draw the next root by making sure that it is $\dfrac{2\pi}{n}$ or $\dfrac{360^{\circ} }{n}$ apart from the next roots.

Are you ready to apply what you’ve just learned? Don’t worry; we’ve prepared some problems to try on and check your knowledge on complex number roots.

Since $8$ is still in its rectangular form, $8 = 8 + 0i$, we’ll have to convert it first to polar form by finding its polar form’ modulus and argument as shown below.

The root is still in polar form, so if we want the root in rectangular form, we can simply evaluate the result to convert it to rectangular form.

This means that the first root of $8$ is $2$. We can apply the same process for the two remaining roots, but this, we use $k = 1$ and $k = 2$.

graphing the first root

graphing the four roots on a complex plane

  • $2(\cos 30^{\circ} + i \sin 30^{\circ})$
  • $2(\cos 120^{\circ} + i \sin 120^{\circ})$
  • $2(\cos 210^{\circ} + i \sin 210^{\circ})$
  • $2(\cos 300^{\circ} + i \sin 300^{\circ})$

We can even convert the roots to rectangular form as shown by evaluating the cosine and sine values then distributing $2$ each time.

Hence, we’ve just shown that we can find the remaining roots geometrically and even convert the result in rectangular form.

https://youtube.com/watch?v=gD2x6RmwHxI%3Frel%3D0%3Bcontrols%3D0%3Bshowinfo%3D0%3Btheme%3Dlight

Square RootsIn mathematics, a square root of a number x is such that, a number y is the square of x, simplify written as y2 = x.

, 5 and – 5 are both square roots of 25 because:

5 x 5 = 25 and -5 x -5 =25.

The square root of a number x is denoted with a radical sign √x or x 1/2. For instance, the square root of 16 is presented as: √16 = 4. A number whose square root is calculated is referred to as radicand. In this expression, √16 = 4 number 16 is the radicand.

What is a Square Root?

Square root is an inverse operation of the squaring a number. In other words, square root is an operation that undoes an exponent of 2.

  • A perfect square number has a perfect square root.
  • An even perfect number has the square root that is even.
  • Odd perfect number has the square root that is odd.
  • The square root of a negative number is undefined.
  • Only numbers ending with even number of zeros have square roots.

How do we find square root of numbers?

There are multiple ways to find the square of the numbers. We will see a few of the here.

This method involves, successful and repeated subtraction of odd numbers such as 1, 3, 5 and 7 from the number until zero is reached. The square of the number is equal to the number or frequency of subtraction performed on the number

Дополнительно:  Skill root

Suppose, we need to calculate the square of a perfect number like 25, the operation is done as:

You can notice that, the frequency of subtraction is 5, therefore the square root of 25 is 5.

In this method, a perfect square number is factorized by successive division. The prime factors are grouped into pairs, and the product of each number calculated. The product is therefore, the square root of the number. To find the square of a perfect number such as: 144 is performed as:

  • 144 = 2 × 2 × 2 × 2 × 3 × 3.
  • Pair the prime factors.
  • Selecting one number from each pair.
  • 2 × 2 × 3 = 12.
  • Thus, the √144 = 12.Square Root by Prime Factorization

  • A bar is placed over every pair of digits starting from the right-hand side.
  • Divide left end number by a number whose square is less or equivalent to the numbers under the left end.
  • Take this number as the divisor and quotient. Similarly, take the leftmost number as the dividend
  • Divide to get the result
  • Pull down the next number with a bar to the right-hand side of the remainder
  • Multiply the divisor by 2.
  • To the right of this new divisor, find a suitable dividend. This process is repeated until we get zero as the remainder. The square of the number therefore is equal to the quotient.

The square root of 225 is calculated as

  • Begin the division from the leftmost side.
  • In this case, 1 is our number whose square is below 2.
  • Assigning 1 as the divisor and quotient and multiplying it by 2, gives:
  • Proceed with the steps to get 15 as the quotient.

Square Root 1 to 100 (Complete List and Examples) — BYJU’S


See more



Preview site

List of square roots for first 1000 numbers — Math Tools


See more



Preview site

Square root — Wikipedia


See more



Preview site

Square Root Numbers — Square Root Numbers List

› Estimated Reading Time: 2 mins


See more



Preview site

Methods, List of Square root Numbers, Examples — BYJU’S

Methods, List of Square root Numbers, Examples - BYJU'S

1 week ago

› Estimated Reading Time: 3 mins


See more



Preview site

Values of Square Root 1 to 20 — List and Download PDF


See more



Preview site

Table of Squares and Square Roots — Infoplease


See more



Preview site

List, Chart and Table of squares and cubes of Numbers — BYJU’S


See more



Preview site

Square and Square Root (List from 1 to 50) — BYJU’S


See more



Preview site

Square Root Calculator | Mathway


See more



Preview site

Square Root 1 to 100 — Cuemath


See more



Preview site

Roots — BBC Bitesize


See more



Preview site

List of First 100 Square Numbers — MiniWebtool


See more



Preview site

Square-Square Root Table — MYMATHTABLES.COM

1 day ago
Web A square root of a number a is a number y such that y 2 = a, in other words, a number y whose square (the result of multiplying the number by itself, or y x y) is a. For example, Square of 3 , 3 2 = 9. Square root of 3, √3 = 1.732


See more



Preview site

Square 1 to 100 | Values of Squares from 1 to 100 [PDF Download]


See more



Preview site

Square Roots and Irrational Numbers — Algebra | Socratic


See more



Preview site

Square Roots List — Softschools.com

1 day ago
Web Square Roots List 1 to 100 Numbers. Toggle navigation. Pre-K; Kindergarten; 1st Grade; 2nd Grade; 3rd Grade; 4th Grade


See more



Preview site

The Sunday Read: ‘A Week With the Wild Children of the A.I. Boom’


See more



Preview site

I am looking for an efficient algorithm to find nth root of a number. The answer must be an integer. I have found that newtons method and bisection method are popular methods. Are there any efficient and simple methods for integer output?

asked Dec 22, 2013 at 13:40

user567879's user avatar

20 gold badges71 silver badges104 bronze badges

#include <math.h>
inline int root(int input, int n)
{
  return round(pow(input, 1./n));
}

This works for pretty much the whole integer range (as IEEE754 8-byte doubles can represent the whole 32-bit int range exactly, which are the representations and sizes that are used on pretty much every system). And I doubt any integer based algorithm is faster on non-ancient hardware. Including ARM. Embedded controllers (the microwave washing machine kind) might not have floating point hardware though. But that part of the question was underspecified.

answered Dec 22, 2013 at 13:44

rubenvb's user avatar

int root(int a, int n) {
    int v = 1, bit, tp, t;
    if (n == 0) return 0; //error: zeroth root is indeterminate!
    if (n == 1) return a;
    tp = iPow(v,n);
    while (tp < a) {    // first power of two such that v**n >= a
        v <<= 1;
        tp = iPow(v,n);
    }
    if (tp == a) return v;  // answer is a power of two
    v >>= 1;
    bit = v >> 1;
    tp = iPow(v, n);    // v is highest power of two such that v**n < a
    while (a > tp) {
        v += bit;       // add bit to value
        t = iPow(v, n);
        if (t > a) v -= bit;    // did we add too much?
        else tp = t;
        if ( (bit >>= 1) == 0) break;
    }
    return v;   // closest integer such that v**n <= a
}
// used by root function...
int iPow(int a, int e) {
    int r = 1;
    if (e == 0) return r;
    while (e != 0) {
        if ((e & 1) == 1) r *= a;
        e >>= 1;
        a *= a;
    }
    return r;
}

answered Sep 12, 2015 at 17:55

guest's user avatar

1 silver badge2 bronze badges

I question your use of «algorithm» when speaking of C programs. Programs and algorithms are not the same (an algorithm is mathematical; a C program is expected to be implementing some algorithm).

But on current processors (like in recent x86-64 laptops or desktops) the FPU is doing fairly well. I guess (but did not benchmark) that a fast way of computing the n-th root could be,

 inline unsigned root(unsigned x, unsigned n) {
   switch (n) {
     case 0: return 1;
     case 1: return x;
     case 2: return (unsigned)sqrt((double)x);
     case 3: return (unsigned)cbrt((double)x);
     default: return (unsigned) pow (x, 1.0/n);
   }
 }

I am not sure that n-th root of a negative number makes sense in general. So my root function takes some unsigned x and returns some unsigned number.  

answered Dec 22, 2013 at 13:50

Дополнительно:  Код 19 не работает клавиатура на ноутбуке Что делать

Basile Starynkevitch's user avatar

Here is an efficient general implementation in C, using a simplified version of the «shifting nth root algorithm» to compute the floor of the nth root of x:

uint64_t iroot(const uint64_t x, const unsigned n)
{
  if ((x == 0) || (n == 0)) return 0;
  if (n == 1) return x;

  uint64_t r = 1;
  for (int s = ((ilog2(x) / n) * n) - n; s >= 0; s -= n)
  {
    r <<= 1;
    r |= (ipow(r|1, n) <= (x >> s));
  }

  return r;
}

It needs this function to compute the nth power of x (using the method of exponentiation by squaring):

uint64_t ipow(uint64_t x, unsigned n)
{
  if (x <= 1) return x;

  uint64_t y = 1;
  for (; n != 0; n >>= 1, x *= x)
    if (n & 1)
      y *= x;
  return y;
}

and this function to compute the floor of base-2 logarithm of x:

int ilog2(uint64_t x)
{
  #if __has_builtin(__builtin_clzll)
    return 63 - ((x != 0) * (int)__builtin_clzll(x)) - ((x == 0) * 64);
  #else
    int y = -(x == 0);
    for (unsigned k = 64 / 2; k != 0; k /= 2)
      if ((x >> k) != 0)
        { x >>= k; y += k; }
    return y;
  #endif
}

Note: This assumes that your compiler understands GCC’s __has_builtin test and that your compiler’s uint64_t type is the same size as an unsigned long long.

answered Oct 26, 2018 at 2:58

Todd Lehman's user avatar

Todd Lehman

1 gold badge26 silver badges32 bronze badges

You can try this C function to get the nth_root of an unsigned integer :

unsigned initial_guess_nth_root(unsigned n, unsigned nth){
    unsigned res = 1;
    for(; n >>= 1; ++res);
    return nth ? 1 << (res + nth - 1) / nth : 0 ;
}

// return a number that, when multiplied by itself nth times, makes N.
unsigned nth_root(const unsigned n, const unsigned nth) {
    unsigned a = initial_guess_nth_root(n , nth), b, c, r = nth ? a + (n > 0) : n == 1 ;
    for (; a < r; b = a + (nth - 1) * r, a = b / nth)
        for (r = a, a = n, c = nth - 1; c && (a /= r); --c);
    return r;
}

Example of output :

  24 == (int) pow(15625, 1.0/3)

  25 == nth_root(15625, 3)
   0 == nth_root(0, 0)
   1 == nth_root(1, 0)
   4 == nth_root(4096, 6)
  13 == nth_root(18446744073709551614, 17) // 64-bit 20 digits
  11 == nth_root(340282366920938463463374607431768211454, 37) // 128-bit 39 digits

Here is the github source.

answered Apr 28, 2022 at 15:35

Michel's user avatar

2 silver badges3 bronze badges

As you are more interested in various different powers you could write a function which takes Nth number you want to print up to and the power you want to use. It will then return a tuple of the current value of n, the value of n to the power and then a text formula.

The function also yields the results so if you were looking for large values of N they wouldnt all be loaded into memory immediately.

In this example i have then loaded the pandas module just for easy printing of the output as a data frame.

EDIT
updated with an example for roots. the roots function can take an optional parameter for decimal precision since roots most often return decimal values. if no precision value is gien to the function the full precision will be shown

import pandas as pd

def get_nth_powers(nth, power):
    for n in range(nth):
        written_formula = (" x ".join([str(n)] * power))
        yield (n, n ** power, written_formula)


def get_nth_roots(nth, root, decimal_precision=0):
    decimal_precision = f'0.{decimal_precision}f' if decimal_precision else ''
    for n in range(nth):
        value = n ** (1/root)
        written_formula = (" x ".join([f'{value:{decimal_precision}}'] * root))
        yield (n, value, written_formula)


data = get_nth_powers(1000, 4)
df = pd.DataFrame(data, columns=('Nth', 'To Power', 'formula'))
print(df)

data = get_nth_roots(1000, 2, 3)
df = pd.DataFrame(data, columns=('Nth', 'value', 'formula'))
print(df)
     Nth      To Power                formula
0      0             0          0 x 0 x 0 x 0
1      1             1          1 x 1 x 1 x 1
2      2            16          2 x 2 x 2 x 2
3      3            81          3 x 3 x 3 x 3
4      4           256          4 x 4 x 4 x 4
..   ...           ...                    ...
995  995  980149500625  995 x 995 x 995 x 995
996  996  984095744256  996 x 996 x 996 x 996
997  997  988053892081  997 x 997 x 997 x 997
998  998  992023968016  998 x 998 x 998 x 998
999  999  996005996001  999 x 999 x 999 x 999

[1000 rows x 3 columns]
     Nth      value          formula
0      0   0.000000    0.000 x 0.000
1      1   1.000000    1.000 x 1.000
2      2   1.414214    1.414 x 1.414
3      3   1.732051    1.732 x 1.732
4      4   2.000000    2.000 x 2.000
..   ...        ...              ...
995  995  31.543621  31.544 x 31.544
996  996  31.559468  31.559 x 31.559
997  997  31.575307  31.575 x 31.575
998  998  31.591138  31.591 x 31.591
999  999  31.606961  31.607 x 31.607

[1000 rows x 3 columns]

I’m stuck on a Python 101 type problem involving loops. Here are the directions:

The square numbers are the integers of the form K × K, e.g. 9 is a square number since 3 × 3 = 9. Write a program that reads an integer n from input and outputs all the positive square numbers less than n, one per line in increasing order. For example, if the input is 16, then the correct output would be

1
4
9

This is what I have so far but it sort of works but runs on forever. My code never reaches the if statement so it breaks(stops) before it gets to 17.

Suppose n = 17.

n=int(input())
counter = 1
while counter * counter < n:
   for counter in range(1,n):
      a = counter*counter
      print(a)
   if a < n:
      break
1
4
9
16
25
36
49
64
81

asked Sep 1, 2013 at 2:25

StacyM's user avatar

Here is a correction of your code.

n=int(input())
counter = 1
for counter in range(1,n):
    a = counter*counter
    if a >= n:
        break
    print(a)

There were three things wrong with your code. First, the condition you want to break on is a >= n not a < n. Second, that condition needs to be tested before you print the number. Thus the if statement needs to be inside the for loop and before your print, statement. Third, the outer while loop is not really necessary 🙂 Though you can add it, but a simple inner for loop will suffice.

answered Sep 1, 2013 at 2:42

Shashank's user avatar

5 gold badges36 silver badges62 bronze badges

if a < n: will never succeed unless n = 2; because inside the loop a is becoming (n-1)*(n-1) which is greater than n for n > 2; that’s why the infinite loop. Try this:

>>> counter = 1
>>> n = 16 # int(input())
>>> r = counter**2
>>> while r<n:
    print r
    counter += 1
    r = counter**2


1
4
9

Or just modify yours one by removing the outer loop, and placing the conditional inside the for loop like:

for counter in range(1,n):
      a = counter*counter
      if a >= n:break
      print(a)

answered Sep 1, 2013 at 2:29

mshsayem's user avatar

11 gold badges60 silver badges69 bronze badges

Your code loops might be the case in you semantics error try this out light on the memory and simple

for i in range(0,n):
    w=i*i
    if w>n-1:
        break

    print(w)

answered Jan 8, 2016 at 13:24

rage mon's user avatar

You’ve got three issues here, but, as you can tell, you’re on the right track.

  1. First off, you’re using two loops when you only need to be using one, and I think it’s because you’re a little unclear as to how the while loop works. The while loop checks that the condition is true before each time it runs. If the condition becomes false while going through the loop, the loop will still finish — it just won’t start another. For example:

    n = 17
    while n < 18:
        n += 1
        print n
        n += 1
        print n
    
    18
    19
    

    In your case, each iteration through the while loop creates a for loop. In order for a single iteration through the while to take place, your computer has to go through for every number from 1 to n, meaning that it’ll print out all those extra numbers before your while loop even has a second chance to do its check. The easiest way to fix this is to remove the while loop and structure your code a little differently. As I’ll show you in a few lines, you don’t really need it.

  2. When you say if a < n:, you’ve got your sign backwards and you need an equals sign. The problem asks that you give all values less than n, but, without the =, the program won’t stop until it’s greater than n. It should be if a >= n:.

  3. Finally, the order of the operations isn’t what you want it to be. You’d like it to check that a is less than n before printing, but you print before you do that check. If you switch them around, you’ll get something like this:

    n=int(input())
    for counter in range(1,n):
        a = counter*counter
        if a >= n:
            break
        print(a)
    

    which should do the trick.

Дополнительно:  Root-certificate-deployment

answered Sep 1, 2013 at 3:06

Tutleman's user avatar

8 silver badges15 bronze badges

What about

    n= int(input())
    counter= 1
    while counter * counter < n:
        print( counter * counter )
        counter+= 1

?

answered Sep 1, 2013 at 2:29

Mario Rossi's user avatar

Mario Rossi

27 silver badges37 bronze badges

Turtle man was perfect but for me. I needed to be able to get all the way to 100 so if you need to get past 81 do this

n = int(input())

counter = 1

for counter in range(1,n + 1):
    
    a = counter*counter
    
    if a > n:
        
break
    
print(a)

prosoitos's user avatar

5 gold badges27 silver badges41 bronze badges

answered Sep 28, 2020 at 22:45

alex miranda's user avatar

The square root numbers are the list of those numbers, which produce the original numbers when multiplied by themselves. The symbol used to represent the square root is a radical sign, i.e. ‘√’. The number present under the radical symbol is called ‘radicand’. This concept is one of the important concepts for Class 9 students.

To learn about square roots, we should first learn about squares of numbers. Then it will be easy for us to find the square roots of the numbers. When we multiply a number by itself, then it is said to be the square of that number. Suppose ‘a’ is a number and is multiplied by itself, then it is said to be squared. For example, 2 x 2 = 22 = 4. If we find the square root of 4, we get the original number, i.e. 2, since 4 is a perfect square. Therefore, it can be easily factored by the prime factorisation method to get the square root. See some more examples below:

  • 3 squared = 32 = 9 & √9 = 3
  • 7 squared = 72 = 49 & √49 = 7
  • 11 squared = 112 = 121 & √121 = 11
  • 12 squared = 122 = 144 & √144 = 12

How To Find a Square Root of Numbers?

There are different methods to find the square root of given numbers. They are explained below along with an example in each case.

Method 1: Repeated Subtraction Method

The easiest and a simple method to find the square root of a given number is repeated subtraction. In this method, we need to subtract the consecutive odd numbers till we get 0. However, this method is suitable for only perfect square numbers, such as 4, 9, 16, 25, etc. Let us find the square root of 81 using this method.

81 – 1 = 80

80 – 3 = 77

77 – 5 = 72

72 – 7 = 65

65 – 9 = 56

56 – 11 = 45

45 – 13 = 32

32 – 15 = 17

17 – 17 = 0

Here, we subtracted 9 consecutive odd numbers. So, the square root of 81 is 9.

Method 2: Prime Factorisation Method

In this method, we need to express the given number as the product of its prime factors. This method is also applicable for perfect squares. Let’s look at the example given below to understand how to find the square root of a number using prime factorisation.

Consider the number 225.

Roots of Complex Numbers – Examples and Explanation

The product of prime factors of 225 is:

225 = 3 × 3 × 5 × 5

Take the square root on both sides.

√225 = √(3 × 3 × 5 × 5)

= √(32 × 52)

= 3 × 5

Thus, the square root of 225 is 15.

Method 3: Long Division Method

Finding the square root of very large numbers or imperfect squares could be a difficult task. Hence, we use the long division method to find the square root of such numbers in an easy and fastest way.

Let us find the square root of 10 using this method.

Roots of Complex Numbers – Examples and Explanation

Therefore, the square root of 10 upto 3 decimal places is 3.162.

Square Root Numbers List

Here is the list of the square of numbers and their square roots. The table given below can be memorised by students easily so that they can solve questions based on these square root values.

Find the square root of 169 using the repeated subtraction method.

Given number: 169

Let us subtract the consecutive odd numbers from 169 as shown below:

169 – 1 = 168

168 – 3 = 165

165 – 5 = 160

160 – 7 = 153

153 – 9 = 144

144 – 11 = 133 

133 – 13 = 120

120 – 15 = 105

105 – 17 = 88

88 – 19 = 69

69 – 21 = 48

48 – 23 = 25

25 – 25 = 0

Here, 13 consecutive odd numbers are subtracted.

Therefore, the square root of 169 is 13.

Find the square root of 22 using a suitable method.

As 22 is not a perfect square number, we should apply the long division method.

Roots of Complex Numbers – Examples and Explanation

Hence, the square root of 22 upto 3 decimal places is 4.690.

Square Root Problems

Based on the table above we can solve the questions given here.

  1. Solve √50 + √2 + √9
  2. Multiply: √3 and √7
  3. Divide: √49 by 7
  4. Simplify: (√8 x √9) + √89
  5. Simplify: 2√4+3√9+5√25
  • Square Root Formula
  • Square Root Tricks
  • Square Root Of Decimals

Video Lesson

Roots of Complex Numbers – Examples and Explanation

Оцените статью
Master Hi-technology
Добавить комментарий