# can somebody explain how you get the second line from the first line in the picture?

I'm trying to understand the transition from the 1st line of the Lagrangian to the second. we substitute for $\eta$ but how is the multiplication happening here? if I multiply the terms into the matrix elements, won't I get a matrix whose elements are the terms to the right of the matrix here?

• Recall that repeated indices are summed over. The term $\eta^{\mu \nu}\partial_{\mu} \phi \partial_{\nu} \phi$ is a scalar, not a matrix. – preferred_anon Aug 20 '18 at 10:01

Since $\eta^{\mu \nu}$ is non-zero for diagonal elements only, we only need to sum those terms when $\mu = \nu$. Therefore, we have \begin{align} &\qquad \frac{1}{2} \eta^{\mu \nu} \; \partial_{\mu}\phi \; \partial_{\nu} \phi \\ &= \frac{1}{2} \Bigg[ \eta^{00} \partial_{0}\phi \; \partial_{0} \phi \; + \; \eta^{11} \partial_{1}\phi \; \partial_{1} \phi \; + \; \eta^{22} \partial_{2}\phi \; \partial_{2} \phi \; + \; \eta^{33} \partial_{3}\phi \; \partial_{3} \phi \Bigg]\\ &= \frac{1}{2} \Bigg[ (+1)\partial_{t}\phi \; \partial_{t} \phi \; + \; (-1) \partial_{x}\phi \; \partial_{x} \phi \; + \; (-1) \partial_{y}\phi \; \partial_{y} \phi \; + \; (-1) \partial_{z}\phi \; \partial_{z} \phi \Bigg] \\ &= \frac{1}{2} \dot{\phi}^{\, 2} - \frac{1}{2}(\nabla\phi)^2 \end{align}