How can I perform a scalar product on a matrix of pairs?
===

I have a matrix `M`containing pairs (i.e. arrays of size 2). Given a pair `p`, how can I get a 2D matrix `M'`containing the result of the scalar product of `p` and each element of `M`?

        (0, 0) (0, 1)                             8 5
    M = (1, 0) (1, 1)       p = (2, 2)       M' = 5 2
        (2, 0) (2, 1)                             4 1

`M` and `p` are defined :

    M =. 3 2 2 $ 0 0 0 1 1 0 1 1 2 0 2 1
    p =. 2 2

I have an implementation of scalar product in J :

    sp =. +/ @: *: @: -

It works on pairs :

        0 0 sp p
    8
        0 1 sp p
    5

But not on the full matrix, because of bad length :

        p sp M
    |length error: sp
    |   p     sp M

How should I deal with that ? This is probably easy for J geniuses, but I'm just a poor newbie.