In the scalar field Lagrangian the mass term is given by
$$m^2 \phi^2$$$$m^2 \phi^2.$$
But the equivalent term in Maxwell's Lagrangian for electromagnetism is
$$m^2A_{\mu}A^{\mu}$$$$m^2A_{\mu}A^{\mu}.$$
But I don't know why the latter is correct. Could anyone help me getting to it?