A system of two coupled oscillators consists of two masses connected to walls and to each other by springs. Because the coupling spring links the motions, the masses generally do not oscillate independently. Instead, there are special collective motions called normal modes.
If \(x_1\) and \(x_2\) are the displacements of the two masses, the equations of motion can be written in matrix form as
\[
M\ddot{x}+Kx=0,
\]
where
\[
M=
\begin{bmatrix}
m_1 & 0 \\
0 & m_2
\end{bmatrix},
\qquad
K=
\begin{bmatrix}
k_1+k_c & -k_c \\
-k_c & k_2+k_c
\end{bmatrix}.
\]
Here \(m_1,m_2\) are the masses, \(k_1,k_2\) are the outer spring constants, and \(k_c\) is the coupling spring constant.
To find normal modes, assume a harmonic solution of the form
\[
x(t)=v\cos(\omega t),
\]
where \(v\) is a constant mode vector. Substituting this into the matrix equation gives
\[
(K-\omega^2 M)v=0.
\]
A nonzero solution exists only when
\[
\det(K-\omega^2 M)=0.
\]
This determinant equation produces two values of \(\omega^2\), so the system has two normal-mode frequencies.
For the sample case
\[
m_1=m_2=1\text{ kg},\qquad
k_1=k_2=2\text{ N/m},\qquad
k_c=0.5\text{ N/m},
\]
the matrices become
\[
M=
\begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix},
\qquad
K=
\begin{bmatrix}
2.5 & -0.5 \\
-0.5 & 2.5
\end{bmatrix}.
\]
Solving the characteristic equation gives
\[
\omega_1^2=2,\qquad \omega_2^2=3,
\]
so
\[
\omega_1=\sqrt{2}\approx 1.414\text{ rad/s},
\qquad
\omega_2=\sqrt{3}\approx 1.732\text{ rad/s}.
\]
The first mode is the in-phase mode, in which both masses move together in the same direction. The second mode is the out-of-phase mode, in which the masses move oppositely. In the symmetric sample case, the corresponding mode vectors are proportional to
\[
v_1 \propto
\begin{bmatrix}
1 \\
1
\end{bmatrix},
\qquad
v_2 \propto
\begin{bmatrix}
1 \\
-1
\end{bmatrix}.
\]
Physically, the out-of-phase mode usually has the higher frequency because the coupling spring is stretched more strongly during that motion. The in-phase mode usually has the lower frequency because the coupling spring changes less.
At more advanced level, this same method extends to many coupled oscillators, lattice vibrations, phonons, and continuous systems. But the two-mass system already shows the essential ideas: matrix equations, eigenvalues as squared frequencies, and eigenvectors as mode shapes.
This calculator implements exactly that method. It computes the frequencies, mode vectors, and amplitude ratios, and it visualizes the normal modes with both plots and a polished contained animation.