"Invert" technical explanation

Hi, I’ve used audacity to edit an audio file eliminating the vocals and getting only the melody background part.
This is done by splitting the audio in two “parts” and managing one, by selecting the “invert” option in the narrow upper left menu…then I’ve selected both parts of the audio and setted to mono…at the end of the process the audio file was playing without the “vocals” part.
My question is about the invert option and how this acts technically (since it seems the vocals part was gone by “inverting” the track).
What happened to the spectrum of the track Whit the invert option selected, and why I had to split the audio first?
Thanks for the help and please, if the explanation requires, feel free to expose the technical details of the question.

See this topic: https://forum.audacityteam.org/t/what-does-the-invert-effect-do/11595/1
Does that answer your questions?