4. Given that the coordinates of points $M$ and $N$ satisfy the system of inequalities
$$
\left\{\begin{array}{l}
x \geqslant 0, \\
y \geqslant 0, \\
x+2 y \leqslant 6, \\
3 x+y \leqslant 12 .
\end{array}\right.
$$

If $\boldsymbol{a}=(1,-1)$, then the range of $\overrightarrow{M N} \cdot \boldsymbol{a}$ is
$\qquad$
4. $[-7,7]$.

Let points $M\left(x_{1}, y_{1}\right), N\left(x_{2}, y_{2}\right)$.
Then by the conditions we have
$$
\begin{array}{l} 
0 \leqslant x_{1}, x_{2} \leqslant 4,0 \leqslant y_{1}, y_{2} \leqslant 3 . \\
\text { Hence } \overrightarrow{M N} \cdot a=(\overrightarrow{O N}-\overrightarrow{O M}) \cdot a \\
=\overrightarrow{O N} \cdot a-\overrightarrow{O M} \cdot a \\
=x_{2}-y_{2}-\left(x_{1}-y_{1}\right) \\
= x_{2}-x_{1}+y_{1}-y_{2} \in[-7,7] .
\end{array}
$$

When and only when point $M(4,0), N(0,3)$, the above expression achieves the minimum value -7; when point $M(0,3), N(4,0)$, the above expression achieves the maximum value 7.