# [APL (Dyalog)], <s>7</s> 5 bytes

*2 bytes saved thanks to @Mego*

<!-- language-all: lang-apl -->

    +.×⍨⍳

[Try it online!][TIO-j8vk7rlp]

**How?**

`⍳` - range

`+.×` - inner product (`a +.× b` → `+/ a × b`)

`⍨` - with itself (on both sides)


[APL (Dyalog)]: https://www.dyalog.com/
[TIO-j8vk7rlp]: https://tio.run/##SyzI0U2pTMzJT///P@1R2wRtfY3D0x/1rnjUu1kTKKJwCMQyNAAA "APL (Dyalog Unicode) – Try It Online"