Despite their potential hazards, gamma rays have beneficial applications in medical imaging and treatment. One of the most common uses is in cancer therapy, where focused gamma rays are used to kill cancerous cells in a process known as radiotherapy. Gamma rays are also used in diagnostic imaging techniques like PET scans, where they help visualize metabolic processes in the body. The controlled use of gamma rays in medicine highlights the importance of balancing their beneficial and harmful effects.