I have the following Lagrangian (density) for bosons
$$L = \partial_{\mu} \phi^i \partial^{\mu}\phi^i+ m^2\phi^i \phi^i$$
and I am trying to understand why this Lagrangian is invariant under global internal $SO(n)$ transformations. I have the following transformation $$\phi'^i = R_{\,\,j}^i\phi^j$$where $R_{\,\,j}^i = \delta_{\,\, j}^i-\epsilon r_{\,\,j}^i$ for $\epsilon <<1$. Of course $r_{\,\,j}^i=-r_{\,\,i}^j$. So what I am trying is to substitute the transformed fields into the Lagrangian. Still, after doing so I do not see how the extra terms cancel out so that I get the original Lagrangian! So, why is this Lagrangian $SO(n)$ invariant?
P.S. I can see this if $\phi$ is complex, but here I take it to be real.