Virtualisation and virtual network slicing represent the main paradigms to enable efficient and effective end-to-end service provisioning in future fifth generation and beyond networks. While practical aspects and implementation have been extensively investigated, the development of theoretic models to enable the design and analysis of advanced slicing algorithms has only recently started. However, even if existing models are useful to analyse specific aspects of network slicing performance in specific topologies, they still outline limitations and drawbacks for providing an actual theoretical basis for network slicing. This article proposes a novel general model for network slicing based on multilayer graphs, linear algebra and algebraic graph theory. The proposed framework generalises specific legacy models by allowing a more comprehensive study of different perspectives of network slicing in future generation networks.