The Frenchman, who joined Barca from Valencia in the summer, has mainly been deployed as a centre-back this season, but started on the left side of defence in El Clasico.
"I was surprised to play left-back, but the coach decides," Mathieu told a French radio station.
"I thought we did well in the match but we were exposed to the counter-attack, which is Madrid's great strength.
"And it's true, the second goal really hurt us. Even though we have big players like [Gerard] Pique, Sergio Busquets or myself, we still have problems with set pieces. We have to work harder."
Prior to Saturday's match, Barcelona had not conceded in the league this season.