The eighth-greatest song of all time, as Rolling Stone declared it, begins quietly, just with the voice of Paul McCartney and a piano. After the first verse, the song builds — guitars, back-up vocals, Ringo Starr’s drums, percussion. Then there’s the epic outro: A chorus chanting “Na, na, na/Hey Jude” something like 18 times accompanied by a 36-piece orchestra. The song is more than seven minutes long, but it doesn’t feel like it.

“Hey Jude,” even for the first-time listener, is unforgettable. This rock ‘n’ roll gem, its composer says, was inspired by the divorce of John and Cynthia Lennon, who died on Wednesday at 75.

“Jude,” it turns out, is Julian Lennon — John and Cynthia’s son, who was about five when his parents divorced in 1968. McCartney came up with idea when making a conciliatory drive out to see Cynthia, who was cast out of the Beatles’ inner circle after John met Yoko Ono, his future wife.

“I started with the idea ‘Hey Jules,’ which was Julian, don’t make it bad, take a sad song and make it better,” McCartney said, as Howard Sounes wrote in “Fab: An Intimate Life of Paul McCartney” in 2011. “Hey, try and deal with this terrible thing. I knew it was not going to be easy for him. I always feel sorry for kids in divorces … I had the idea [for the song] by the time I got there. I changed it to ‘Jude’ because I thought that sounded a bit better.”

As McCartney explained, he intended to take out the song’s most mysterious line — “the movement you need is on your shoulder” — but John wouldn’t have it.

“I was playing the song to John, and I said … ‘I’ll be taking that out,'” McCartney said. “He said, ‘What for? … that’s the best line in it, man.'”

McCartney said he’s come to appreciate the lyric. It emerged as a sort of pep talk for Julian, meaning, “You have the wherewithal to be what you want to be,” McCartney said.

Cynthia Lennon, the first wife of late Beatle John Lennon, has died at the age of 75. The couple divorced six years later when he left her for Japanese artist Yoko Ono. (Reuters)

Unfortunately, John and Cynthia Lennon didn’t seem to have this power of self-actualization. They met as teenagers in Liverpool in the 1950s, but were an odd pair — Cynthia reserved, John an extrovert. And John, who Cynthia claimed once hit her when he saw her dancing with original Beatles bassist Stu Sutcliffe, wasn’t exactly a catch.

“He was a very jealous young man at the time, and he had a lot of pain inside,” Lennon said in 2005. “He wanted to trust me and he thought by seeing me dancing with a friend of his that I was being disloyal or messing around. So he smacked me, but that was the only time.”

The Lennons got married when Cynthia got pregnant with Julian in 1962. John, who played a show on his wedding night, wasn’t all that enthused.

I said yes, we’ll have to get married,” John later said. “I didn’t fight it.” 

Then the marriage a Beatle didn’t want became the marriage the Beatles didn’t want. A teen idol with a wife and son wouldn’t go over well with the kids, and what Cynthia later deemed her “undercover existence” was kept hush-hush.

“I have read so many books and seen so many films, and it’s like we don’t really exist,” Cynthia Lennon told “Good Morning America” in 2005. “We are like walk-on parts in his life. We did spend 10 years together.”

Though John wrote “Lucy in the Sky with Diamonds” about a picture Julian drew, he wasn’t exactly a doting father.

“I’ve never really wanted to know the truth about how Dad was with me,” Julian Lennon said. “There was some very negative stuff talked about me … like when he said I’d come out of a whiskey bottle on a Saturday night. Stuff like that. You think, where’s the love in that? Paul and I used to hang about quite a bit … more than Dad and I did. We had a great friendship going, and there seems to be far more pictures of me and Paul playing together at that age than there are pictures of me and my dad.”

Once Ono was on the scene, the marriage couldn’t last. When Cynthia caught Lennon with the avant-garde artist at the family’s home when she returned from a vacation, it was “Hello, Goodbye.”

“He said, ‘Hello,’ ” Cynthia said. “I didn’t get one word out of Yoko.”

“She was persistent,” Lennon also said of Ono, “and she didn’t give up.”

But the fraught relationship resulted in a song that John called a “masterpiece.” Of course, John, ever the egotist, didn’t think the song was about Julian — but about himself, encouraging him to leave Cynthia.

I always heard it as a song to me,” Lennon said in 1980, not long before his death. “Yoko’s just come into the picture. … He’s saying, ‘Hey, Jude — hey, John.’ Subconsciously he was saying, ‘Go ahead, leave me.'”