We do complex number multiplication as follows:
(a + i * b) * (c + i * d) = (a * c - b * d) + i * (a * d + b * c)
The real and imaginary parts of the result are
real part = (a * c - b * d)
imag part = (a * d + b * c)
This involves four real multiplications. How can we do it with only three real multiplications?
You are interested in two numbers : A=ac−bd
and B=ad+bc
.
Compute three real multiplications S1=ac
, S2=bd
, and S3=(a+b)(c+d)
.
Now you can compute the results as
A=S1−S2
and B=S3−S1−S2
.
This process is called Karatsuba multiplication and used heavily in Algorithm analysis.
It is used to find the closest pair of points.
For completeness, I'd like to point out Gauss' complex multiplication algorithm, which is another way to do complex multiplication with only three multiplies. To summarize, you compute
k1 = c * (a + b)
k2 = a * (d - c)
k3 = b * (c + d)
Real part = k1 - k3
Imaginary part = k1 + k2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With