  We develop a statistical theory of networks. A network is a set of vertices
and links given by its adjacency matrix $\c$, and the relevant statistical
ensembles are defined in terms of a partition function $Z=\sum_{\c} \exp
{[}-\beta \H(\c) {]}$. The simplest cases are uncorrelated random networks such
as the well-known Erd\"os-R\'eny graphs. Here we study more general
interactions $\H(\c)$ which lead to {\em correlations}, for example, between
the connectivities of adjacent vertices. In particular, such correlations occur
in {\em optimized} networks described by partition functions in the limit
$\beta \to \infty$. They are argued to be a crucial signature of evolutionary
design in biological networks.
