learn (something) by heart
To learn something very thoroughly; to memorize something. Ask Becky to recite the poem—she learned it by heart. You don't have to learn these principles by heart, we just want you to have a basic understanding of them.
learn something by heart
Fig. to learn something so well that it can be written or recited without thinking; to memorize something. The director told me to learn my speech by heart. I had to go over it many times before I learned it by heart.
learn by heart
Also, learn by rote. See under by heart.