Provided is a polymer including a temperature-responsive unit in a molecule, wherein the polymer has a refractive index difference (B−A) of 0.01 or greater but 0.2 or less between a minimum refractive index A of the polymer in a temperature range of 5 degrees C. or higher but lower than 30 degrees C. and a maximum refractive index B of the polymer in a temperature range of 30 degrees C. or higher but lower than 50 degrees C.