To diagnose intrauterine or ectopic pregnancy and confirm viability, an obstetric ultrasound is performed. This imaging procedure uses sound waves to create real-time images of the uterus and the developing fetus. During the ultrasound, a transducer is placed on the abdomen or inserted into the vagina, depending on the stage of pregnancy. The transducer emits sound waves that bounce off the structures in the pelvic region, creating images on a monitor.