An optical sensor 111 for identifying a subject 120 in accordance with the present invention is characterized in that, it has a light emitting device 113 for radiating reference light at a subject 120, and a light receiving device 114 used for receiving the reference light transmitted through the subject 120. Said reference light with light absorption characteristics of the light receiving material 121, 122 contained in said subject 120, has a peak wavelength in an absorption wavelength region of the light absorption materials 121, 122 adjusted independently from the subject. According to the light amount of the reference light transmitting through the subject, said light receiving material 121, 122 is capable of being identified. On the basis of the identifying results, a subject120 is capable of be identified. A high precision optical sensor for identifying a subject such as ink and the like is provided.