# Ancient Egyptian multiplication

In mathematics, ancient Egyptian multiplication (also known as Egyptian multiplication, Ethiopian multiplication, Russian multiplication, or peasant multiplication), one of two multiplication methods used by scribes, is a systematic method for multiplying two numbers that does not require the multiplication table, only the ability to multiply and divide by 2, and to add. It decomposes one of the multiplicands (preferably the smaller) into a set of numbers of powers of two and then creates a table of doublings of the second multiplicand by every value of the set which is summed up to give result of multiplication.
This method may be called mediation and duplation, where mediation means halving one number and duplation means doubling the other number. It is still used in some areas.
The second Egyptian multiplication and division technique was known from the hieratic Moscow and Rhind Mathematical Papyri written in the seventeenth century B.C. by the scribe Ahmes.
Although in ancient Egypt the concept of base 2 did not exist, the algorithm is essentially the same algorithm as long multiplication after the multiplier and multiplicand are converted to binary. The method as interpreted by conversion to binary is therefore still in wide use today as implemented by binary multiplier circuits in modern computer processors.

## Method

The ancient Egyptians had laid out tables of a great number of powers of two, rather than recalculating them each time. To decompose a number, they identified the powers of two which make it up. The Egyptians knew empirically that a given power of two would only appear once in a number. For the decomposition, they proceeded methodically; they would initially find the largest power of two less than or equal to the number in question, subtract it out and repeat until nothing remained. (The Egyptians did not make use of the number zero in mathematics.)
After the decomposition of the first multiplicand, the person would construct a table of powers of two times the second multiplicand (generally the smaller) from one up to the largest power of two found during the decomposition.
The result is obtained by adding the numbers from the second column for which the corresponding power of two makes up part of the decomposition of the first multiplicand.
Because mathematically speaking, multiplication of natural numbers is just "exponentiation in the additive monoid", this multiplication method can also be recognised as a special case of the Square and multiply algorithm for exponentiation.

### Example

25 × 7 = ?
Decomposition of the number 25:
    The largest power of two less than or equal to 25is 16:25 − 16= 9. The largest power of two less than or equal to 9is 8:9 − 8= 1. The largest power of two less than or equal to 1is 1:1 − 1= 0. 25 is thus the sum of: 16, 8 and 1.
The largest power of two is 16 and the second multiplicand is 7.
| 1 | 7 |
| 2 | 14 |
| 4 | 28 |
| 8 | 56 |
| 16 | 112 |
As 25 = 16 + 8 + 1, the corresponding multiples of 7 are added to get 25 × 7 = 112 + 56 + 7 = 175.

## Russian peasant multiplication

In the Russian peasant method, the powers of two in the decomposition of the multiplicand are found by writing it on the left and progressively halving the left column, discarding any remainder, until the value is 1 (or −1, in which case the eventual sum is negated), while doubling the right column as before. Lines with even numbers on the left column are struck out, and the remaining numbers on the right are added together.

### Example

238 × 13 = ?
| 13 | | 238 |
| 6 | (remainder discarded) | 476 |
| 3 | | 952 |
| 1 | (remainder discarded) | 1904 |
| 13 | 238 |
| 6 | 476 |
| 3 | 952 |
| 1 | +1904 |
| | 3094 |