Search code examples
rplotcomplex-numbersfactorization

Plot the multiplication of complex roots of fractional polynomials


I'm thinking that @GGrothendieck's answer to the request for solutions to fractional roots of negative numbers deserves a graphical addendum:

Can someone plot the roots in a unit complex circle. as well as add the "graphical sum" of some of the roots, i.e. the sequential products of the same 5 roots of -8, vectors multiplied in sequence?

x <- as.complex(-8)  # or x <- -8 + 0i
      # find all three cube roots
xroot5 <- (x^(1/5) * exp(2*c(0:4)*1i*pi/5))
plot(xroot5, xlim=c(-8, 2),  ylim=c(-5,5))
abline(h=0,v=0,lty=3)

Originally I was thinking this would be some sort of head to tail illustration but complex multiplication is a series of expansions and rotations around the origin.

enter image description here


Solution

  • The circle is centered at 0, 0. The roots all have the same radius and picking any one of them, the radius is

    r <- Mod(xroot[1])
    

    The following gives a plot which looks similar to the plot in the question except we have imposed an aspect ratio of 1 in order to properly draw it and there is a circle drawn through the 5 points:

    plot(Re(xroot5), Im(xroot5), asp = 1)
    
    library(plotrix)
    draw.circle(0, 0, r) 
    

    Multiplying any root by

    e <- exp(2*pi*1i/5) 
    

    will rotate it into the next root. For example, this plots xroot5[1] in red:

    i <- 0
    points(Re(xroot5[1] * e^i), Im(xroot5[1] * e^i), pch = 20, col = "red") 
    

    and then repeat the last line for i = 1, 2, 3, 4 to see the others successively turn red.