As for $1 \times 1$ grid, there is no point for the only one to match, so the answer is $0$.
As for $1 \times 2$ grid, we match the only two points into a pair, so the answer is $1$.
As for $2 \times 2$ grid, we match the top left point and the bottom right one into a pair, the top right point and the bottom left one into a pair. The answer is $4$, as shown by the following picture.

As for $2 \times 3$ grid, we match the top left point and the bottom middle one, the top middle point and the bottom right one, the top right point and the bottom left one. The answer is $7$, as shown by the following picture.
