Multiplication ( * )
What is it?
Multiplication is the mathematical term used to describe the scaling of one number by another, in doing so obtaining the product of the two numbers. If you have 4 bags, each containing 330g of sugar, one method of finding the combined weight of the four bags is to use addition:
330 + 330 + 330 + 330;
This will return the correct result - 1320 grams of sugar - but this is an inefficient method of finding the total. Imagine if you had 768 bags of sugar – using the method shown above would become tedious very quickly!
Instead, it is far easier to use multiplication.
What is the Syntax?
In mathematics, multiplication is denoted by the symbol ×. However, due to the fact that this symbol does not exist on most computer keyboards, computer programs tend to represent multiplication with the asterisk (*) symbol instead.
The multiply operator’s syntax is as follows:
Operand1 * Operand2
Why might I want to use this?
- Calculate the total cost of buying a certain quantity of a single product.
- Calculate the amount of fabric needed to produce an order’s worth of cotton shirts.
- Calculate the area of a rectangle by multiplying its length by its width.
The following example determines the cost of a customer order by multiplying the quantity ordered by the unit price:
TotalCost := Quantity * UnitPrice
If a customer orders 5 sandwiches at a unit price of £2.50 per sandwich, the value of TotalCost would be 5 multiplied by £2.50, which equals £12.50.
<< Previous: Subtraction ( - ) | Next: Division ( / ) >>