Using the Gauss linking integral we define a new measure of entanglement for a collection of closed or open chains, the linking matrix. For a system employing periodic boundary conditions (PBC) we use the periodic linking number and the periodic selflinking number to define the periodic linking matrix. We discuss its properties with respect to the cell size used for the simulation of a periodic...