| Applying science to business management |
  
Multiply
Format: A * B
Arguments: [num] A, B Any real numbers,
complex numbers, vectors, or matrices to multiply
Returns: [num] Product of A and B
Description: Multiplication is carried out using one of
the following methods as is appropriate for the input data:
If A is an array and B is a single number, every
element in A is multiplied by B:
If A is a single number and B is an array, every
element in B is multiplied by A:
If both A and B are lists with the same lengths,
the corresponding elements in A and B are
multiplied:
If A and B are matrices and the number of
columns in A is equal to the number of rows in B,
matrix multiplication is used:
In all cases, elements are multiplied using complex
multiplication where appropriate:
Examples: 3*6 = 18
(2+3*I)*I = -3+2i
[1,2,3,4]*2 = [2,4,6,8]
2*[1,2,3,4] = [2,4,6,8]
[1,2,3,4]*[1,2,3,4] = [1,4,9,16]
[[1,2],[3,4]]*[[1,2],[3,4]] =
[[7,10],[15,22]]
See Also: Implied Multiply,
Divide
|