# wsum {#wsum}

## Syntax {#syntax}

`wsum(X, Y)`

## Arguments {#arguments}

**X** / **Y** can be a scalar, vector, matrix or table.

## Details {#details}

Return the inner product of two vectors with the same length.

Please note that the data type of the result is DOUBLE, even if both *X* and *Y* are integers.

## Examples {#examples}

```
wsum(7 8 9, 1 2 3);
// output: 50
// 7*1 + 8*2 + 9*3 = 50
```

Related function: [wavg](wavg.md)

