Echocardiography is a test that uses sound waves to produce live images of your heart. The image is called an echocardiogram. This test allows your doctor to monitor how your heart and its valves are functioning. 
The images can help them get information about:
•    blood clots in the heart chambers
•    fluid in the sac around the heart
•    problems with the aorta, which is the main artery connected to the heart
•    problems with the pumping function or relaxing function of the heart
•    problems with the function of your heart valves
•    pressures in the heart
An echocardiogram is key in determining the health of the heart muscle, especially after a heart attack. It can also reveal heart defects in unborn babies.
Getting an echocardiogram is painless. There are only risks in very rare cases with certain types of echocardiograms or if contrast is used for the echocardiogram.