X-rays and gamma rays are types of electromagnetic radiation used in medicine and to kill bacteria. They can damage living tissue in large doses by killing cells, and cause cancer in small doses. Gamma rays have the shortest wavelengths and are used to sterilize equipment and kill cancer cells. Microwaves are used for communication and in cooking by heating water molecules. Infrared rays are emitted by all hot objects and are used in devices like heaters, night vision cameras, and remote controls.