A summery of obtaining the normal frequencies of small oscillations and normal coordinates is given.
Lagrangian
We assume that the Lagrangian of the system has the form\begin{equation}\label{eq01} L=\sum_k f_k(q)\dot{q}_k\dot{q}_k - V(q)\,. \end{equation}First find the equilibrium position by finding the minimum of the potential energy. For this purpose set\begin{equation}\label{eq02}{\partial V(q)\over\partial q_k} = 0\end{equation}and solve for $q_k$. Let $Q_{k0}$ be the values of coordinates $q_k$ where the potential energy is minimum.
Next introduce deviations $u_k=q_k-q_{k0}$ of the coordinates from the equilibrium values. Writing $q_k=u_k+q_{k0}$ express the kinetic and potential energies in terms of new coordinates $u_k$. Of course, when the equilibrium values of coordinates are zero, there is no need to introduce the deviations $u_k$.
Approximation of Small Oscillations
Now we expand the kinetic and potential energies in powers of $u_k$ and retain only the quadratic terms. This gives\begin{eqnarray}{\rm K.E.} &=& {1\over2} \sum_{ij}\mu_{ij}\dot{u}_i\dot{u}_j\,,\label{eq03}\\{\rm P.E.} &=& {1\over2} \sum_{ij} k_{ij}u_iu_j\label{eq04}\end{eqnarray}where $\mu_{ij},k_{ij}$ are constants which are functions of parameters in the Lagrangian.
Use a matrix notation to rewrite the K.E. and P.E. and arrive at the Lagrangian in the form:\begin{equation}\label{eq05}L = {1\over2} u^T\mathcal{M}u-{1\over2} u^T\mathcal{K} u\,,\end{equation}where $u$ represents column vector consisting of components $u_j$.
Frequencies of Small Oscillations
The frequencies of small oscillations are then obtained by solving\begin{equation}\label{eq06}\det\left(\omega^2\mathcal{M}-\mathcal{K}\right) = 0\,.\end{equation}
Normal Coordinates
For each frequency $\omega_j$, we solve for column vector $e_j$ using the matrix equation:\begin{equation}\label{eq07}[\omega^2\mathcal{M}-\mathcal{K}]e_j=0\,.\end{equation}The vectors are normalized as\begin{equation}\label{eq08}e_j^T\mathcal{M}e_j = 1\,.\end{equation}
We then assemble the vectors $e_1,e_2,\cdots,e_N$ to form a matrix$S$:\begin{equation}\label{eq09}S = [e_1,e_2,\cdots,e_N]\end{equation}The normal coordinates $Q_j$ are then given by the components of the column vector $Q$, where\begin{equation}\label{eq10}Q = Tu\,.\end{equation}where $T$ is the inverse of the matrix $S$:\begin{equation}\label{eq11}T = S^{-1}\,.\end{equation}