# wsum2

**Syntax**

wsum2(X, Y)

**Arguments**

X and Y are scalar/vector/matrix/table.

**Details**

`wsum2`

returns the weighted sum of squares of *X* and *Y*.

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

**Examples**

```
$ wsum2(3 4 1, 1 2 3);
44
// 9*1 + 16*2 + 1*3 = 44
```

Related: wsum