In a world where networks become a dominant form of organization, the structure of networks and the position of individuals in these networks affect individual behavior and aggregate economic outcomes. The analysis of network formation by a central planner or by individuals themselves is at the heart of this thesis on the economics of networks.Chapter 1 theoretically studies the optimal formation and protection of networks by a central planner knowing that an external agent can destroy k links. The protection of the network can be guaranteed either by densifying the links between nodes, or by protecting the links. When the cost of protection is relatively small, a minimally connected network composed of protected links guarantees the commun...