Light module of a headlamp of a motor vehicle, the light module comprising - a matrix light source with a plurality of several individually controllable individual light sources arranged in a matrix, each of which emits more or less light depending on its control in order to generate a single light spot, - a lens system for imaging the light spots generated by the matrix light source on a roadway in front of the motor vehicle in order to generate a resulting light distribution of the light module, wherein the lens system has a plurality of individual lenses (16, 18, 20) arranged one behind the other along a beam path, and - a diaphragm introduced into the beam path, which is designed to have a selective effect on edge regions of the imaged light distribution of the light module, characterised in that the diaphragm is introduced into the beam path between the matrix light source and a first individual lens of the lens system, a distance between the matrix light source and the diaphragm is in a range of 2 mm and 6 mm, the diaphragm comprises a light passage opening which has a central main opening and, to the side thereof, secondary openings which are smaller in area than the main opening, the secondary openings each merging into the main opening in a transition region of the light passage opening, the central main opening has a height which is selected such that a diameter (dA, dB) of at least one light beam (36A, 36B), which was emitted by at least one central individual light source of the matrix light source, is not restricted by the diaphragm, and the lateral secondary openings each have a height which is designed such that a diameter (dC) of at least one light beam, which was emitted by at least one individual light source arranged in a lateral edge region of the matrix light source, is cut off upwards and downwards by the diaphragm. - a matrix light source with a plurality of several individually controllable individual light sources arranged in a matrix, each of which emits more or less light depending on its control in order to generate a single light spot, - a lens system for imaging the light spots generated by the matrix light source on a roadway in front of the motor vehicle in order to generate a resulting light distribution of the light module, wherein the lens system has a plurality of individual lenses (16, 18, 20) arranged one behind the other along a beam path, and - a diaphragm introduced into the beam path, which is designed to have a selective effect on edge regions of the imaged light distribution of the light module, the diaphragm is introduced into the beam path between the matrix light source and a first individual lens of the lens system, a distance between the matrix light source and the diaphragm is in a range of 2 mm and 6 mm, the diaphragm comprises a light passage opening which has a central main opening and, to the side thereof, secondary openings which are smaller in area than the main opening, the secondary openings each merging into the main opening in a transition region of the light passage opening, the central main opening has a height which is selected such that a diameter (dA, dB) of at least one light beam (36A, 36B), which was emitted by at least one central individual light source of the matrix light source, is not restricted by the diaphragm, and the lateral secondary openings each have a height which is designed such that a diameter (dC) of at least one light beam, which was emitted by at least one individual light source arranged in a lateral edge region of the matrix light source, is cut off upwards and downwards by the diaphragm.