In another attack, a gunman fatally shot six Sunnis as they traveled in a minibus in the mainly Shiite town of Wajihiyah, 60 miles north of Baghdad, reported the Associated Press.
The dead, including two children, three women and a man, were traveling to visit relatives in Baquoba, according to police in the Diyala province.
The bombings in Baghdad took place during the holiday of Eid al-Fitr, when families exchange gifts and attend prayers and feasts to mark the end of the fasting month of Ramadan.
The first bomber detonated a taxi after crashing into a police vehicle guarding a Shiite prayer hall in the Zafaraniyah district, a Reuters TV cameraman at the scene said.
"Pools of blood and the smell of burned flesh was everywhere and I saw a man of about 70 bleeding and lying on the ground from injuries," said Ammar Hashim, 25, who runs a car parts shop, according to the AP.
The other bombing, in the New Baghdad district, was conducted by a boy who appeared to be in his late teens. He detonated a belt of explosives as worshippers were leaving the Rasoul mosque.
No one has claimed responsibility for the explosions, but attacks on Shiites are widely attributed to Sunni extremists such as al-Qaida in Iraq hoping to reignite sectarian violence that nearly drove the country into a civil war.
Violence also erupted over the weekend -- on Sunday, a series of bomb attacks struck Baghdad, three of them apparently aimed at civilians preparing to break their Ramadan fasts.
At least 27 people were killed and dozens more were wounded, according to media reports.
In general, violence in Iraq is at four-year lows and al-Qaida militants no longer have control of villages and city districts as they did until 2007, but some militant cells are still active and carry out bomb attacks.