Given a closed Riemannian manifold and a pair of multicurves in it, we give a
formula relating the linking number of the latter to the spectral theory of the Laplace
operator acting on differential 1-forms. As an application, we compute the linking
number of any two multigeodesics of the flat torus of dimension 3, generalising a
result of P. Dehornoy.