There is no accurate way of doing it. Most vocal removers work on the principle that the vocal is a constant in the middle of the mix. The left and right waveforms are inverted and swapped over then added back to the original, this pretty much counters out the vocal and leaves anything that wasn't dead centre (more or less). It's far from an exact science!
The big problem is the bassline, bassdrum and snare are usually dead centre too so these get lost (or reduced)
Regarding isolating the vocal you would then take the vocal free track, invert it and add that back to the original, but this rarely gives any kind of decent result.
The big problem is the bassline, bassdrum and snare are usually dead centre too so these get lost (or reduced)
Regarding isolating the vocal you would then take the vocal free track, invert it and add that back to the original, but this rarely gives any kind of decent result.