A magnet unit: comprising a magnet holder and a magnet, wherein the magnet holder has a shaft attachment portion and a magnet holding portion, wherein the shaft attachment portion is configured to be press-fitted and fixed to a shaft; and wherein the magnet holding portion is provided on one side in an axial direction of the shaft attachment portion and holds a periphery of a magnet, and wherein the magnet holder holds the magnet on one axial end side on an inner peripheral surface side thereof, and wherein the magnet holder has an undercut portion that engages with the magnet in the axial direction on an inner surface of the magnet holding portion facing the magnet, and wherein the magnet holding portion and the shaft attachment portion are integrally formed of sintered metal, and wherein, by sizing an outer peripheral surface and an end surface of the magnet holding portion and an inner peripheral surface of the shaft attachment portion, during which the outer peripheral surfaces of the shaft attachment portion and the magnet holding portion are subjected to a compression operation while sliding on a die, whereas the inner peripheral surface of the magnet holding portion is not in contact with the die, a vacancy rate of the inner peripheral surface of the magnet holding portion is larger than that of the outer peripheral surfaces of the shaft attachment portion and of the magnet holding portion, wherein the vacancy rate is represented by an area ratio occupied by the vacancies when a micrograph of a surface is subjected to image analysis, and wherein the undercut portion is formed by plastic deformation of the magnet holding portion, and wherein a tapered portion and a reverse tapered portion are continuously provided on the inner peripheral surface of the magnet holding portion from the one side in the axial direction, and wherein, the tapered portion is a portion having a diameter decreasing from the one side to the other side in the axial direction, and wherein, the reverse tapered portion is a portion having a diameter increasing from the one side to the other side in the axial direction, and an undercut portion is formed by the tapered portion and the reverse tapered portion. comprising a magnet holder and a magnet, wherein the magnet holder has a shaft attachment portion and a magnet holding portion, wherein the shaft attachment portion is configured to be press-fitted and fixed to a shaft; and wherein the magnet holding portion is provided on one side in an axial direction of the shaft attachment portion and holds a periphery of a magnet, and wherein the magnet holder holds the magnet on one axial end side on an inner peripheral surface side thereof, and wherein the magnet holder has an undercut portion that engages with the magnet in the axial direction on an inner surface of the magnet holding portion facing the magnet, and wherein the magnet holding portion and the shaft attachment portion are integrally formed of sintered metal, and wherein, by sizing an outer peripheral surface and an end surface of the magnet holding portion and an inner peripheral surface of the shaft attachment portion, during which the outer peripheral surfaces of the shaft attachment portion and the magnet holding portion are subjected to a compression operation while sliding on a die, whereas the inner peripheral surface of the magnet holding portion is not in contact with the die, a vacancy rate of the inner peripheral surface of the magnet holding portion is larger than that of the outer peripheral surfaces of the shaft attachment portion and of the magnet holding portion, wherein the vacancy rate is represented by an area ratio occupied by the vacancies when a micrograph of a surface is subjected to image analysis, and wherein the undercut portion is formed by plastic deformation of the magnet holding portion, and wherein a tapered portion and a reverse tapered portion are continuously provided on the inner peripheral surface of the magnet holding portion from the one side in the axial direction, and wherein, the tapered portion is a portion having a diameter decreasing from the one side to the other side in the axial direction, and wherein, the reverse tapered portion is a portion having a diameter increasing from the one side to the other side in the axial direction, and an undercut portion is formed by the tapered portion and the reverse tapered portion.