Value1 * Value2 Value1 * Value2

Value1

Number Number

A number to multiply the second number by (the first factor ).

Value2

Number Number

A number to multiply the first number by (the second factor ).

Returns

Number Number

The product of the two numbers.

Multiplies two numbers together and returns the result. 2 * 42 * 4 returns 8.

This operator also works with arrays. { 1, 2 } * 6{ 1; 2 } * 6 returns the array { 6, 12 }{ 6; 12 } (equivalent to { 1 * 6, 2 * 6 }{ 1 * 6; 2 * 6 }) and { 1, 2 } * { 6, 7 }{ 1; 2 } * { 6; 7 } returns the array { 6, 14 }{ 6; 14 } (equivalent to { 1 * 6, 2 * 7 }{ 1 * 6; 2 * 7 }).

Multiplying together many values

The PRODUCT function is equivalent to this operator. These formulas both return 24:

2 * 3 * 4
2 * 3 * 4

PRODUCT (2, 3, 4)
PRODUCT (2; 3; 4)

However, PRODUCT can be invoked with arrays with an arbitrary number of elements. To multiply all the elements of NumberArray together and return the result, use this formula:

PRODUCT (NumberArray)
PRODUCT (NumberArray)

"Logical and"

Spreadsheet users often use * to mean "logical and" (conjunction) when manipulating logical arrays. This operator only multiplies numbers together, so use the "logical and" operator && instead. This formula returns only those elements which are both greater than 5 and are odd numbers:

FILTER (NumberArray, (NumberArray > 5) && ISODD (NumberArray))
FILTER (NumberArray; (NumberArray > 5) && ISODD (NumberArray))

Refer to the documentation of the && operator for an in-depth example.

Examples

2 * 4
2 * 4

Returns 8.

{ 1, 2 } * 6
{ 1; 2 } * 6

Returns the array { 6, 12 }{ 6; 12 }, equivalent to { 1 * 6, 2 * 6 }{ 1 * 6; 2 * 6 }.

{ 1, 2 } * { 6, 7 }
{ 1; 2 } * { 6; 7 }

Returns the array { 6, 14 }{ 6; 14 }, equivalent to { 1 * 6, 2 * 7 }{ 1 * 6; 2 * 7 }.

FILTER (NumberArray, (NumberArray > 5) && ISODD (NumberArray))
FILTER (NumberArray; (NumberArray > 5) && ISODD (NumberArray))

Returns only those elements which are both greater than 5 and are odd numbers. This example uses the && operator for "logical and" (conjunction), as the * operator only multiplies numbers together.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell