Lets look at this example

$$T=\frac{m_1}{2}\dot x_1^2+\frac{m_2}{2}\dot x_2^2\\
V=-\frac{k_1}{2}\,x_1^2-\frac{k_2}{2}\,x_2^2-\frac{k_3}{2}\,(x_1-x_2)^2$$
from here you obtain
$$M_{ij}=\frac{\partial}{\partial \dot x_i}\left(\frac{\partial T}{\partial \dot x_j}\right)\\
K_{ij}=-\frac{\partial}{\partial x_i}\left(\frac{\partial V}{\partial x_j}\right)$$
hence
$$\underbrace{\left[M\,\omega^2 -K\right]}_{A}\,\vec v=0$$
the solution
from the matrix A you obtain the eigenvalues $\omega_1~,\omega_2~$ and for each eigenvalue the eigen vector $~\Rightarrow\quad \vec v_1~,\vec v_2~$
$$\begin{bmatrix}
x_1(t) \\
x_2(t) \\
\end{bmatrix}=\underbrace{c_1\,\vec v_1\,\cos(\omega_1\,t\,+\phi_1)}_{\vec\eta_1}+\underbrace{c_2\,\vec v_2\,\cos(\omega_2\,t\,+\phi_2)}_{\vec\eta_2}$$
where $c_i~,\phi_i~$ are the initial conditions and $~\vec\eta_i~$ are the normal modes
$$ M=\begin{bmatrix}
m_1 & 0 \\
0 & m_2 \\
\end{bmatrix}\quad,
K= -\begin{bmatrix}
k_1+k_3 & -k_3 \\
-k_3 & k_2+k_3 \\
\end{bmatrix}$$