The * Command

multiply.png

Command Summary

Returns the multiplication of two numbers.

Command Syntax

value1 * value2

Menu Location

Press the [*] key to paste *.

Calculator Compatibility

This command works on all calculators.

Token Size

1 byte

The * operator multiplies two numbers, variables, or expressions. In many cases, it's implied — 5x, for instance, will be assumed to be 5*x. There are two exceptions: long variable names — xy will be interpreted as a single variable, not as x*y — and function calls — f(x) will be interpreted as f() applied to x, not as f*x.

Multiplication has higher priority than + and -, so it will be done before them; it has the same priority as /.

:x*y
        x*y
:2*2
        4

Advanced Uses

Multiplying matrices is not the same as multiplying their individual elements (which the .* operator does). To multiply two matrices, the first must have the same number of columns as the second has rows. The product of an MxN matrix with an NxP matrix will be an MxP matrix, whose (a,b)th entry will be the dot product of the ath row of the first matrix with the bth column of the second.

Error Conditions

240 - Dimension mismatch happens when the dimensions of two matrices don't match up for multiplication to work.

Related Commands

  • - (subtract)
  • + (Add)
  • / (divide)

See Also

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License