A procedure that uses high-energy sound waves (ultrasound) to look at tissues and organs inside the chest. Echoes from the sound waves form a picture of the size, shape, and position of the heart on a computer screen (echocardiogram). The pictures can also show the parts of the inside of the heart, such as the valves, and the motion of the heart while it is beating. Echocardiography may be used to help diagnose heart problems, such as abnormal heart valves and heart rhythms, heart murmurs, and damage to the heart muscle from a heart attack. It may also be used to check for an infection on or around the heart valves, blood clots or tumors inside the heart, and fluid buildup in the sac around the heart.