Paris Mayor Anne Hidalgo, Prime Minister Jean Castex and other politicians were on hand at the protests.
A special needs teacher who works in the Paris area told CNN she joined the demonstration because she was shocked by the killing.
"We all should live together and learn to live together, and everybody has to respect everybody's faith," she said.
Abdoullakh Abouyezidovitch, an 18-year-old Chechen refugee, took credit for Friday's beheading of Samuel Paty, 47, who taught history and geography at Collge du Bois d'Aulne. Police killed the teen Friday afternoon in ragny, the same Paris suburb where Paty's body was found.
Paty had taught a class on freedom of expression, during which he used caricatures of the prophet taken from Charlie Hebdo, sparking controversy in the weeks preceding his death, authorities said.
Abouyezidovitch approached students outside the school, located in the Parisian suburb of Conflans-Sainte-Honorine, asking them to point out Paty before attacking the teacher on his way home, Ricard said.
Abouyezidovitch, who was not known to intelligence services, lived in vreux, more than an hour's drive from the scene of the attack, the prosecutor said. It was unclear if Abouyezidovitch had attended Collge du Bois d'Aulne.
Paty had organized a lesson around the Charlie Hebdo caricatures, Ricard said. Nordine Chaouadi, a parent of one of the pupils at the school, told Agence France-Presse that Paty took measures to avoid offending the Muslim youngsters in his class.
"It was just to preserve them. It was out of pure kindness because he had to show a caricature of the prophet of Islam and simply said to the Muslim children: 'Go out, I don't want it to hurt your feelings.' That's what my son told me," he said.
After a Danish newspaper controversially published the caricatures in 2005, Charlie Hebdo republished them the following year.
On October 7, a father of one of Paty's pupils called for Paty's dismissal on Facebook. He also filed a complaint and published a YouTube video critical of the teacher. Paty responded with a defamation complaint, Ricard said.
Police have taken 11 people into custody for questioning. Included are the father who complained about Paty and the man's sister-in-law, who is suspected of having "joined the Islamic State Organization in 2014 in Syria and is, as such, the subject of a search warrant by an anti-terrorist investigating judge," the prosecutor said.
Abouyezidovitch's parents, grandfather and brother were also taken in for questioning, a French judicial source said.
French Education Minister Jean-Michel Blanquer said Paty was murdered "for teaching a class that had to do with one of the pillars of democracy -- freedom of expression."
"Samuel Paty embodied our Republic's most noble asset: its schools. He was cowardly murdered by enemies of freedom. We will be united, firm and resolute," Blanquer wrote in a tweet.
Macron said Paty was "killed because he was teaching students freedom of speech, the freedom to believe and not believe."
CNN's Pierre Bairin, Eva Tapiero, Martin Goillandeau and Ivana Kottasov contributed to this report.