Linear Algebra and Its Applications, exercise 1.3.10

Exercise 1.3.10 (very optional). Find a method for computing the quantities ac – bd and bc + ad with three multiplications instead of four. Assuming that addition were a sufficiently faster operation than multiplication, this would provide a faster way to compute the product of two complex numbers a + bi and c + di.

Answer: The task is essentially to substitute addition for at least one multiplication. One approach is to multiply  a + b times c + d and see how close we get to one of the two quantities we’re looking for. We have

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

The first term bc + ad on the right-hand side is one of the quantities we need to compute. We then subtract the last two terms from both sides to get

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

We can thus compute the quantities we need as follows:

  1. Add a plus b and c plus d (two additions).
  2. Multiply a + b times c + d (one multiplication).
  3. Multiply a times c and b times d (two multiplications).
  4. Subtract ac and bd from (a + b)(c + d) to obtain bc + ad (two additions).
  5. Subtract bd from ac to obtain ac – bd (one addition).

The total number of operations required by this method is thus five additions and three multiplications or eight operations in total.

By contrast the traditional method requires four multiplications (ac, ad, bc, and bd) and two additions (bc + ad and ac – bd), or six operations in total. The new method therefore has three more additions and one less multiplication, and would be faster as long as a multiplication costs more than three additions.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

This entry was posted in linear algebra. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s