a | The hippocampal formation, which is made up of the entorhinal cortex and hippocampus (shown in colour) extends over the anterior-to-posterior axis of the brain. The colour gradients reflect the topological input–output relations between the hippocampal formation and other brain areas, as well as its internal functional and molecular organization. Input to the hippocampus is shown by solid arrows, hippocampal outflow is shown by dashed arrows. Cortical and subcortical information funnels onto superficial layers of the entorhinal cortex, and this input is organized in an anterior–medial to posterior–lateral gradient (shown by the colour gradient in the entorhinal cortex). This anatomical gradient is largely preserved as the entorhinal cortex conveys this information to the hippocampus (shown by the corresponding colour code in the hippocampus). The long-axis gradient is preserved in the output pattern of the hippocampus. As well as reconnecting with the entorhinal cortex, the hippocampus monosynaptically connects with — from anterior to posterior — the orbitofrontal cortex, anterior cingulate, amygdala, nucleus accumbens and posterior cingulate. b | In the hippocampal transverse axis, superficial layers of the entorhinal cortex connect with the dentate gyrus (DG), CA3, CA1 and the subiculum (Sub). The trisynaptic circuit connects the dentate gyrus to CA3, to CA1 and to the subiculum. Through auto-association fibres, CA3 neurons interconnect with other CA3 neurons throughout the long axis. The CA1 and primarily the subiculum provide the main hippocampal outflow (shown by dashed arrows), back to the deep layers of the entorhinal cortex and also to a range of cortical and subcortical sites (as shown in part a).