Topics Register • News • History • How to • Sequences statistics • Template prototypes

# Multiplication

Multiplication is the process of calculating the result when a number a is added to itself b times. The result of a multiplication is called the product of a and b, and each of the numbers is called a factor of the product ab.

Multiplication is denoted a×b,(a)(b), or simply ab. The symbol '×' is known as the multiplication sign.

The result of multiplying no numbers (empty product) is always 1 (the multiplicative identity, see below). The most common occurences are in exponentiation ($\displaystyle{ a^0=1 }$) and factorial numbers (0!=1).

## Multiplication properties

### Associative property

$\displaystyle{ (x*y)z=x(y*z) }$

### Commutative property

$\displaystyle{ x*y=y*x }$

### Distributive property

$\displaystyle{ x(y+z)=xy+xz }$

### Identity element

$\displaystyle{ 1x=x }$

### Multiplication by zero

$\displaystyle{ 0x=0 }$

## Multiplication algorithms

When the product fits in a variable supported by the programming language, or in a register when programming in assembler, the multiplication is trivial. However if the largest available register is n bits wide the factors can only be n/2 bits wide each.

Otherwise there are several algorithms used to calculate products, depending on the size of the factors: