Consider a Lagrangian that is invariant under a rotation about the z-axis. We saw in example 5-3 that for a rotation about the z-axis in cartesian coordinates, we have:
\begin{align}
f_1&=-y\tag{5.14}\\
f_2&=x\tag{5.15}\\
f_3&=0\tag{5.16}\\
g&=0
\tag{5.17}\end{align}
The conserved quantity is thus:
\begin{align}
Q=\sum_{i=1}^np_if_i=-p_xy+p_yx
\tag{5.18}\end{align}
which is the \(z\) component of angular momentum:
\begin{align}
\vec{L}=\vec{r}\times\vec{p}
\tag{5.19}\end{align}
In general, the angular momentum in a direction is conserved if the Lagrangian is invariant to rotations about an axis in that direction.