Magnetic resonance imaging (MRI) is a test your doctor may order to diagnose a disease or injury, or to see how well a treatment is working.