We use the coordinate Bethe ansatz to exactly calculate matrix elements between eigenstates of the Lieb–Liniger model of one-dimensional bosons interacting via a two-body delta-potential. We investigate the static correlation functions of the zero-temperature ground state and their dependence on interaction strength, and analyze the effects of system size in the crossover from few-body to mesoscopic regimes for up to seven particles. We also obtain time-dependent nonequilibrium correlation functions for five particles following quenches of the interaction strength from two distinct initial states. One quench is from the noninteracting ground state and the other from a correlated ground state near the strongly interacting Tonks–Girardeau reg...