The study of the structures and functions of the rectum, which stores and expels fecal matter from the body.