Currently, Mathjax is loaded and operates on the whole vault.
This implies that definitions/commands/macros in one note affect other notes.

This is primarily due to the way both mathjax and obsidian are engineered to work.
However, it might be desirable in the future to have mathjax operate on a per document basis.

Apologies if this is like, unsolicited advice youâ€™ve heard a million times but, Iâ€™ve personally switched from MathJax to Katex for math on my own website. I had many frustrations with MathJax, but Katex was a breath of fresh air, not just in implementation but also how fast it was in comparison. No clue if itâ€™s viable for obsidian to switch at this point though