(3) Differentiate the potential energy of the system with respect to pairs of coordinates at equilibrium to create the stiffness matrix K. In a similar way, differentiate the kinetic energy and damping energy with respect to coordinate velocities to create the mass matrix M and damping matrix G.