Updated: 02/01/2021 by Computer Hope

In mathematics, multiply or times is a mathematical operation that adds a number multiple times. Multiply can be represented by an "x," interpunct (·), or the asterisk (*). For example, with 3 x 5 it's the same as adding the number three five times (3 + 3 + 3 + 3 + 3) or five three times (5 + 5 + 5) to get 15. With multiplication, the formula's numbers are known as "factors," and the answer is known as the "product." So, in our earlier example, "3" and "5" are the factors, and "15" is the product. To multiply numbers on a computer or smartphone a calculator or spreadsheet could be used.

With computer programming, the asterisk can multiply a number or numbers stored in a variable as shown in the following Perl code.

use strict;
my $first = 3;
my $second = 5;
my $answer = $first * $second;
print "You get $answer if you multiply $first by $second";

When the above script is run it would return "You get 15 if you multiply 3 by 5" printed to the screen.

Add, Divide, Programming terms