The son of a lawyer and a high-school math teacher, Weiner graduated from Brooklyn Tech HS.

He’d been scheduled to speak at the school’s commencement later this month, but the invitation has been withdrawn, Enid Febus, co-president of the PTA, told The Post yesterday.

He entered politics as the protégé of then-Rep. Charles Schumer — a new, popular force in the Democratic Party.

He learned the ropes in Schumer’s congressional district office before winning a seat on the City Council in 1991 at age 28.

When Schumer advanced to the Senate in 1998, Weiner rode his coattails, winning the House seat his mentor vacated in 1999.

In Washington, Weiner became known for his brash delivery and for not shying from the public eye.

He once staged an outdoor press conference on Capitol Hill with two Angora goats, to denounce federal subsidies for mohair wool. He got the publicity — but one of the goats didn’t get the humor and gored Weiner’s hand.

Despite his status as an up-and-comer, Weiner made it clear he wanted to serve a constituency that extended beyond his Brooklyn-Queens district.

In 2005, he made a surprisingly strong run in the Democratic mayoral primary, going from last place in early polls to finishing second to Fernando Ferrer.

He was expected to make another strong run in 2009 after raising more than $5 million, but dropped out when the City Council voted to extend term limits to enable Mayor Bloomberg to seek a third term.

Instead, Weiner concentrated on liberal causes in Congress.

He became known as one of the strongest supporters of a “public option” in the debate over health-care reform.

And he took on a bizarre issue, introducing a bill in 2008 to make it easier for foreign models to get US visas.

When he appeared on “The Daily Show” in February 2010, host Jon Stewart — a longtime friend — asked him whether he regretted dropping out of the 2009 mayoral race.

“I would’ve beaten Bloomberg like a rented mule,” he shot back.

After the laughter died down, Stewart played straight man: “OK, how much does it cost to rent a mule?” Weiner replied, “It’s an expensive mule.”

And while he was widely viewed as a front-runner in the 2013 mayoral race, Weiner was also groomed as a national attack dog against the agenda of the new Republican-majority House.

“I will chew my right arm off before I sign any part of it,” he said earlier this year of the GOP’s Medicare-reform plans.

Weiner was known for being abrasive with his staff and having few close friends in Washington.

So it came as a major surprise in July 2009 when he got engaged to Huma Abedin, 11 years younger than him and a stunningly attractive, Muslim-raised top aide to Secretary of State Hillary Rodham Clinton.

They were married the following July in a ceremony officiated by Bill Clinton.

Everything was going well for Anthony Weiner.

But on May 27, a 21-year-old Washington state co-ed received a photo via Weiner’s Twitter feed of an erection barely concealed by a man’s underpants.

It became the hottest topic in Washington, and Weiner tried to duck the attention by claiming his Twitter account had been hacked.

What came to be known as Weinergate exploded on June 6, when a conservative blogger posted half-naked photos reportedly provided by a woman who received them from Weiner’s personal e-mail account.

Weiner confessed that he’d had “inappropriate online conversations” with six women over three years.

He insisted he never met any of the women and never had “sex outside my marriage,” and repeatedly said he would not resign.

Democrats quickly distanced themselves from him. House Democratic leader Nancy Pelosi called for an ethics-committee investigation, and the party’s leadership prepared an orchestrated effort to oust him.

More lewd photos and online conversation emerged with his female correspondents, including a former porn star, a Georgia cheerleading coach and a Las Vegas blackjack dealer.

Yet more embarrassing photos — taken in the congressional members-only gym, no less — emerged, and on Monday, President Obama broke his silence, saying he “would resign” if he were in Weiner’s shoes.