Back

Complex Number Multiplication

Easy
Created: February 3, 2026Updated: February 4, 2026

Consider computing the product of two complex numbers (a+bi)(a + bi)(a+bi) and (c+di)(c + di)(c+di). Using the standard method we learned in school, we get:

(a+bi)(c+di)=ac+adi+bci+bdi2=(acbd)+(ad+bc)i(a + bi)(c + di) = ac + adi + bci + bdi^2 = (ac - bd) + (ad + bc)i(a+bi)(c+di)=ac+adi+bci+bdi2=(acbd)+(ad+bc)i

This standard method uses 4 multiplications and 2 additions to compute the product:

  • Multiplications: acacac, adadad, bcbcbc, bdbdbd
  • Additions: acbdac - bdacbd, ad+bcad + bcad+bc
    • We will treat subtraction as addition too. In computer design, subtraction aaa from bbb essentially negates bbb first, then adds it to aaa.

Note that the plus sign combining the real and imaginary parts doesn’t count—think of a complex number as simply a 2-tuple of values.

It turns out that you can compute this complex product using only 3 multiplications and 5 additions. From a computer design perspective, this is preferable since multiplications are more expensive to implement than additions.

Can you figure out how to do this?

Solution

The key insight is that ad+bcad + bcad+bc can be extracted from the product (a+b)(c+d)(a + b)(c + d)(a+b)(c+d).

Expanding (a+b)(c+d)(a + b)(c + d)(a+b)(c+d):

(a+b)(c+d)=ac+ad+bc+bd(a + b)(c + d) = ac + ad + bc + bd(a+b)(c+d)=ac+ad+bc+bd

Notice that this contains both acacac and bdbdbd, which we already need for the real part. If we subtract them:

(a+b)(c+d)acbd=ad+bc(a + b)(c + d) - ac - bd = ad + bc(a+b)(c+d)acbd=ad+bc

This gives us exactly the imaginary coefficient we need!

The 3-multiplication method:

  1. Compute m1=acm_1 = acm1=ac
  2. Compute m2=bdm_2 = bdm2=bd
  3. Compute m3=(a+b)(c+d)m_3 = (a + b)(c + d)m3=(a+b)(c+d)

Then:

  • Real part: m1+m2=acbdm_1 + m_2 = ac - bdm1+m2=acbd
  • Imaginary part: m3m1m2=ad+bcm_3 - m_1 - m_2 = ad + bcm3m1m2=ad+bc

Operation count:

  • 3 multiplications: m1m_1m1, m2m_2m2, m3m_3m3
  • 5 additions: (a+b)(a + b)(a+b), (c+d)(c + d)(c+d), (m1+m2m_1 + m_2m1+m2), and two more to compute (m3m1m2m_3 - m_1 - m_2m3m1m2)

We’ve traded one multiplication for one addition—a worthwhile exchange when multiplication is the expensive operation.

This technique is the foundation of Karatsuba’s algorithm for fast multiplication of large integers, which recursively applies this same trick to achieve O(nlog23)O(n1.585)O(n^{\log_2 3}) \approx O(n^{1.585})O(nlog23)O(n1.585) complexity instead of the naive O(n2)O(n^2)O(n2).

Try These Next