"I had this huge need to feel loved," the sobbing woman told a Sydney court.

The former northern beaches high school religion and maths teacher took that need to a 15-year-old student, having sexual encounters with him in her house and car several times between June and August 2008.

"It was a distorted view of what I thought I needed to feel loved," the 51-year-old, who cannot be identified, told the NSW District Court on Thursday.

"I took the victim's approaches to me for [help with] maths and I read them totally inappropriately . . . I read them as somebody loving me or seeing me as someone of value."

The woman, who had been a teacher for more than 25 years, said she was depressed at the time because her marriage had broken down. Her husband didn't love her, but liked her "being a housewife", she said.