Compactness is to minimise metric or modular distance from all spaces to all others in any contiguous arrangement, and linearity it to minimise visual integration of the contiguous arrangement.
Compactness vs linearity
Sources
Hillier, B. (1996, 2007), Space is the Machine: A Configurational Theory of Architecture. Space Syntax: London, UK. pp. 267-269