There is a common misconception here worth clarifying: "commander damage" is not damage dealt to a commander — it is combat damage dealt by a commander to a player. Under CR rule 903.10, a player who has been dealt 21 or more combat damage by the same commander over the course of the game loses the game. The damage tracked is outgoing combat damage from the commander to players, not incoming damage to the commander itself.
The location of the commander is also relevant for a different reason. A commander only deals "commander damage" when it is on the battlefield and deals combat damage to a player. If a commander is in the command zone, the graveyard, exile, or any other zone, it cannot deal combat damage, so no commander damage accumulates during those times (CR 903.10).
Damage dealt TO a commander is simply regular damage. It can cause the commander to be destroyed (if lethal damage is marked on it) or sent to another zone, but it has no relationship to the 21-damage commander damage rule at all. There is no rule tracking cumulative damage received by a commander.
Concrete example: Your opponent's Atraxa, Praetors' Voice swings at you for 4 combat damage over three separate turns (totaling 12 commander damage to you). Meanwhile, you block Atraxa with a 5/5 and deal 5 damage to Atraxa. That 5 damage to Atraxa is irrelevant to the commander damage rule — it may destroy Atraxa, but it does not count toward any commander damage threshold in any direction.
In summary: watch the damage your commander deals to opponents in combat (CR 903.10), not the damage dealt to it. Only the former matters for the 21-damage loss condition.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.