Abstract In this paper, motivated by the phenomenon of the interconnection of lossless electrical networks, a class of behaviours known as J -lossless behaviours is introduced, where J is a symmetric two-variable polynomial matrix. It is shown that for certain values of J , interconnection of J -lossless behaviours leads to an oscillatory behaviour. Physically this translates to the fact that interconnection of two multi-port lossless electrical networks results in an autonomous lossless electrical network. Finally, the problem of decomposition of an oscillatory behaviour with a given characteristic polynomial as an interconnection of two single-input–single-output behaviours, such that one has a lossless positive real transfer function and the other has a lossless negative real transfer function is also considered. This problem can be viewed as an inverse problem to the one of interconnection of J -lossless behaviours.