 The basal ganglia form a fundamental component of the cerebrum.In contrast to the cortical layer that lines the surface of the forebrain, the basal ganglia are a collection of distinct masses of gray matter lying deep in the brain not far from the junction of the thalamus.They lie to the side of and surround the thalamus.