Brazil are the defending Olympic champion after winning on home soil at the 2016 Rio de Janeiro Games. But the Brazilians were at a disadvantage early when Douglas Luiz, who plays for Aston Villa, was sent off in the 13th minute.
Ivory Coast midfielder Eboue Kouassi was sent off in the 79th. Both Luiz and Kouassi won't be able to play in their teams' final group matches.
Brazil captain Dani Alves, at 38, is the oldest player in the tournament, which features under-23 teams on the men's side with coaches allowed to bring three older players.