By heart
Recite or know something from memory dates from the 1300s, deriving from the very old notion that the heart was the seat of not only emotions but also intellect.