Query on this calculation - print((1+2j)*(3+6j))

print((1+2j)*(3+6j))
```(-9+12j)

(1+2j)*(3+6j) 

how the output is derived as -9+12j?

```Can someone please explain the output how it is derived as (-9+12j)?
1 Like

is this with complex numbers?
you just need to know that j² = -1
if it is so it is like this:

   (1+2j)*(3+6j)
 = 1*3 + 1*6j + 2j*3 + 2j*6j
 = 3 + 6j + 6j + 12j²
 = 3 + 12j + 12*(-1)
 = 3 + 12j - 12
 = -9 + 12j
1 Like