dotMultiply.md (1133B)
1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> 2 3 # Function dotMultiply 4 5 Multiply two matrices element wise. The function accepts both matrices and 6 scalar values. 7 8 9 ## Syntax 10 11 ```js 12 math.dotMultiply(x, y) 13 ``` 14 15 ### Parameters 16 17 Parameter | Type | Description 18 --------- | ---- | ----------- 19 `x` | number | BigNumber | Fraction | Complex | Unit | Array | Matrix | Left hand value 20 `y` | number | BigNumber | Fraction | Complex | Unit | Array | Matrix | Right hand value 21 22 ### Returns 23 24 Type | Description 25 ---- | ----------- 26 number | BigNumber | Fraction | Complex | Unit | Array | Matrix | Multiplication of `x` and `y` 27 28 29 ### Throws 30 31 Type | Description 32 ---- | ----------- 33 34 35 ## Examples 36 37 ```js 38 math.dotMultiply(2, 4) // returns 8 39 40 a = [[9, 5], [6, 1]] 41 b = [[3, 2], [5, 2]] 42 43 math.dotMultiply(a, b) // returns [[27, 10], [30, 2]] 44 math.multiply(a, b) // returns [[52, 28], [23, 14]] 45 ``` 46 47 48 ## See also 49 50 [multiply](multiply.md), 51 [divide](divide.md), 52 [dotDivide](dotDivide.md)