Trace

The Trace is a Charm put on wizards and witches who are under seventeen years of age. When any magical activity is performed in the vicinity of the underage individual, the Improper Use of Magic Office within the Ministry of Magic is alerted to the spell that was used and to the location of the caster and the time. The charm allows the Ministry to track underage magic, which is banned under the Decree for the Reasonable Restriction of Underage Sorcery. The Trace automatically breaks upon a wizard or witch's seventeenth birthday; Remus Lupin and Ron Weasley each claimed that it was impossible for the Trace to continue to function on a person over the age of seventeen and that it could not be placed on an adult.

Implementation and Use
It is unknown how a witch or wizard is imbued with the Trace, but it appears to be universal with magical children. It does not need to be removed, but breaks automatically upon reaching adulthood.

The Ministry trusts parents to properly discipline their children if they perform magic, due to the fact that the parents' own magic will constantly interfere with the Trace. Children who grow up in the Muggle world, such as Harry Potter, are more closely monitored — any magic that was performed at or near 4 Privet Drive was assumed to have been caused by him, as he was the only magical person living in his neighbourhood. Thus, when the house-elf Dobby used magic at that location, the Ministry blamed Harry.

Limitations
Either the Trace is lifted or the Ministry does not monitor it when underage witches and wizards are attending Hogwarts School of Witchcraft and Wizardry, vacations not included, allowing students to perform magic freely. It appears that students can also use magic freely on the Hogwarts Express.

The Trace's effectiveness appears to be somewhat inconsistent. Alastor Moody mentioned that any magic around an underage witch or wizard will activate the Trace, and, as above-mentioned, the Ministry can erroneously attribute that magic to the underage individual. However, Arthur Weasley used magic around Harry that was not blamed on him. It is probable however that because Arthur arranged a Floo connection to the fireplace of Number 4 the Ministry knew that an older wizard was present at the time. It is also possible, though less likely, that the Ministry was alerted to this but recognised some aspect of the magic as belonging to an adult wizard.

Hermione Granger also admitted to successfully trying out "a few simple spells" just prior to her First year at Hogwarts School of Witchcraft and Wizardry, but apparently, she never received any notification that this was banned, even though, as a Muggle-born witch, it is unlikely that there were any other wizards or witches in her vicinity that the Ministry could have believed cast the magic instead. However, this is probably because the Ministry does not monitor pre-Hogwarts students, as their magic is normally uncontrollable. This may however indicate that the Trace is actually put in place after students begin formal learning.

Another inconsistency is that when Tom Riddle was fifteen, he murdered his father and grandparents with the Killing Curse and then modified his uncle Morfin Gaunt's memory so that he would confess to the crime. While Dumbledore explained how Riddle's magic in the Gaunt Shack would go unnoticed, no explanation is given as to how three uses of Avada Kedavra by a fifteen-year old in a Muggle home were overlooked. Given Riddle's powerful nature, however, it is not inconceivable that he devised a way to block or even dispel the Trace. Also it is possible that due to his Uncle being in residence there the Ministry may have felt the magic was not used by Tom.

Also, the fact that the Ministry generally ignores when the Trace is broken by underage wizards and witches of wizarding families, expecting their parents to discipline them, essentially makes it useless at monitoring their use of magic. It could be argued, as a result of this, that pure-blood children have more legal "wiggle-room" when breaking the restriction for underage wizardry than half-bloods living with all muggle relations (like Harry), and muggle-borns.

Examples of the Trace being activated

 * Harry Potter received a warning from the Improper Use of Magic Office in 1992 because the Ministry detected the use of a Hover Charm in his vicinity via the Trace and attributed it to him, though it was in fact used by Dobby.
 * Harry used the Patronus in 1995 to defend himself and his cousin from Dementors, activating the Trace, as he was only fifteen years old at the time. He was at first expelled from Hogwarts, but was reinstated as the Ministry had no right to expel students from Hogwarts. Harry was later cleared in a Wizengamot trial.

Etymology
Trace, as the English word meaning a path, refers to how a person's magic is "traced" to his or her location.

Behind the scenes

 * In the film versions of Harry Potter and the Philosopher's Stone and Harry Potter and the Chamber of Secrets, Hermione casts the Oculus Reparo spell on Harry's glasses, in the former while aboard the Hogwarts Express and the latter in public in Diagon Alley (the second use does not occur in the novel, with an older character casting the spell). In neither case is it indicated that Hermione is warned or punished. It's possible The Trace (in the film continuity) doesn't apply to magic use on the train - which could be seen as an extension of the school - or in the "Muggle-free" environment of Diagon Alley. Alternately, it's possible the use of some mundane, harmless spells such as Oculus Reparo may be overlooked (as opposed to more major violations such as hover spells or the Patronus charm). Or those are just mistakes made by the movies producers
 * In the fourth Harry Potter book, the Weasleys broke out of the Dursleys' fireplace by using magic, and Mr. Weasley used magic to return Dudley's tongue to its original size.
 * Also, in the fifth novel, Tonks used some household spells in Harry's room, while helping him to pack his things. This, however, did not seem to have had any legal consequences.

Appearances

 * ''Harry Potter and the Chamber of Secrets
 * ''Harry Potter and the Chamber of Secrets (film)
 * Harry Potter and the Order of the Phoenix
 * Harry Potter and the Order of the Phoenix (film)
 * Harry Potter and the Deathly Hallows
 * Harry Potter and the Deathly Hallows: Part 1

Notes and references
Trace